emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog info.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog info.el
Date: Mon, 19 Oct 2009 13:47:13 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/10/19 13:47:13

Modified files:
        lisp           : ChangeLog info.el 

Log message:
        * info.el (Info-complete-menu-item): Handle `boundaries' explicitly.
        (Info-menu): Remove unused vars `last' and `completions'.
        (Info-index-nodes): Remove unused var `node'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16461&r2=1.16462
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/info.el?cvsroot=emacs&r1=1.568&r2=1.569

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16461
retrieving revision 1.16462
diff -u -b -r1.16461 -r1.16462
--- ChangeLog   19 Oct 2009 13:29:34 -0000      1.16461
+++ ChangeLog   19 Oct 2009 13:47:10 -0000      1.16462
@@ -1,5 +1,9 @@
 2009-10-19  Stefan Monnier  <address@hidden>
 
+       * info.el (Info-complete-menu-item): Handle `boundaries' explicitly.
+       (Info-menu): Remove unused vars `last' and `completions'.
+       (Info-index-nodes): Remove unused var `node'.
+
        * info.el (Info-complete-menu-item): Use complete-with-action.
 
 2009-10-19  Dan Nicolaescu  <address@hidden>

Index: info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.568
retrieving revision 1.569
diff -u -b -r1.568 -r1.569
--- info.el     19 Oct 2009 13:29:38 -0000      1.568
+++ info.el     19 Oct 2009 13:47:12 -0000      1.569
@@ -2440,12 +2440,16 @@
             nextnode)
         (goto-char (point-min))
         (search-forward "\n* Menu:")
-        (if (not (memq action '(nil t)))
+        (cond
+         ((eq (car-safe action) 'boundaries) nil)
+         ((eq action 'lambda)
             (re-search-forward
-             (concat "\n\\* +" (regexp-quote string) ":") nil t)
+           (concat "\n\\* +" (regexp-quote string) ":") nil t))
+         (t
           (let ((pattern (concat "\n\\* +\\("
                                  (regexp-quote string)
-                                 Info-menu-entry-name-re "\\):" 
Info-node-spec-re))
+                                 Info-menu-entry-name-re "\\):"
+                                 Info-node-spec-re))
                 completions
                 (complete-nodes Info-complete-nodes))
             ;; Check the cache.
@@ -2480,7 +2484,7 @@
                   (list Info-current-file Info-current-node
                         Info-complete-next-re string completions
                         Info-complete-nodes)))
-            (complete-with-action action completions string predicate)))))))
+            (complete-with-action action completions string predicate))))))))
 
 
 (defun Info-menu (menu-item &optional fork)
@@ -2491,12 +2495,10 @@
 a new Info buffer.  If FORK is a string, it is the name to use for the
 new buffer."
   (interactive
-   (let ((completions '())
-        ;; If point is within a menu item, use that item as the default
+   (let (;; If point is within a menu item, use that item as the default
         (default nil)
         (p (point))
         beg
-        (last nil)
         (case-fold-search t))
      (save-excursion
        (goto-char (point-min))
@@ -2890,7 +2892,7 @@
                                              (setq file (Info-find-file 
file))))
                                        default-directory))
                 Info-history Info-history-list Info-fontify-maximum-menu-size
-                (main-file file) subfiles nodes node)
+                (main-file file) subfiles nodes)
            (condition-case nil
                (with-temp-buffer
                  (while (or main-file subfiles)
@@ -2933,7 +2935,7 @@
                  (Info-goto-node (car nodes))
                  (while (and (setq node (Info-extract-pointer "next" t))
                              (string-match "\\<Index\\>" node))
-                   (setq nodes (cons node nodes))
+                   (push node nodes)
                    (Info-goto-node node))))
            (error nil))
          (if nodes




reply via email to

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