diff options
| author | Stefan Monnier | 2003-06-03 21:44:53 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-06-03 21:44:53 +0000 |
| commit | a1637357dc5d499a8e8f5167beb38e52c04ff327 (patch) | |
| tree | 9837e9e35deb84390625454a10bab9564261c938 | |
| parent | 472d38201d69d82ad5ccce99c7d4a074701e7b1b (diff) | |
| download | emacs-a1637357dc5d499a8e8f5167beb38e52c04ff327.tar.gz emacs-a1637357dc5d499a8e8f5167beb38e52c04ff327.zip | |
(Info-extract-menu-node-name): Remove unused arg `errmessage'.
(Info-follow-reference): Update corresponding call.
(Info-node-spec-re): New const.
(Info-complete-menu-item): Use it to only allow : when necessary.
(Info-fontify-node): USe it as well. Fixup typo.
| -rw-r--r-- | lisp/info.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/info.el b/lisp/info.el index caf4559b6a7..7b30cdfca8d 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1536,14 +1536,14 @@ FOOTNOTENAME may be an abbreviation of the reference name." | |||
| 1536 | (error "No cross-reference named %s" footnotename)) | 1536 | (error "No cross-reference named %s" footnotename)) |
| 1537 | (goto-char (+ (match-beginning 0) 5)) | 1537 | (goto-char (+ (match-beginning 0) 5)) |
| 1538 | (setq target | 1538 | (setq target |
| 1539 | (Info-extract-menu-node-name "Bad format cross reference" t))) | 1539 | (Info-extract-menu-node-name t))) |
| 1540 | (while (setq i (string-match "[ \t\n]+" target i)) | 1540 | (while (setq i (string-match "[ \t\n]+" target i)) |
| 1541 | (setq target (concat (substring target 0 i) " " | 1541 | (setq target (concat (substring target 0 i) " " |
| 1542 | (substring target (match-end 0)))) | 1542 | (substring target (match-end 0)))) |
| 1543 | (setq i (+ i 1))) | 1543 | (setq i (+ i 1))) |
| 1544 | (Info-goto-node target))) | 1544 | (Info-goto-node target))) |
| 1545 | 1545 | ||
| 1546 | (defun Info-extract-menu-node-name (&optional errmessage multi-line) | 1546 | (defun Info-extract-menu-node-name (&optional multi-line) |
| 1547 | (skip-chars-forward " \t\n") | 1547 | (skip-chars-forward " \t\n") |
| 1548 | (let ((beg (point)) | 1548 | (let ((beg (point)) |
| 1549 | str) | 1549 | str) |
| @@ -1567,6 +1567,9 @@ FOOTNOTENAME may be an abbreviation of the reference name." | |||
| 1567 | (defvar Info-complete-next-re nil) | 1567 | (defvar Info-complete-next-re nil) |
| 1568 | (defvar Info-complete-cache nil) | 1568 | (defvar Info-complete-cache nil) |
| 1569 | 1569 | ||
| 1570 | (defconst Info-node-spec-re "[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.]" | ||
| 1571 | "Regexp to match the text after a : until the terminating `.'.") | ||
| 1572 | |||
| 1570 | (defun Info-complete-menu-item (string predicate action) | 1573 | (defun Info-complete-menu-item (string predicate action) |
| 1571 | ;; This uses two dynamically bound variables: | 1574 | ;; This uses two dynamically bound variables: |
| 1572 | ;; - `Info-complete-menu-buffer' which contains the buffer in which | 1575 | ;; - `Info-complete-menu-buffer' which contains the buffer in which |
| @@ -1587,7 +1590,7 @@ FOOTNOTENAME may be an abbreviation of the reference name." | |||
| 1587 | (concat "\n\\* +" (regexp-quote string) ":") nil t) | 1590 | (concat "\n\\* +" (regexp-quote string) ":") nil t) |
| 1588 | (let ((pattern (concat "\n\\* +\\(" | 1591 | (let ((pattern (concat "\n\\* +\\(" |
| 1589 | (regexp-quote string) | 1592 | (regexp-quote string) |
| 1590 | "[^\t\n]*\\):")) | 1593 | "[^\t\n]*?\\):" Info-node-spec-re)) |
| 1591 | completions) | 1594 | completions) |
| 1592 | ;; Check the cache. | 1595 | ;; Check the cache. |
| 1593 | (if (and (equal (nth 0 Info-complete-cache) Info-current-file) | 1596 | (if (and (equal (nth 0 Info-complete-cache) Info-current-file) |
| @@ -2867,7 +2870,7 @@ the variable `Info-file-list-for-emacs'." | |||
| 2867 | (setq other-tag | 2870 | (setq other-tag |
| 2868 | (cond | 2871 | (cond |
| 2869 | ((memq (char-before) '(nil ?\. ?! )) | 2872 | ((memq (char-before) '(nil ?\. ?! )) |
| 2870 | "See " | 2873 | "See ") |
| 2871 | ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: )) | 2874 | ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: )) |
| 2872 | "see "))) | 2875 | "see "))) |
| 2873 | (goto-char next)) | 2876 | (goto-char next)) |
| @@ -2911,7 +2914,10 @@ the variable `Info-file-list-for-emacs'." | |||
| 2911 | (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) | 2914 | (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) |
| 2912 | (let ((n 0) | 2915 | (let ((n 0) |
| 2913 | cont) | 2916 | cont) |
| 2914 | (while (re-search-forward "^\\* +\\([^:\t\n]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.]\\([ \t]*\\)\\)" nil t) | 2917 | (while (re-search-forward (concat "^\\* +\\([^:\t\n]*\\)\\(:" |
| 2918 | Info-node-spec-re | ||
| 2919 | "\\([ \t]*\\)\\)") | ||
| 2920 | nil t) | ||
| 2915 | (setq n (1+ n)) | 2921 | (setq n (1+ n)) |
| 2916 | (if (zerop (% n 3)) ; visual aids to help with 1-9 keys | 2922 | (if (zerop (% n 3)) ; visual aids to help with 1-9 keys |
| 2917 | (put-text-property (match-beginning 0) | 2923 | (put-text-property (match-beginning 0) |
| @@ -3129,6 +3135,7 @@ Optional THISFILE represends the filename of" | |||
| 3129 | (nreverse completions)))) | 3135 | (nreverse completions)))) |
| 3130 | 3136 | ||
| 3131 | ;;; Info mode node listing | 3137 | ;;; Info mode node listing |
| 3138 | ;; FIXME: Seems not to be used. -stef | ||
| 3132 | (defun Info-speedbar-buttons (buffer) | 3139 | (defun Info-speedbar-buttons (buffer) |
| 3133 | "Create a speedbar display to help navigation in an Info file. | 3140 | "Create a speedbar display to help navigation in an Info file. |
| 3134 | BUFFER is the buffer speedbar is requesting buttons for." | 3141 | BUFFER is the buffer speedbar is requesting buttons for." |