emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114689: * lisp/tmm.el (tmm--history): New dynamic v


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114689: * lisp/tmm.el (tmm--history): New dynamic variable.
Date: Wed, 16 Oct 2013 18:23:18 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114689
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15623
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-16 14:23:15 -0400
message:
  * lisp/tmm.el (tmm--history): New dynamic variable.
  (tmm-prompt): Use tmm--history in place of `history'.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/tmm.el                    tmm.el-20091113204419-o5vbwnq5f7feedwu-843
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-16 13:16:53 +0000
+++ b/lisp/ChangeLog    2013-10-16 18:23:15 +0000
@@ -1,3 +1,8 @@
+2013-10-16  Glenn Morris  <address@hidden>
+
+       * tmm.el (tmm--history): New dynamic variable.
+       (tmm-prompt): Use tmm--history in place of `history'.  (Bug#15623)
+
 2013-10-16  Michael Albinus  <address@hidden>
 
        * net/tramp-smb.el (tramp-smb-acl-program): New customer option.

=== modified file 'lisp/tmm.el'
--- a/lisp/tmm.el       2013-10-08 09:01:26 +0000
+++ b/lisp/tmm.el       2013-10-16 18:23:15 +0000
@@ -149,6 +149,8 @@
        '(metadata (display-sort-function . identity))
       (complete-with-action action items string pred))))
 
+(defvar tmm--history nil)
+
 ;;;###autoload
 (defun tmm-prompt (menu &optional in-popup default-item)
   "Text-mode emulation of calling the bindings in keymap.
@@ -167,7 +169,7 @@
   ;; That is used for recursive calls only.
   (let ((gl-str "Menu bar")  ;; The menu bar itself is not a menu keymap
                                        ; so it doesn't have a name.
-       tmm-km-list out history history-len tmm-table-undef tmm-c-prompt
+       tmm-km-list out history-len tmm-table-undef tmm-c-prompt
        tmm-old-mb-map tmm-short-cuts
        chosen-string choice
        (not-menu (not (keymapp menu))))
@@ -221,16 +223,18 @@
                         (setq index-of-default (1+ index-of-default)))
                     (setq tail (cdr tail)))))
              (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt))))
-               (setq history
+               (setq tmm--history
                      (reverse (delq nil
                                     (mapcar
                                      (lambda (elt)
                                        (if (string-match prompt (car elt))
                                            (car elt)))
                                      tmm-km-list)))))
-            (setq history-len (length history))
-            (setq history (append history history history history))
-            (setq tmm-c-prompt (nth (- history-len 1 index-of-default) 
history))
+            (setq history-len (length tmm--history))
+            (setq tmm--history (append tmm--history tmm--history
+                                        tmm--history tmm--history))
+            (setq tmm-c-prompt (nth (- history-len 1 index-of-default)
+                                     tmm--history))
              (setq out
                    (if default-item
                        (car (nth index-of-default tmm-km-list))
@@ -239,7 +243,7 @@
                         (concat gl-str
                                 " (up/down to change, PgUp to menu): ")
                         (tmm--completion-table tmm-km-list) nil t nil
-                        (cons 'history
+                        (cons 'tmm--history
                               (- (* 2 history-len) index-of-default))))))))
       (setq choice (cdr (assoc out tmm-km-list)))
       (and (null choice)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]