emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/tmm.el,v


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/tmm.el,v
Date: Fri, 30 Mar 2007 06:11:39 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Nick Roberts <nickrob>  07/03/30 06:11:39

Index: tmm.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tmm.el,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- tmm.el      21 Jan 2007 03:53:10 -0000      1.49
+++ tmm.el      30 Mar 2007 06:11:38 -0000      1.50
@@ -74,13 +74,13 @@
        (let ((tail menu-bar)
              this-one
              (column 0))
-         (while (and tail (< column x-position))
+         (while (and tail (<= column x-position))
            (setq this-one (car tail))
-           (if (and (consp (car tail))
-                    (consp (cdr (car tail)))
-                    (stringp (nth 1 (car tail))))
+           (if (and (consp this-one)
+                    (consp (cdr this-one))
+                    (stringp (nth 1  this-one)))
                (setq column (+ column
-                               (length (nth 1 (car tail)))
+                               (length (nth 1 this-one))
                                1)))
            (setq tail (cdr tail)))
          (setq menu-bar-item (car this-one))))
@@ -210,21 +210,24 @@
             (setq history (append history history history history))
             (setq tmm-c-prompt (nth (- history-len 1 index-of-default) 
history))
             (add-hook 'minibuffer-setup-hook 'tmm-add-prompt)
+            (if default-item
+                (setq out (car (nth index-of-default tmm-km-list)))
             (save-excursion
               (unwind-protect
                   (setq out
                         (completing-read
-                         (concat gl-str " (up/down to change, PgUp to menu): ")
+                           (concat gl-str
+                                   " (up/down to change, PgUp to menu): ")
                          tmm-km-list nil t nil
-                         (cons 'history (- (* 2 history-len) 
index-of-default))))
+                           (cons 'history
+                                 (- (* 2 history-len) index-of-default))))
                 (save-excursion
                   (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
                   (if (get-buffer "*Completions*")
                       (progn
                         (set-buffer "*Completions*")
                         (use-local-map tmm-old-comp-map)
-                        (bury-buffer (current-buffer)))))
-                ))))
+                          (bury-buffer (current-buffer))))))))))
       (setq choice (cdr (assoc out tmm-km-list)))
       (and (null choice)
           (> (length out) (length tmm-c-prompt))




reply via email to

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