aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-10-19 13:47:10 +0000
committerStefan Monnier2009-10-19 13:47:10 +0000
commitc2a37b782e987e9bfdb1cd2cf891b52758a41cb6 (patch)
tree54240adda6c2f571fa41243c5419fb13068d08d8
parent3c13704df68536621363a59349d17a306a828c1a (diff)
downloademacs-c2a37b782e987e9bfdb1cd2cf891b52758a41cb6.tar.gz
emacs-c2a37b782e987e9bfdb1cd2cf891b52758a41cb6.zip
* info.el (Info-complete-menu-item): Handle `boundaries' explicitly.
(Info-menu): Remove unused vars `last' and `completions'. (Info-index-nodes): Remove unused var `node'.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/info.el22
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 075c95db279..980143b288f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12009-10-19 Stefan Monnier <monnier@iro.umontreal.ca> 12009-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * info.el (Info-complete-menu-item): Handle `boundaries' explicitly.
4 (Info-menu): Remove unused vars `last' and `completions'.
5 (Info-index-nodes): Remove unused var `node'.
6
3 * info.el (Info-complete-menu-item): Use complete-with-action. 7 * info.el (Info-complete-menu-item): Use complete-with-action.
4 8
52009-10-19 Dan Nicolaescu <dann@ics.uci.edu> 92009-10-19 Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/lisp/info.el b/lisp/info.el
index d82d580daab..ee66d6080a6 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2440,12 +2440,16 @@ Because of ambiguities, this should be concatenated with something like
2440 nextnode) 2440 nextnode)
2441 (goto-char (point-min)) 2441 (goto-char (point-min))
2442 (search-forward "\n* Menu:") 2442 (search-forward "\n* Menu:")
2443 (if (not (memq action '(nil t))) 2443 (cond
2444 (re-search-forward 2444 ((eq (car-safe action) 'boundaries) nil)
2445 (concat "\n\\* +" (regexp-quote string) ":") nil t) 2445 ((eq action 'lambda)
2446 (re-search-forward
2447 (concat "\n\\* +" (regexp-quote string) ":") nil t))
2448 (t
2446 (let ((pattern (concat "\n\\* +\\(" 2449 (let ((pattern (concat "\n\\* +\\("
2447 (regexp-quote string) 2450 (regexp-quote string)
2448 Info-menu-entry-name-re "\\):" Info-node-spec-re)) 2451 Info-menu-entry-name-re "\\):"
2452 Info-node-spec-re))
2449 completions 2453 completions
2450 (complete-nodes Info-complete-nodes)) 2454 (complete-nodes Info-complete-nodes))
2451 ;; Check the cache. 2455 ;; Check the cache.
@@ -2480,7 +2484,7 @@ Because of ambiguities, this should be concatenated with something like
2480 (list Info-current-file Info-current-node 2484 (list Info-current-file Info-current-node
2481 Info-complete-next-re string completions 2485 Info-complete-next-re string completions
2482 Info-complete-nodes))) 2486 Info-complete-nodes)))
2483 (complete-with-action action completions string predicate))))))) 2487 (complete-with-action action completions string predicate))))))))
2484 2488
2485 2489
2486(defun Info-menu (menu-item &optional fork) 2490(defun Info-menu (menu-item &optional fork)
@@ -2491,12 +2495,10 @@ If FORK is non-nil (interactively with a prefix arg), show the node in
2491a new Info buffer. If FORK is a string, it is the name to use for the 2495a new Info buffer. If FORK is a string, it is the name to use for the
2492new buffer." 2496new buffer."
2493 (interactive 2497 (interactive
2494 (let ((completions '()) 2498 (let (;; If point is within a menu item, use that item as the default
2495 ;; If point is within a menu item, use that item as the default
2496 (default nil) 2499 (default nil)
2497 (p (point)) 2500 (p (point))
2498 beg 2501 beg
2499 (last nil)
2500 (case-fold-search t)) 2502 (case-fold-search t))
2501 (save-excursion 2503 (save-excursion
2502 (goto-char (point-min)) 2504 (goto-char (point-min))
@@ -2890,7 +2892,7 @@ following nodes whose names also contain the word \"Index\"."
2890 (setq file (Info-find-file file)))) 2892 (setq file (Info-find-file file))))
2891 default-directory)) 2893 default-directory))
2892 Info-history Info-history-list Info-fontify-maximum-menu-size 2894 Info-history Info-history-list Info-fontify-maximum-menu-size
2893 (main-file file) subfiles nodes node) 2895 (main-file file) subfiles nodes)
2894 (condition-case nil 2896 (condition-case nil
2895 (with-temp-buffer 2897 (with-temp-buffer
2896 (while (or main-file subfiles) 2898 (while (or main-file subfiles)
@@ -2933,7 +2935,7 @@ following nodes whose names also contain the word \"Index\"."
2933 (Info-goto-node (car nodes)) 2935 (Info-goto-node (car nodes))
2934 (while (and (setq node (Info-extract-pointer "next" t)) 2936 (while (and (setq node (Info-extract-pointer "next" t))
2935 (string-match "\\<Index\\>" node)) 2937 (string-match "\\<Index\\>" node))
2936 (setq nodes (cons node nodes)) 2938 (push node nodes)
2937 (Info-goto-node node)))) 2939 (Info-goto-node node))))
2938 (error nil)) 2940 (error nil))
2939 (if nodes 2941 (if nodes