diff options
| author | Karoly Lorentey | 2004-05-24 23:42:52 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-05-24 23:42:52 +0000 |
| commit | ab485478568fb7841ab3e21a33dda44a97257bfb (patch) | |
| tree | a80469bfad74f25f8a7bfb04bfc8daeebc773dbb | |
| parent | 2d2884b5c5f2e1ce27e30123111536f9db8ddfc7 (diff) | |
| parent | 9f438d80644943fa78ee767eeb7cd391dfc1c2bc (diff) | |
| download | emacs-ab485478568fb7841ab3e21a33dda44a97257bfb.tar.gz emacs-ab485478568fb7841ab3e21a33dda44a97257bfb.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-339
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-340
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-341
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-174
| -rw-r--r-- | lisp/ChangeLog | 96 | ||||
| -rw-r--r-- | lisp/add-log.el | 8 | ||||
| -rw-r--r-- | lisp/descr-text.el | 17 | ||||
| -rw-r--r-- | lisp/info.el | 244 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 16 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 242 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 58 | ||||
| -rw-r--r-- | lisp/simple.el | 63 | ||||
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 5 |
11 files changed, 481 insertions, 273 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aea6e7d6d10..dee9b31a93f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,93 @@ | |||
| 1 | 2004-05-24 Nick Roberts <nickrob@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/gdb-ui.el (gdb-breakpoints-mode, gdb-frames-mode) | ||
| 4 | (gdb-locals-mode): Check gud-minor-mode in gud-comint-buffer. | ||
| 5 | |||
| 6 | 2004-05-24 Yoichi NAKAYAMA <yoichi@geiin.org> (tiny change) | ||
| 7 | |||
| 8 | * net/browse-url.el (browse-url-interactive-arg): Enable user to | ||
| 9 | explicitly select the text to be taken as URL. | ||
| 10 | |||
| 11 | 2004-05-23 Juri Linkov <juri@jurta.org> | ||
| 12 | |||
| 13 | * info.el (Info-index-nodes): New var and fun. | ||
| 14 | (Info-goto-index, Info-index, info-apropos) | ||
| 15 | (Info-find-emacs-command-nodes): Rewrite to use Info-index-nodes. | ||
| 16 | (Info-index): Fix docstring. Store and restore Info-history-list. | ||
| 17 | (Info-complete-nodes): New var. | ||
| 18 | (Info-complete-menu-item): Use it. | ||
| 19 | (Info-index-node): New fun. | ||
| 20 | (Info-final-node, Info-forward-node, Info-backward-node) | ||
| 21 | (Info-build-toc, Info-try-follow-nearest-node, Info-fontify-node): | ||
| 22 | Use Info-index-node. | ||
| 23 | (Info-extract-menu-item, Info-extract-menu-counting): Set second | ||
| 24 | arg of `Info-extract-menu-node-name' to non-nil for index nodes. | ||
| 25 | (Info-find-node-2): If a node with period in its name not found, | ||
| 26 | try to find a node without the name part after period. | ||
| 27 | (Info-select-node): Call Info-fontify-node only if | ||
| 28 | Info-fontify-maximum-menu-size is not nil. | ||
| 29 | (info-apropos): Set Info-fontify-maximum-menu-size to nil. | ||
| 30 | (Info-find-emacs-command-nodes, Info-goto-emacs-command-node): | ||
| 31 | Preserve Info-history-list. | ||
| 32 | (Info-toc): Set Info-current-file. | ||
| 33 | (Info-build-toc): Move point to the beginning of the buffer. | ||
| 34 | Add main-file variable. | ||
| 35 | (Info-dir-remove-duplicates, Info-history, Info-toc, info-apropos): | ||
| 36 | Use backslashed representation of the control character ^_. | ||
| 37 | |||
| 38 | * textmodes/texinfmt.el (texinfo-print-index): Print index line | ||
| 39 | numbers in the new Texinfo 4.7 format. | ||
| 40 | |||
| 41 | * add-log.el (change-log-font-lock-keywords): Remove `:' from | ||
| 42 | regexps for function and variable names. | ||
| 43 | |||
| 44 | * descr-text.el (describe-property-list): Add [show] button for | ||
| 45 | `syntax-table' property with action to pp to a separate buffer. | ||
| 46 | (describe-char): Replace search-forward by re-search-forward with | ||
| 47 | whitespace regexp after "character:" to not fail in too narrow | ||
| 48 | windows. | ||
| 49 | |||
| 50 | * simple.el (next-error-find-buffer): Add a rule to return | ||
| 51 | next-error capable buffer if one window on the selected frame | ||
| 52 | displays such buffer. | ||
| 53 | |||
| 54 | 2004-05-23 Nick Roberts <nickrob@gnu.org> | ||
| 55 | |||
| 56 | * progmodes/gdb-ui.el (gdb-server-prefix): New variable. | ||
| 57 | (gud-watch, gdb-send-item, gdb-breakpoints-mode, gdb-frames-mode) | ||
| 58 | (gdb-locals-mode, gdb-send-item, gdb-toggle-breakpoint) | ||
| 59 | (gdb-delete-breakpoint, gdb-frames-select, gdb-threads-buffer) | ||
| 60 | (gdb-registers-buffer, gdb-reset, gdb-assembler-buffer): Handle | ||
| 61 | new value for gud-minor-mode (gdbmi). | ||
| 62 | (gdb-buffer-type, gdb-input-queue, gdb-prompting) | ||
| 63 | (gdb-output-sink, gdb-current-item, gdb-pending-triggers): Change | ||
| 64 | from local to global gdb variable set. | ||
| 65 | (gdb-ann3): Initialise above gdb variable set. | ||
| 66 | (gdb-var-update, gdb-var-update-handler, gdb-enqueue-input) | ||
| 67 | (gdb-dequeue-input, gdb-source, gdb-pre-prompt, gdb-prompt) | ||
| 68 | (gdb-subprompt, gdb-starting, gdb-stopping, gdb-frame-begin) | ||
| 69 | (gdb-stopped, gdb-post-prompt, gdb-concat-output) | ||
| 70 | (def-gdb-auto-update-trigger, def-gdb-auto-update-handler) | ||
| 71 | (gdb-info-locals-handler, gdb-invalidate-assembler) | ||
| 72 | (gdb-get-current-frame, gdb-frame-handler): Handle gdb variable | ||
| 73 | set as global variables. | ||
| 74 | (gdb-get-create-buffer): Don't make gud-comint buffer-local. | ||
| 75 | Handle gdbmi. | ||
| 76 | (gdb-info-breakpoints-custom): Fix regexp. | ||
| 77 | (def-gdb-var): Delete. | ||
| 78 | |||
| 79 | * progmodes/gud.el (gud-menu-map, gud-speedbar-menu-items) | ||
| 80 | (gud-speedbar-buttons, gud-sentinel, gud-display-line) | ||
| 81 | (gud-basic-call): Handle new value for gud-minor-mode (gdbmi) for | ||
| 82 | a new mode. The file (gdb-mi.el) for this mode will be included | ||
| 83 | with the GDB distribution (6.2 onwards) and will use GDB/MI as its | ||
| 84 | primary interface. | ||
| 85 | |||
| 86 | 2004-05-23 Jesper Harder <harder@ifa.au.dk> | ||
| 87 | |||
| 88 | * progmodes/grep.el (grep-tree): Ensure that DIR argument is | ||
| 89 | interpreted as a directory. | ||
| 90 | |||
| 1 | 2004-05-22 Richard M. Stallman <rms@gnu.org> | 91 | 2004-05-22 Richard M. Stallman <rms@gnu.org> |
| 2 | 92 | ||
| 3 | * textmodes/paragraphs.el (sentence-end): Match unicode curly quotes | 93 | * textmodes/paragraphs.el (sentence-end): Match unicode curly quotes |
| @@ -5,9 +95,9 @@ | |||
| 5 | 95 | ||
| 6 | * textmodes/bibtex.el: Use assoc-string, not assoc-ignore-case. | 96 | * textmodes/bibtex.el: Use assoc-string, not assoc-ignore-case. |
| 7 | 97 | ||
| 8 | * progmodes/idlw-shell.el (idlwave-shell-get-object-class): | 98 | * progmodes/idlw-shell.el (idlwave-shell-get-object-class): |
| 9 | Use assoc-string, not assoc-ignore-case. | 99 | Use assoc-string, not assoc-ignore-case. |
| 10 | 100 | ||
| 11 | * progmodes/ada-mode.el: Use assoc-string, not assoc-ignore-case. | 101 | * progmodes/ada-mode.el: Use assoc-string, not assoc-ignore-case. |
| 12 | 102 | ||
| 13 | * emacs-lisp/lisp.el (mark-defun, narrow-to-defun): | 103 | * emacs-lisp/lisp.el (mark-defun, narrow-to-defun): |
| @@ -2757,7 +2847,7 @@ | |||
| 2757 | 2847 | ||
| 2758 | 2004-03-21 Andre Spiegel <spiegel@gnu.org> | 2848 | 2004-03-21 Andre Spiegel <spiegel@gnu.org> |
| 2759 | 2849 | ||
| 2760 | * vc.el Add new optional BUFFER argument to vc-BACKEND-print-log | 2850 | * vc.el: Add new optional BUFFER argument to vc-BACKEND-print-log |
| 2761 | and vc-BACKEND-diff. | 2851 | and vc-BACKEND-diff. |
| 2762 | (vc-print-log): If the print-log implementation supports it, use | 2852 | (vc-print-log): If the print-log implementation supports it, use |
| 2763 | the new BUFFER argument to direct output to *vc-change-log*, not *vc*. | 2853 | the new BUFFER argument to direct output to *vc-change-log*, not *vc*. |
diff --git a/lisp/add-log.el b/lisp/add-log.el index ead1fe679d6..3c29e8a465e 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -230,13 +230,13 @@ Note: The search is conducted only within 10%, at the beginning of the file." | |||
| 230 | ;; Possibly further names in a list: | 230 | ;; Possibly further names in a list: |
| 231 | ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face)) | 231 | ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face)) |
| 232 | ;; Possibly a parenthesized list of names: | 232 | ;; Possibly a parenthesized list of names: |
| 233 | ("\\= (\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face)) | 233 | ("\\= (\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face)) |
| 234 | ("\\=, *\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face))) | 234 | ("\\=, *\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face))) |
| 235 | ;; | 235 | ;; |
| 236 | ;; Function or variable names. | 236 | ;; Function or variable names. |
| 237 | ("^\t(\\([^) ,:\n]+\\)" | 237 | ("^\t(\\([^) ,\n]+\\)" |
| 238 | (1 'change-log-list-face) | 238 | (1 'change-log-list-face) |
| 239 | ("\\=, *\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face))) | 239 | ("\\=, *\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face))) |
| 240 | ;; | 240 | ;; |
| 241 | ;; Conditionals. | 241 | ;; Conditionals. |
| 242 | ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals-face)) | 242 | ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals-face)) |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 75ce294dad6..c4758a081ce 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -111,7 +111,8 @@ into widget buttons that call `describe-text-category' or | |||
| 111 | (setq key (pop properties) | 111 | (setq key (pop properties) |
| 112 | val (pop properties) | 112 | val (pop properties) |
| 113 | len 0) | 113 | len 0) |
| 114 | (unless (or (memq key '(category face font-lock-face)) | 114 | (unless (or (memq key '(category face font-lock-face |
| 115 | syntax-table)) | ||
| 115 | (widgetp val)) | 116 | (widgetp val)) |
| 116 | (setq val (pp-to-string val) | 117 | (setq val (pp-to-string val) |
| 117 | len (length val))) | 118 | len (length val))) |
| @@ -134,7 +135,15 @@ into widget buttons that call `describe-text-category' or | |||
| 134 | :notify `(lambda (&rest ignore) | 135 | :notify `(lambda (&rest ignore) |
| 135 | (describe-face ',value)) | 136 | (describe-face ',value)) |
| 136 | (format "%S" value))) | 137 | (format "%S" value))) |
| 137 | ((widgetp value) | 138 | ((eq key 'syntax-table) |
| 139 | (widget-create 'push-button | ||
| 140 | :tag "show" | ||
| 141 | :action (lambda (widget &optional event) | ||
| 142 | (with-output-to-temp-buffer | ||
| 143 | "*Pp Eval Output*" | ||
| 144 | (pp (widget-get widget :value)))) | ||
| 145 | value)) | ||
| 146 | ((widgetp value) | ||
| 138 | (describe-text-widget value)) | 147 | (describe-text-widget value)) |
| 139 | (t | 148 | (t |
| 140 | (widget-insert value)))) | 149 | (widget-insert value)))) |
| @@ -476,7 +485,7 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 476 | (encode-char char 'ucs)))) | 485 | (encode-char char 'ucs)))) |
| 477 | (setq item-list | 486 | (setq item-list |
| 478 | `(("character" | 487 | `(("character" |
| 479 | ,(format "%s (0%o, %d, 0x%x%s)" | 488 | ,(format "%s (0%o, %d, 0x%x%s)" |
| 480 | (apply 'propertize (if (not multibyte-p) | 489 | (apply 'propertize (if (not multibyte-p) |
| 481 | (single-key-description char) | 490 | (single-key-description char) |
| 482 | (if (< char 128) | 491 | (if (< char 128) |
| @@ -598,7 +607,7 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 598 | 607 | ||
| 599 | (save-excursion | 608 | (save-excursion |
| 600 | (goto-char (point-min)) | 609 | (goto-char (point-min)) |
| 601 | (search-forward "character: ") | 610 | (re-search-forward "character:[ \t\n]+") |
| 602 | (setq pos (point))) | 611 | (setq pos (point))) |
| 603 | (if overlays | 612 | (if overlays |
| 604 | (mapc #'(lambda (props) | 613 | (mapc #'(lambda (props) |
diff --git a/lisp/info.el b/lisp/info.el index 085be1ae897..9f32c17b544 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -863,9 +863,17 @@ a case-insensitive match is tried." | |||
| 863 | (let ((pos (Info-find-node-in-buffer regexp))) | 863 | (let ((pos (Info-find-node-in-buffer regexp))) |
| 864 | (when pos | 864 | (when pos |
| 865 | (goto-char pos) | 865 | (goto-char pos) |
| 866 | (throw 'foo t)) | 866 | (throw 'foo t))) |
| 867 | ;; No such anchor in tag table or node in tag table or file | 867 | |
| 868 | (error "No such node or anchor: %s" nodename))) | 868 | (when (string-match "\\([^.]+\\)\\." nodename) |
| 869 | (let (Info-point-loc) | ||
| 870 | (Info-find-node-2 | ||
| 871 | filename (match-string 1 nodename) no-going-back)) | ||
| 872 | (widen) | ||
| 873 | (throw 'foo t)) | ||
| 874 | |||
| 875 | ;; No such anchor in tag table or node in tag table or file | ||
| 876 | (error "No such node or anchor: %s" nodename)) | ||
| 869 | 877 | ||
| 870 | (Info-select-node) | 878 | (Info-select-node) |
| 871 | (goto-char (point-min)) | 879 | (goto-char (point-min)) |
| @@ -1075,7 +1083,7 @@ a case-insensitive match is tried." | |||
| 1075 | (goto-char (point-min)) | 1083 | (goto-char (point-min)) |
| 1076 | ;; Remove duplicate headings in the same menu. | 1084 | ;; Remove duplicate headings in the same menu. |
| 1077 | (while (search-forward "\n* Menu:" nil t) | 1085 | (while (search-forward "\n* Menu:" nil t) |
| 1078 | (setq limit (save-excursion (search-forward "\n" nil t))) | 1086 | (setq limit (save-excursion (search-forward "\n\^_" nil t))) |
| 1079 | ;; Look for the next heading to unify. | 1087 | ;; Look for the next heading to unify. |
| 1080 | (while (re-search-forward "^\\(\\w.*\\)\n\\*" limit t) | 1088 | (while (re-search-forward "^\\(\\w.*\\)\n\\*" limit t) |
| 1081 | (let ((name (match-string 1)) | 1089 | (let ((name (match-string 1)) |
| @@ -1286,7 +1294,8 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." | |||
| 1286 | (let ((new-history (list Info-current-file Info-current-node))) | 1294 | (let ((new-history (list Info-current-file Info-current-node))) |
| 1287 | (setq Info-history-list | 1295 | (setq Info-history-list |
| 1288 | (cons new-history (delete new-history Info-history-list)))) | 1296 | (cons new-history (delete new-history Info-history-list)))) |
| 1289 | (Info-fontify-node) | 1297 | (if (not (eq Info-fontify-maximum-menu-size nil)) |
| 1298 | (Info-fontify-node)) | ||
| 1290 | (Info-display-images-node) | 1299 | (Info-display-images-node) |
| 1291 | (Info-hide-cookies-node) | 1300 | (Info-hide-cookies-node) |
| 1292 | (run-hooks 'Info-selection-hook))))) | 1301 | (run-hooks 'Info-selection-hook))))) |
| @@ -1646,7 +1655,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1646 | (let ((inhibit-read-only t)) | 1655 | (let ((inhibit-read-only t)) |
| 1647 | (erase-buffer) | 1656 | (erase-buffer) |
| 1648 | (goto-char (point-min)) | 1657 | (goto-char (point-min)) |
| 1649 | (insert "\n\nFile: history Node: Top, Up: (dir)\n\n") | 1658 | (insert "\n\^_\nFile: history Node: Top, Up: (dir)\n\n") |
| 1650 | (insert "Recently Visited Nodes\n**********************\n\n") | 1659 | (insert "Recently Visited Nodes\n**********************\n\n") |
| 1651 | (insert "* Menu:\n\n") | 1660 | (insert "* Menu:\n\n") |
| 1652 | (let ((hl (delete '("history" "Top") Info-history-list))) | 1661 | (let ((hl (delete '("history" "Top") Info-history-list))) |
| @@ -1673,7 +1682,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1673 | (node-list (Info-build-toc curr-file))) | 1682 | (node-list (Info-build-toc curr-file))) |
| 1674 | (erase-buffer) | 1683 | (erase-buffer) |
| 1675 | (goto-char (point-min)) | 1684 | (goto-char (point-min)) |
| 1676 | (insert "\n\nFile: toc Node: Top, Up: (dir)\n\n") | 1685 | (insert "\n\^_\nFile: toc Node: Top, Up: (dir)\n\n") |
| 1677 | (insert "Table of Contents\n*****************\n\n") | 1686 | (insert "Table of Contents\n*****************\n\n") |
| 1678 | (insert "*Note Top::\n") | 1687 | (insert "*Note Top::\n") |
| 1679 | (Info-insert-toc | 1688 | (Info-insert-toc |
| @@ -1682,7 +1691,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1682 | (if (not (bobp)) | 1691 | (if (not (bobp)) |
| 1683 | (let ((Info-hide-note-references 'hide) | 1692 | (let ((Info-hide-note-references 'hide) |
| 1684 | (Info-fontify-visited-nodes nil)) | 1693 | (Info-fontify-visited-nodes nil)) |
| 1685 | (setq Info-current-node "Top") | 1694 | (setq Info-current-file "toc" Info-current-node "Top") |
| 1686 | (Info-fontify-node))) | 1695 | (Info-fontify-node))) |
| 1687 | (goto-char (point-min)) | 1696 | (goto-char (point-min)) |
| 1688 | (if (setq p (search-forward (concat "*Note " curr-node ":") nil t)) | 1697 | (if (setq p (search-forward (concat "*Note " curr-node ":") nil t)) |
| @@ -1707,16 +1716,18 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1707 | (if (equal file "dir") | 1716 | (if (equal file "dir") |
| 1708 | (error "Table of contents for Info directory is not supported yet")) | 1717 | (error "Table of contents for Info directory is not supported yet")) |
| 1709 | (with-temp-buffer | 1718 | (with-temp-buffer |
| 1710 | (let ((default-directory (or (and (stringp file) | 1719 | (let* ((default-directory (or (and (stringp file) |
| 1711 | (file-name-directory | 1720 | (file-name-directory |
| 1712 | (setq file (Info-find-file file)))) | 1721 | (setq file (Info-find-file file)))) |
| 1713 | default-directory)) | 1722 | default-directory)) |
| 1714 | (sections '(("Top" "Top"))) | 1723 | (main-file file) |
| 1715 | nodes subfiles) | 1724 | (sections '(("Top" "Top"))) |
| 1716 | (while (or file subfiles) | 1725 | nodes subfiles) |
| 1717 | (or file (message "Searching subfile %s..." (car subfiles))) | 1726 | (while (or main-file subfiles) |
| 1727 | (or main-file (message "Searching subfile %s..." (car subfiles))) | ||
| 1718 | (erase-buffer) | 1728 | (erase-buffer) |
| 1719 | (info-insert-file-contents (or file (car subfiles))) | 1729 | (info-insert-file-contents (or main-file (car subfiles))) |
| 1730 | (goto-char (point-min)) | ||
| 1720 | (while (and (search-forward "\n\^_\nFile:" nil 'move) | 1731 | (while (and (search-forward "\n\^_\nFile:" nil 'move) |
| 1721 | (search-forward "Node: " nil 'move)) | 1732 | (search-forward "Node: " nil 'move)) |
| 1722 | (let ((nodename (substring-no-properties (Info-following-node-name))) | 1733 | (let ((nodename (substring-no-properties (Info-following-node-name))) |
| @@ -1724,7 +1735,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1724 | (point-max)) 2)) | 1735 | (point-max)) 2)) |
| 1725 | (section "Top") | 1736 | (section "Top") |
| 1726 | menu-items) | 1737 | menu-items) |
| 1727 | (when (and (not (string-match "\\<index\\>" nodename)) | 1738 | (when (and (not (Info-index-node nodename file)) |
| 1728 | (re-search-forward "^\\* Menu:" bound t)) | 1739 | (re-search-forward "^\\* Menu:" bound t)) |
| 1729 | (forward-line 1) | 1740 | (forward-line 1) |
| 1730 | (beginning-of-line) | 1741 | (beginning-of-line) |
| @@ -1756,7 +1767,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1756 | (nreverse menu-items)) | 1767 | (nreverse menu-items)) |
| 1757 | nodes)) | 1768 | nodes)) |
| 1758 | (goto-char bound))) | 1769 | (goto-char bound))) |
| 1759 | (if file | 1770 | (if main-file |
| 1760 | (save-excursion | 1771 | (save-excursion |
| 1761 | (goto-char (point-min)) | 1772 | (goto-char (point-min)) |
| 1762 | (if (search-forward "\n\^_\nIndirect:" nil t) | 1773 | (if (search-forward "\n\^_\nIndirect:" nil t) |
| @@ -1765,7 +1776,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1765 | (setq subfiles (cons (match-string-no-properties 1) | 1776 | (setq subfiles (cons (match-string-no-properties 1) |
| 1766 | subfiles))))) | 1777 | subfiles))))) |
| 1767 | (setq subfiles (nreverse subfiles) | 1778 | (setq subfiles (nreverse subfiles) |
| 1768 | file nil)) | 1779 | main-file nil)) |
| 1769 | (setq subfiles (cdr subfiles)))) | 1780 | (setq subfiles (cdr subfiles)))) |
| 1770 | (message "") | 1781 | (message "") |
| 1771 | (nreverse nodes)))) | 1782 | (nreverse nodes)))) |
| @@ -1907,6 +1918,7 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1907 | 1918 | ||
| 1908 | (defvar Info-complete-menu-buffer) | 1919 | (defvar Info-complete-menu-buffer) |
| 1909 | (defvar Info-complete-next-re nil) | 1920 | (defvar Info-complete-next-re nil) |
| 1921 | (defvar Info-complete-nodes nil) | ||
| 1910 | (defvar Info-complete-cache nil) | 1922 | (defvar Info-complete-cache nil) |
| 1911 | 1923 | ||
| 1912 | (defconst Info-node-spec-re | 1924 | (defconst Info-node-spec-re |
| @@ -1920,6 +1932,9 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1920 | ;; - `Info-complete-next-re' which, if non-nil, indicates that we should | 1932 | ;; - `Info-complete-next-re' which, if non-nil, indicates that we should |
| 1921 | ;; also look for menu items in subsequent nodes as long as those | 1933 | ;; also look for menu items in subsequent nodes as long as those |
| 1922 | ;; nodes' names match `Info-complete-next-re'. This feature is currently | 1934 | ;; nodes' names match `Info-complete-next-re'. This feature is currently |
| 1935 | ;; not used. | ||
| 1936 | ;; - `Info-complete-nodes' which, if non-nil, indicates that we should | ||
| 1937 | ;; also look for menu items in these nodes. This feature is currently | ||
| 1923 | ;; only used for completion in Info-index. | 1938 | ;; only used for completion in Info-index. |
| 1924 | 1939 | ||
| 1925 | ;; Note that `Info-complete-menu-buffer' could be current already, | 1940 | ;; Note that `Info-complete-menu-buffer' could be current already, |
| @@ -1943,6 +1958,7 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1943 | (if (and (equal (nth 0 Info-complete-cache) Info-current-file) | 1958 | (if (and (equal (nth 0 Info-complete-cache) Info-current-file) |
| 1944 | (equal (nth 1 Info-complete-cache) Info-current-node) | 1959 | (equal (nth 1 Info-complete-cache) Info-current-node) |
| 1945 | (equal (nth 2 Info-complete-cache) Info-complete-next-re) | 1960 | (equal (nth 2 Info-complete-cache) Info-complete-next-re) |
| 1961 | (equal (nth 5 Info-complete-cache) Info-complete-nodes) | ||
| 1946 | (let ((prev (nth 3 Info-complete-cache))) | 1962 | (let ((prev (nth 3 Info-complete-cache))) |
| 1947 | (eq t (compare-strings string 0 (length prev) | 1963 | (eq t (compare-strings string 0 (length prev) |
| 1948 | prev 0 nil t)))) | 1964 | prev 0 nil t)))) |
| @@ -1955,9 +1971,12 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1955 | (push (match-string-no-properties 1) | 1971 | (push (match-string-no-properties 1) |
| 1956 | completions)) | 1972 | completions)) |
| 1957 | ;; Check subsequent nodes if applicable. | 1973 | ;; Check subsequent nodes if applicable. |
| 1958 | (and Info-complete-next-re | 1974 | (or (and Info-complete-next-re |
| 1959 | (setq nextnode (Info-extract-pointer "next" t)) | 1975 | (setq nextnode (Info-extract-pointer "next" t)) |
| 1960 | (string-match Info-complete-next-re nextnode))) | 1976 | (string-match Info-complete-next-re nextnode)) |
| 1977 | (and Info-complete-nodes | ||
| 1978 | (setq Info-complete-nodes (cdr Info-complete-nodes) | ||
| 1979 | nextnode (car Info-complete-nodes))))) | ||
| 1961 | (Info-goto-node nextnode)) | 1980 | (Info-goto-node nextnode)) |
| 1962 | ;; Go back to the start node (for the next completion). | 1981 | ;; Go back to the start node (for the next completion). |
| 1963 | (unless (equal Info-current-node orignode) | 1982 | (unless (equal Info-current-node orignode) |
| @@ -1965,7 +1984,8 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1965 | ;; Update the cache. | 1984 | ;; Update the cache. |
| 1966 | (set (make-local-variable 'Info-complete-cache) | 1985 | (set (make-local-variable 'Info-complete-cache) |
| 1967 | (list Info-current-file Info-current-node | 1986 | (list Info-current-file Info-current-node |
| 1968 | Info-complete-next-re string completions))) | 1987 | Info-complete-next-re string completions |
| 1988 | Info-complete-nodes))) | ||
| 1969 | (if action | 1989 | (if action |
| 1970 | (all-completions string completions predicate) | 1990 | (all-completions string completions predicate) |
| 1971 | (try-completion string completions predicate))))))) | 1991 | (try-completion string completions predicate))))))) |
| @@ -2034,7 +2054,7 @@ new buffer." | |||
| 2034 | (error "No such item in menu")) | 2054 | (error "No such item in menu")) |
| 2035 | (beginning-of-line) | 2055 | (beginning-of-line) |
| 2036 | (forward-char 2) | 2056 | (forward-char 2) |
| 2037 | (Info-extract-menu-node-name))))) | 2057 | (Info-extract-menu-node-name nil (Info-index-node)))))) |
| 2038 | 2058 | ||
| 2039 | ;; If COUNT is nil, use the last item in the menu. | 2059 | ;; If COUNT is nil, use the last item in the menu. |
| 2040 | (defun Info-extract-menu-counting (count) | 2060 | (defun Info-extract-menu-counting (count) |
| @@ -2049,7 +2069,7 @@ new buffer." | |||
| 2049 | (error "Too few items in menu")) | 2069 | (error "Too few items in menu")) |
| 2050 | (while (search-forward "\n* " nil t) | 2070 | (while (search-forward "\n* " nil t) |
| 2051 | nil)) | 2071 | nil)) |
| 2052 | (Info-extract-menu-node-name))))) | 2072 | (Info-extract-menu-node-name nil (Info-index-node)))))) |
| 2053 | 2073 | ||
| 2054 | (defun Info-nth-menu-item () | 2074 | (defun Info-nth-menu-item () |
| 2055 | "Go to the node of the Nth menu item. | 2075 | "Go to the node of the Nth menu item. |
| @@ -2076,7 +2096,7 @@ N is the digit argument used to invoke this command." | |||
| 2076 | ;; move forward until we can't go any farther. | 2096 | ;; move forward until we can't go any farther. |
| 2077 | (while (Info-forward-node t t) nil) | 2097 | (while (Info-forward-node t t) nil) |
| 2078 | ;; Then keep moving down to last subnode, unless we reach an index. | 2098 | ;; Then keep moving down to last subnode, unless we reach an index. |
| 2079 | (while (and (not (string-match "\\<index\\>" Info-current-node)) | 2099 | (while (and (not (Info-index-node)) |
| 2080 | (save-excursion (search-forward "\n* Menu:" nil t))) | 2100 | (save-excursion (search-forward "\n* Menu:" nil t))) |
| 2081 | (Info-goto-node (Info-extract-menu-counting nil))))) | 2101 | (Info-goto-node (Info-extract-menu-counting nil))))) |
| 2082 | 2102 | ||
| @@ -2092,7 +2112,7 @@ N is the digit argument used to invoke this command." | |||
| 2092 | ;; 3. next node is up and next | 2112 | ;; 3. next node is up and next |
| 2093 | (cond ((and (not not-down) | 2113 | (cond ((and (not not-down) |
| 2094 | (save-excursion (search-forward "\n* menu:" nil t)) | 2114 | (save-excursion (search-forward "\n* menu:" nil t)) |
| 2095 | (not (string-match "\\<index\\>" Info-current-node))) | 2115 | (not (Info-index-node))) |
| 2096 | (Info-goto-node (Info-extract-menu-counting 1)) | 2116 | (Info-goto-node (Info-extract-menu-counting 1)) |
| 2097 | t) | 2117 | t) |
| 2098 | ((save-excursion (search-backward "next:" nil t)) | 2118 | ((save-excursion (search-backward "next:" nil t)) |
| @@ -2130,7 +2150,7 @@ N is the digit argument used to invoke this command." | |||
| 2130 | ;; go down to find the last subnode*. | 2150 | ;; go down to find the last subnode*. |
| 2131 | (Info-prev) | 2151 | (Info-prev) |
| 2132 | (let (Info-history) | 2152 | (let (Info-history) |
| 2133 | (while (and (not (string-match "\\<index\\>" Info-current-node)) | 2153 | (while (and (not (Info-index-node)) |
| 2134 | (save-excursion (search-forward "\n* Menu:" nil t))) | 2154 | (save-excursion (search-forward "\n* Menu:" nil t))) |
| 2135 | (Info-goto-node (Info-extract-menu-counting nil))))) | 2155 | (Info-goto-node (Info-extract-menu-counting nil))))) |
| 2136 | (t | 2156 | (t |
| @@ -2321,24 +2341,96 @@ parent node." | |||
| 2321 | (if recur | 2341 | (if recur |
| 2322 | (error "No cross references in this node") | 2342 | (error "No cross references in this node") |
| 2323 | (Info-prev-reference t))))) | 2343 | (Info-prev-reference t))))) |
| 2344 | |||
| 2345 | (defvar Info-index-nodes nil | ||
| 2346 | "Alist of cached index node names of visited Info files. | ||
| 2347 | Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).") | ||
| 2348 | |||
| 2349 | (defun Info-index-nodes (&optional file) | ||
| 2350 | "Return a list of names of all index nodes in Info FILE. | ||
| 2351 | If FILE is omitted, it defaults to the current Info file. | ||
| 2352 | First look in a list of cached index node names. Then scan Info file | ||
| 2353 | and its subfiles for nodes with index cookie. Then try index nodes | ||
| 2354 | starting from the first node in the top level menu whose name | ||
| 2355 | contains the word \"Index\", plus any immediately following nodes | ||
| 2356 | whose names also contain the word \"Index\"." | ||
| 2357 | (or file (setq file Info-current-file)) | ||
| 2358 | (or (assoc file Info-index-nodes) | ||
| 2359 | ;; Skip virtual Info files | ||
| 2360 | (member file '("dir" "history" "toc" "apropos")) | ||
| 2361 | ;; Find nodes with index cookie | ||
| 2362 | (let* ((default-directory (or (and (stringp file) | ||
| 2363 | (file-name-directory | ||
| 2364 | (setq file (Info-find-file file)))) | ||
| 2365 | default-directory)) | ||
| 2366 | (main-file file) | ||
| 2367 | (Info-fontify-maximum-menu-size nil) | ||
| 2368 | subfiles nodes node Info-history Info-history-list) | ||
| 2369 | (with-temp-buffer | ||
| 2370 | (while (or main-file subfiles) | ||
| 2371 | (erase-buffer) | ||
| 2372 | (info-insert-file-contents (or main-file (car subfiles))) | ||
| 2373 | (goto-char (point-min)) | ||
| 2374 | (while (search-forward "\0\10[index\0\10]" nil 'move) | ||
| 2375 | (save-excursion | ||
| 2376 | (re-search-backward "^\^_") | ||
| 2377 | (search-forward "Node: ") | ||
| 2378 | (setq nodes (cons (Info-following-node-name) nodes)))) | ||
| 2379 | (if main-file | ||
| 2380 | (save-excursion | ||
| 2381 | (goto-char (point-min)) | ||
| 2382 | (if (search-forward "\n\^_\nIndirect:" nil t) | ||
| 2383 | (let ((bound (save-excursion (search-forward "\n\^_" nil t)))) | ||
| 2384 | (while (re-search-forward "^\\(.*\\): [0-9]+$" bound t) | ||
| 2385 | (setq subfiles (cons (match-string-no-properties 1) | ||
| 2386 | subfiles))))) | ||
| 2387 | (setq subfiles (nreverse subfiles) | ||
| 2388 | main-file nil)) | ||
| 2389 | (setq subfiles (cdr subfiles))))) | ||
| 2390 | (if nodes | ||
| 2391 | (setq nodes (nreverse nodes) | ||
| 2392 | Info-index-nodes (cons (cons file nodes) Info-index-nodes))) | ||
| 2393 | nodes) | ||
| 2394 | ;; Find nodes with string "Index" in node names | ||
| 2395 | (let ((Info-fontify-maximum-menu-size nil) | ||
| 2396 | (case-fold-search t) | ||
| 2397 | nodes node Info-history Info-history-list) | ||
| 2398 | (with-temp-buffer | ||
| 2399 | (Info-mode) | ||
| 2400 | (Info-find-node file "Top") | ||
| 2401 | (when (and (search-forward "\n* menu:" nil t) | ||
| 2402 | (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t)) | ||
| 2403 | (goto-char (match-beginning 1)) | ||
| 2404 | (setq nodes (list (Info-extract-menu-node-name))) | ||
| 2405 | (Info-goto-node (car nodes)) | ||
| 2406 | (while (and (setq node (Info-extract-pointer "next" t)) | ||
| 2407 | (string-match "\\<Index\\>" node)) | ||
| 2408 | (setq nodes (cons node nodes)) | ||
| 2409 | (Info-goto-node node)))) | ||
| 2410 | (if nodes | ||
| 2411 | (setq nodes (nreverse nodes) | ||
| 2412 | Info-index-nodes (cons (cons file nodes) Info-index-nodes))) | ||
| 2413 | nodes) | ||
| 2414 | ;; Info file has no index nodes | ||
| 2415 | (setq Info-index-nodes (cons (cons file nil) | ||
| 2416 | Info-index-nodes))) | ||
| 2417 | (cdr (assoc file Info-index-nodes))) | ||
| 2418 | |||
| 2419 | (defun Info-index-node (&optional node file) | ||
| 2420 | "Return non-nil value if NODE is an index node. | ||
| 2421 | If NODE is nil, check the current Info node. | ||
| 2422 | If FILE is nil, check the current Info file." | ||
| 2423 | (member (or node Info-current-node) (Info-index-nodes file))) | ||
| 2324 | 2424 | ||
| 2325 | (defun Info-goto-index () | 2425 | (defun Info-goto-index () |
| 2326 | (Info-goto-node "Top") | 2426 | "Go to the first index node." |
| 2327 | (or (search-forward "\n* menu:" nil t) | 2427 | (let ((node (car (Info-index-nodes)))) |
| 2328 | (error "No index")) | 2428 | (or node (error "No index")) |
| 2329 | (or (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t) | 2429 | (Info-goto-node node))) |
| 2330 | (error "No index")) | ||
| 2331 | (goto-char (match-beginning 1)) | ||
| 2332 | ;; Protect Info-history so that the current node (Top) is not added to it. | ||
| 2333 | (let ((Info-history nil)) | ||
| 2334 | (Info-goto-node (Info-extract-menu-node-name)))) | ||
| 2335 | 2430 | ||
| 2336 | ;;;###autoload | 2431 | ;;;###autoload |
| 2337 | (defun Info-index (topic) | 2432 | (defun Info-index (topic) |
| 2338 | "Look up a string TOPIC in the index for this file. | 2433 | "Look up a string TOPIC in the index for this file. |
| 2339 | The index is defined as the first node in the top level menu whose | ||
| 2340 | name contains the word \"Index\", plus any immediately following | ||
| 2341 | nodes whose names also contain the word \"Index\". | ||
| 2342 | If there are no exact matches to the specified topic, this chooses | 2434 | If there are no exact matches to the specified topic, this chooses |
| 2343 | the first match which is a case-insensitive substring of a topic. | 2435 | the first match which is a case-insensitive substring of a topic. |
| 2344 | Use the \\<Info-mode-map>\\[Info-index-next] command to see the other matches. | 2436 | Use the \\<Info-mode-map>\\[Info-index-next] command to see the other matches. |
| @@ -2346,7 +2438,8 @@ Give a blank topic name to go to the Index node itself." | |||
| 2346 | (interactive | 2438 | (interactive |
| 2347 | (list | 2439 | (list |
| 2348 | (let ((Info-complete-menu-buffer (clone-buffer)) | 2440 | (let ((Info-complete-menu-buffer (clone-buffer)) |
| 2349 | (Info-complete-next-re "\\<Index\\>")) | 2441 | (Info-complete-nodes (Info-index-nodes)) |
| 2442 | (Info-history-list nil)) | ||
| 2350 | (if (equal Info-current-file "dir") | 2443 | (if (equal Info-current-file "dir") |
| 2351 | (error "The Info directory node has no index; use m to select a manual")) | 2444 | (error "The Info directory node has no index; use m to select a manual")) |
| 2352 | (unwind-protect | 2445 | (unwind-protect |
| @@ -2359,7 +2452,8 @@ Give a blank topic name to go to the Index node itself." | |||
| 2359 | (let ((orignode Info-current-node) | 2452 | (let ((orignode Info-current-node) |
| 2360 | (pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?" | 2453 | (pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?" |
| 2361 | (regexp-quote topic))) | 2454 | (regexp-quote topic))) |
| 2362 | node | 2455 | node (nodes (Info-index-nodes)) |
| 2456 | (ohist-list Info-history-list) | ||
| 2363 | (case-fold-search t)) | 2457 | (case-fold-search t)) |
| 2364 | (Info-goto-index) | 2458 | (Info-goto-index) |
| 2365 | (or (equal topic "") | 2459 | (or (equal topic "") |
| @@ -2381,8 +2475,7 @@ Give a blank topic name to go to the Index node itself." | |||
| 2381 | (string-to-number (concat "0" | 2475 | (string-to-number (concat "0" |
| 2382 | (match-string 3)))) | 2476 | (match-string 3)))) |
| 2383 | matches)) | 2477 | matches)) |
| 2384 | (and (setq node (Info-extract-pointer "next" t)) | 2478 | (setq nodes (cdr nodes) node (car nodes))) |
| 2385 | (string-match "\\<Index\\>" node))) | ||
| 2386 | (Info-goto-node node)) | 2479 | (Info-goto-node node)) |
| 2387 | (or matches | 2480 | (or matches |
| 2388 | (progn | 2481 | (progn |
| @@ -2392,6 +2485,7 @@ Give a blank topic name to go to the Index node itself." | |||
| 2392 | (while (setq found (assoc topic matches)) | 2485 | (while (setq found (assoc topic matches)) |
| 2393 | (setq exact (cons found exact) | 2486 | (setq exact (cons found exact) |
| 2394 | matches (delq found matches))) | 2487 | matches (delq found matches))) |
| 2488 | (setq Info-history-list ohist-list) | ||
| 2395 | (setq Info-index-alternatives (nconc exact (nreverse matches))) | 2489 | (setq Info-index-alternatives (nconc exact (nreverse matches))) |
| 2396 | (Info-index-next 0))))) | 2490 | (Info-index-next 0))))) |
| 2397 | 2491 | ||
| @@ -2454,10 +2548,8 @@ Build a menu of the possible matches." | |||
| 2454 | (ohist-list Info-history-list) | 2548 | (ohist-list Info-history-list) |
| 2455 | (current-node Info-current-node) | 2549 | (current-node Info-current-node) |
| 2456 | (current-file Info-current-file) | 2550 | (current-file Info-current-file) |
| 2457 | manuals matches node) | 2551 | manuals matches node nodes) |
| 2458 | (let ((Info-fontify-maximum-menu-size 0) | 2552 | (let ((Info-fontify-maximum-menu-size nil)) |
| 2459 | Info-use-header-lines | ||
| 2460 | Info-hide-note-references) | ||
| 2461 | (Info-directory) | 2553 | (Info-directory) |
| 2462 | (message "Searching indices...") | 2554 | (message "Searching indices...") |
| 2463 | (goto-char (point-min)) | 2555 | (goto-char (point-min)) |
| @@ -2466,25 +2558,22 @@ Build a menu of the possible matches." | |||
| 2466 | (add-to-list 'manuals (match-string 1))) | 2558 | (add-to-list 'manuals (match-string 1))) |
| 2467 | (dolist (manual manuals) | 2559 | (dolist (manual manuals) |
| 2468 | (message "Searching %s" manual) | 2560 | (message "Searching %s" manual) |
| 2469 | (condition-case nil | 2561 | (if (setq nodes (Info-index-nodes (Info-find-file manual))) |
| 2470 | (save-excursion | 2562 | (condition-case nil |
| 2471 | (Info-find-node manual "Top") | 2563 | (save-excursion |
| 2472 | (when (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t) | 2564 | (Info-find-node manual (car nodes)) |
| 2473 | (goto-char (match-beginning 1)) | 2565 | (while |
| 2474 | (Info-goto-node (Info-extract-menu-node-name)) | 2566 | (progn |
| 2475 | (while | 2567 | (goto-char (point-min)) |
| 2476 | (progn | 2568 | (while (re-search-forward pattern nil t) |
| 2477 | (goto-char (point-min)) | 2569 | (add-to-list 'matches |
| 2478 | (while (re-search-forward pattern nil t) | 2570 | (list manual |
| 2479 | (add-to-list 'matches | 2571 | (match-string-no-properties 1) |
| 2480 | (list manual | 2572 | (match-string-no-properties 2) |
| 2481 | (match-string-no-properties 1) | 2573 | (match-string-no-properties 3)))) |
| 2482 | (match-string-no-properties 2) | 2574 | (setq nodes (cdr nodes) node (car nodes))) |
| 2483 | (match-string-no-properties 3)))) | 2575 | (Info-goto-node node))) |
| 2484 | (and (setq node (Info-extract-pointer "next" t)) | 2576 | (error nil))))) |
| 2485 | (string-match "\\<Index\\>" node))) | ||
| 2486 | (Info-goto-node node)))) | ||
| 2487 | (error nil)))) | ||
| 2488 | (Info-goto-node (concat "(" current-file ")" current-node)) | 2577 | (Info-goto-node (concat "(" current-file ")" current-node)) |
| 2489 | (setq Info-history ohist | 2578 | (setq Info-history ohist |
| 2490 | Info-history-list ohist-list) | 2579 | Info-history-list ohist-list) |
| @@ -2493,7 +2582,7 @@ Build a menu of the possible matches." | |||
| 2493 | (message "No matches found") | 2582 | (message "No matches found") |
| 2494 | (with-current-buffer (get-buffer-create " *info-apropos*") | 2583 | (with-current-buffer (get-buffer-create " *info-apropos*") |
| 2495 | (erase-buffer) | 2584 | (erase-buffer) |
| 2496 | (insert "\n\nFile: apropos, Node: Index, Up: (dir)\n") | 2585 | (insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n") |
| 2497 | (insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n") | 2586 | (insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n") |
| 2498 | (dolist (entry matches) | 2587 | (dolist (entry matches) |
| 2499 | (insert | 2588 | (insert |
| @@ -2629,8 +2718,7 @@ if point is in a menu item description, follow that menu item." | |||
| 2629 | ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") | 2718 | ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") |
| 2630 | (beginning-of-line) | 2719 | (beginning-of-line) |
| 2631 | (forward-char 2) | 2720 | (forward-char 2) |
| 2632 | (setq node (Info-extract-menu-node-name | 2721 | (setq node (Info-extract-menu-node-name nil (Info-index-node))) |
| 2633 | nil (string-match "\\<index\\>" Info-current-node))) | ||
| 2634 | (Info-goto-node node fork)) | 2722 | (Info-goto-node node fork)) |
| 2635 | ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) | 2723 | ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) |
| 2636 | (Info-goto-node node fork)) | 2724 | (Info-goto-node node fork)) |
| @@ -3072,8 +3160,9 @@ The locations are of the format used in `Info-history', i.e. | |||
| 3072 | ;; Bind Info-history to nil, to prevent the index nodes from | 3160 | ;; Bind Info-history to nil, to prevent the index nodes from |
| 3073 | ;; getting into the node history. | 3161 | ;; getting into the node history. |
| 3074 | (let ((Info-history nil) | 3162 | (let ((Info-history nil) |
| 3075 | node) | 3163 | (Info-history-list nil) |
| 3076 | (Info-goto-node (Info-extract-menu-node-name)) | 3164 | node (nodes (Info-index-nodes))) |
| 3165 | (Info-goto-node (car nodes)) | ||
| 3077 | (while | 3166 | (while |
| 3078 | (progn | 3167 | (progn |
| 3079 | (goto-char (point-min)) | 3168 | (goto-char (point-min)) |
| @@ -3083,8 +3172,7 @@ The locations are of the format used in `Info-history', i.e. | |||
| 3083 | (match-string-no-properties 2) | 3172 | (match-string-no-properties 2) |
| 3084 | 0) | 3173 | 0) |
| 3085 | where))) | 3174 | where))) |
| 3086 | (and (setq node (Info-extract-pointer "next" t)) | 3175 | (and (setq nodes (cdr nodes) node (car nodes)))) |
| 3087 | (string-match "\\<Index\\>" node))) | ||
| 3088 | (Info-goto-node node))) | 3176 | (Info-goto-node node))) |
| 3089 | where)) | 3177 | where)) |
| 3090 | 3178 | ||
| @@ -3111,7 +3199,7 @@ COMMAND must be a symbol or string." | |||
| 3111 | ;; Bind Info-history to nil, to prevent the last Index node | 3199 | ;; Bind Info-history to nil, to prevent the last Index node |
| 3112 | ;; visited by Info-find-emacs-command-nodes from being | 3200 | ;; visited by Info-find-emacs-command-nodes from being |
| 3113 | ;; pushed onto the history. | 3201 | ;; pushed onto the history. |
| 3114 | (let ((Info-history nil)) | 3202 | (let ((Info-history nil) (Info-history-list nil)) |
| 3115 | (Info-find-node (car (car where)) | 3203 | (Info-find-node (car (car where)) |
| 3116 | (car (cdr (car where))))) | 3204 | (car (cdr (car where))))) |
| 3117 | (if (> num-matches 1) | 3205 | (if (> num-matches 1) |
| @@ -3448,7 +3536,7 @@ Preserve text properties." | |||
| 3448 | (goto-char (point-min)) | 3536 | (goto-char (point-min)) |
| 3449 | (when (and (or not-fontified-p fontify-visited-p) | 3537 | (when (and (or not-fontified-p fontify-visited-p) |
| 3450 | (search-forward "\n* Menu:" nil t) | 3538 | (search-forward "\n* Menu:" nil t) |
| 3451 | (not (string-match "\\<Index\\>" Info-current-node)) | 3539 | (not (Info-index-node)) |
| 3452 | ;; Don't take time to annotate huge menus | 3540 | ;; Don't take time to annotate huge menus |
| 3453 | (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) | 3541 | (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) |
| 3454 | (let ((n 0) | 3542 | (let ((n 0) |
| @@ -3537,7 +3625,7 @@ Preserve text properties." | |||
| 3537 | 3625 | ||
| 3538 | ;; Hide index line numbers | 3626 | ;; Hide index line numbers |
| 3539 | (goto-char (point-min)) | 3627 | (goto-char (point-min)) |
| 3540 | (when (and not-fontified-p (string-match "\\<Index\\>" Info-current-node)) | 3628 | (when (and not-fontified-p (Info-index-node)) |
| 3541 | (while (re-search-forward "[ \t\n]*(line +[0-9]+)" nil t) | 3629 | (while (re-search-forward "[ \t\n]*(line +[0-9]+)" nil t) |
| 3542 | (put-text-property (match-beginning 0) (match-end 0) | 3630 | (put-text-property (match-beginning 0) (match-end 0) |
| 3543 | 'invisible t))) | 3631 | 'invisible t))) |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8000e49c6d8..e98b3d815ab 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -577,13 +577,21 @@ down (this *won't* always work)." | |||
| 577 | 577 | ||
| 578 | (defun browse-url-interactive-arg (prompt) | 578 | (defun browse-url-interactive-arg (prompt) |
| 579 | "Read a URL from the minibuffer, prompting with PROMPT. | 579 | "Read a URL from the minibuffer, prompting with PROMPT. |
| 580 | Default to the URL at or before point. If invoked with a mouse button, | 580 | If `transient-mark-mode' is non-nil and the mark is active, |
| 581 | set point to the position clicked first. Return a list for use in | 581 | defaults to the current region, else to the URL at or before |
| 582 | `interactive' containing the URL and `browse-url-new-window-flag' or its | 582 | point. If invoked with a mouse button, set point to the |
| 583 | position clicked first. Return a list for use in `interactive' | ||
| 584 | containing the URL and `browse-url-new-window-flag' or its | ||
| 583 | negation if a prefix argument was given." | 585 | negation if a prefix argument was given." |
| 584 | (let ((event (elt (this-command-keys) 0))) | 586 | (let ((event (elt (this-command-keys) 0))) |
| 585 | (and (listp event) (mouse-set-point event))) | 587 | (and (listp event) (mouse-set-point event))) |
| 586 | (list (read-string prompt (browse-url-url-at-point)) | 588 | (list (read-string prompt (or (and transient-mark-mode mark-active |
| 589 | ;; rfc2396 Appendix E. | ||
| 590 | (replace-regexp-in-string | ||
| 591 | "[\t\r\f\n ]+" "" | ||
| 592 | (buffer-substring-no-properties | ||
| 593 | (region-beginning) (region-end)))) | ||
| 594 | (browse-url-url-at-point))) | ||
| 587 | (not (eq (null browse-url-new-window-flag) | 595 | (not (eq (null browse-url-new-window-flag) |
| 588 | (null current-prefix-arg))))) | 596 | (null current-prefix-arg))))) |
| 589 | 597 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 1fa6f8f2645..b376c380e98 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -63,7 +63,8 @@ | |||
| 63 | (defvar gdb-overlay-arrow-position nil) | 63 | (defvar gdb-overlay-arrow-position nil) |
| 64 | (defvar gdb-variables '() | 64 | (defvar gdb-variables '() |
| 65 | "A list of variables that are local to the GUD buffer.") | 65 | "A list of variables that are local to the GUD buffer.") |
| 66 | 66 | (defvar gdb-server-prefix nil) | |
| 67 | |||
| 67 | ;;;###autoload | 68 | ;;;###autoload |
| 68 | (defun gdba (command-line) | 69 | (defun gdba (command-line) |
| 69 | "Run gdb on program FILE in buffer *gud-FILE*. | 70 | "Run gdb on program FILE in buffer *gud-FILE*. |
| @@ -73,7 +74,7 @@ and source-file directory for your debugger. | |||
| 73 | If `gdb-many-windows' is nil (the default value) then gdb just | 74 | If `gdb-many-windows' is nil (the default value) then gdb just |
| 74 | pops up the GUD buffer unless `gdb-show-main' is t. In this case | 75 | pops up the GUD buffer unless `gdb-show-main' is t. In this case |
| 75 | it starts with two windows: one displaying the GUD buffer and the | 76 | it starts with two windows: one displaying the GUD buffer and the |
| 76 | other with the source file with the main routine of the debugee. | 77 | other with the source file with the main routine of the inferior. |
| 77 | 78 | ||
| 78 | If `gdb-many-windows' is t, regardless of the value of | 79 | If `gdb-many-windows' is t, regardless of the value of |
| 79 | `gdb-show-main', the layout below will appear unless | 80 | `gdb-show-main', the layout below will appear unless |
| @@ -100,7 +101,7 @@ detailed description of this mode. | |||
| 100 | | | 101 | | |
| 101 | | | 102 | | |
| 102 | --------------------------------------------------------------------- | 103 | --------------------------------------------------------------------- |
| 103 | Source buffer | Input/Output (of debugee) buffer | 104 | Source buffer | Input/Output (of inferior) buffer |
| 104 | | (comint-mode) | 105 | | (comint-mode) |
| 105 | | | 106 | | |
| 106 | | | 107 | | |
| @@ -180,6 +181,11 @@ detailed description of this mode. | |||
| 180 | (setq gdb-var-list nil) | 181 | (setq gdb-var-list nil) |
| 181 | (setq gdb-var-changed nil) | 182 | (setq gdb-var-changed nil) |
| 182 | (setq gdb-first-prompt nil) | 183 | (setq gdb-first-prompt nil) |
| 184 | (setq gdb-prompting nil) | ||
| 185 | (setq gdb-current-item nil) | ||
| 186 | (setq gdb-pending-triggers nil) | ||
| 187 | (setq gdb-output-sink 'user) | ||
| 188 | (setq gdb-server-prefix "server ") | ||
| 183 | ;; | 189 | ;; |
| 184 | (mapc 'make-local-variable gdb-variables) | 190 | (mapc 'make-local-variable gdb-variables) |
| 185 | (setq gdb-buffer-type 'gdba) | 191 | (setq gdb-buffer-type 'gdba) |
| @@ -215,7 +221,10 @@ speedbar." | |||
| 215 | (if (string-equal expr (car var)) (throw 'already-watched nil))) | 221 | (if (string-equal expr (car var)) (throw 'already-watched nil))) |
| 216 | (set-text-properties 0 (length expr) nil expr) | 222 | (set-text-properties 0 (length expr) nil expr) |
| 217 | (gdb-enqueue-input | 223 | (gdb-enqueue-input |
| 218 | (list (concat "server interpreter mi \"-var-create - * " expr "\"\n") | 224 | (list |
| 225 | (if (eq gud-minor-mode 'gdba) | ||
| 226 | (concat "server interpreter mi \"-var-create - * " expr "\"\n") | ||
| 227 | (concat"-var-create - * " expr "\n")) | ||
| 219 | `(lambda () (gdb-var-create-handler ,expr)))))) | 228 | `(lambda () (gdb-var-create-handler ,expr)))))) |
| 220 | (select-window (get-buffer-window gud-comint-buffer 'visible))) | 229 | (select-window (get-buffer-window gud-comint-buffer 'visible))) |
| 221 | 230 | ||
| @@ -308,12 +317,11 @@ speedbar." | |||
| 308 | (setq gdb-var-list (nreverse var-list)))))) | 317 | (setq gdb-var-list (nreverse var-list)))))) |
| 309 | 318 | ||
| 310 | (defun gdb-var-update () | 319 | (defun gdb-var-update () |
| 311 | (if (not (member 'gdb-var-update (gdb-get-pending-triggers))) | 320 | (if (not (member 'gdb-var-update gdb-pending-triggers)) |
| 312 | (progn | 321 | (progn |
| 313 | (gdb-enqueue-input (list "server interpreter mi \"-var-update *\"\n" | 322 | (gdb-enqueue-input (list "server interpreter mi \"-var-update *\"\n" |
| 314 | 'gdb-var-update-handler)) | 323 | 'gdb-var-update-handler)) |
| 315 | (gdb-set-pending-triggers (cons 'gdb-var-update | 324 | (push 'gdb-var-update gdb-pending-triggers)))) |
| 316 | (gdb-get-pending-triggers)))))) | ||
| 317 | 325 | ||
| 318 | (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") | 326 | (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") |
| 319 | 327 | ||
| @@ -327,8 +335,8 @@ speedbar." | |||
| 327 | varnum "\"\n") | 335 | varnum "\"\n") |
| 328 | `(lambda () (gdb-var-evaluate-expression-handler | 336 | `(lambda () (gdb-var-evaluate-expression-handler |
| 329 | ,varnum t))))))) | 337 | ,varnum t))))))) |
| 330 | (gdb-set-pending-triggers | 338 | (setq gdb-pending-triggers |
| 331 | (delq 'gdb-var-update (gdb-get-pending-triggers)))) | 339 | (delq 'gdb-var-update gdb-pending-triggers))) |
| 332 | 340 | ||
| 333 | (defun gdb-var-delete () | 341 | (defun gdb-var-delete () |
| 334 | "Delete watched expression from the speedbar." | 342 | "Delete watched expression from the speedbar." |
| @@ -378,43 +386,17 @@ INDENT is the current indentation depth." | |||
| 378 | (if (string-match (concat token "\\.") (nth 1 var)) | 386 | (if (string-match (concat token "\\.") (nth 1 var)) |
| 379 | (setq gdb-var-list (delq var gdb-var-list)))) | 387 | (setq gdb-var-list (delq var gdb-var-list)))) |
| 380 | (setq gdb-var-changed t)))) | 388 | (setq gdb-var-changed t)))) |
| 381 | |||
| 382 | 389 | ||
| 383 | ;; ====================================================================== | 390 | (defvar gdb-buffer-type nil |
| 384 | ;; | ||
| 385 | ;; In this world, there are gdb variables (of unspecified | ||
| 386 | ;; representation) and buffers associated with those objects. | ||
| 387 | ;; The list of variables is built up by the expansions of | ||
| 388 | ;; def-gdb-variable | ||
| 389 | |||
| 390 | (defmacro def-gdb-var (root-symbol &optional default doc) | ||
| 391 | (let* ((root (symbol-name root-symbol)) | ||
| 392 | (accessor (intern (concat "gdb-get-" root))) | ||
| 393 | (setter (intern (concat "gdb-set-" root))) | ||
| 394 | (name (intern (concat "gdb-" root)))) | ||
| 395 | `(progn | ||
| 396 | (defvar ,name ,default ,doc) | ||
| 397 | (if (not (memq ',name gdb-variables)) | ||
| 398 | (push ',name gdb-variables)) | ||
| 399 | (defun ,accessor () | ||
| 400 | (buffer-local-value ',name gud-comint-buffer)) | ||
| 401 | (defun ,setter (val) | ||
| 402 | (with-current-buffer gud-comint-buffer | ||
| 403 | (setq ,name val)))))) | ||
| 404 | |||
| 405 | (def-gdb-var buffer-type nil | ||
| 406 | "One of the symbols bound in `gdb-buffer-rules'.") | 391 | "One of the symbols bound in `gdb-buffer-rules'.") |
| 407 | 392 | ||
| 408 | (def-gdb-var burst "" | 393 | (defvar gdb-input-queue () |
| 409 | "A string of characters from gdb that have not yet been processed.") | ||
| 410 | |||
| 411 | (def-gdb-var input-queue () | ||
| 412 | "A list of gdb command objects.") | 394 | "A list of gdb command objects.") |
| 413 | 395 | ||
| 414 | (def-gdb-var prompting nil | 396 | (defvar gdb-prompting nil |
| 415 | "True when gdb is idle with no pending input.") | 397 | "True when gdb is idle with no pending input.") |
| 416 | 398 | ||
| 417 | (def-gdb-var output-sink 'user | 399 | (defvar gdb-output-sink 'user |
| 418 | "The disposition of the output of the current gdb command. | 400 | "The disposition of the output of the current gdb command. |
| 419 | Possible values are these symbols: | 401 | Possible values are these symbols: |
| 420 | 402 | ||
| @@ -432,12 +414,14 @@ Possible values are these symbols: | |||
| 432 | gdb mode sends to gdb on its own behalf. | 414 | gdb mode sends to gdb on its own behalf. |
| 433 | post-emacs -- ignore output until the prompt annotation is | 415 | post-emacs -- ignore output until the prompt annotation is |
| 434 | received, then go to USER disposition. | 416 | received, then go to USER disposition. |
| 435 | ") | ||
| 436 | 417 | ||
| 437 | (def-gdb-var current-item nil | 418 | gdba (gdb-ui.el) uses all five values, gdbmi (gdb-mi.el) only two |
| 419 | (user and emacs).") | ||
| 420 | |||
| 421 | (defvar gdb-current-item nil | ||
| 438 | "The most recent command item sent to gdb.") | 422 | "The most recent command item sent to gdb.") |
| 439 | 423 | ||
| 440 | (def-gdb-var pending-triggers '() | 424 | (defvar gdb-pending-triggers '() |
| 441 | "A list of trigger functions that have run later than their output | 425 | "A list of trigger functions that have run later than their output |
| 442 | handlers.") | 426 | handlers.") |
| 443 | 427 | ||
| @@ -481,8 +465,8 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 481 | (set (make-local-variable 'gdb-buffer-type) key) | 465 | (set (make-local-variable 'gdb-buffer-type) key) |
| 482 | (if (cdr (cdr rules)) | 466 | (if (cdr (cdr rules)) |
| 483 | (funcall (car (cdr (cdr rules))))) | 467 | (funcall (car (cdr (cdr rules))))) |
| 484 | (set (make-local-variable 'gud-comint-buffer) gud-comint-buffer) | 468 | (set (make-local-variable 'gud-minor-mode) |
| 485 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 469 | (with-current-buffer gud-comint-buffer gud-minor-mode)) |
| 486 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) | 470 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) |
| 487 | new)))) | 471 | new)))) |
| 488 | 472 | ||
| @@ -550,7 +534,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 550 | (define-key map "\C-c\C-d" 'gdb-inferior-io-eof) | 534 | (define-key map "\C-c\C-d" 'gdb-inferior-io-eof) |
| 551 | map)) | 535 | map)) |
| 552 | 536 | ||
| 553 | (define-derived-mode gdb-inferior-io-mode comint-mode "Debuggee I/O" | 537 | (define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O" |
| 554 | "Major mode for gdb inferior-io." | 538 | "Major mode for gdb inferior-io." |
| 555 | :syntax-table nil :abbrev-table nil | 539 | :syntax-table nil :abbrev-table nil |
| 556 | ;; We want to use comint because it has various nifty and familiar | 540 | ;; We want to use comint because it has various nifty and familiar |
| @@ -622,20 +606,18 @@ This filter may simply queue output for a later time." | |||
| 622 | ;; is a query, or other non-top-level prompt. | 606 | ;; is a query, or other non-top-level prompt. |
| 623 | 607 | ||
| 624 | (defun gdb-enqueue-input (item) | 608 | (defun gdb-enqueue-input (item) |
| 625 | (if (gdb-get-prompting) | 609 | (if gdb-prompting |
| 626 | (progn | 610 | (progn |
| 627 | (gdb-send-item item) | 611 | (gdb-send-item item) |
| 628 | (gdb-set-prompting nil)) | 612 | (setq gdb-prompting nil)) |
| 629 | (gdb-set-input-queue | 613 | (push item gdb-input-queue))) |
| 630 | (cons item (gdb-get-input-queue))))) | ||
| 631 | 614 | ||
| 632 | (defun gdb-dequeue-input () | 615 | (defun gdb-dequeue-input () |
| 633 | (let ((queue (gdb-get-input-queue))) | 616 | (let ((queue gdb-input-queue)) |
| 634 | (and queue | 617 | (and queue |
| 635 | (let ((last (car (last queue)))) | 618 | (let ((last (car (last queue)))) |
| 636 | (unless (nbutlast queue) (gdb-set-input-queue '())) | 619 | (unless (nbutlast queue) (setq gdb-input-queue '())) |
| 637 | last)))) | 620 | last)))) |
| 638 | |||
| 639 | 621 | ||
| 640 | ;; | 622 | ;; |
| 641 | ;; output -- things gdb prints to emacs | 623 | ;; output -- things gdb prints to emacs |
| @@ -664,6 +646,7 @@ This filter may simply queue output for a later time." | |||
| 664 | ("commands" gdb-subprompt) | 646 | ("commands" gdb-subprompt) |
| 665 | ("overload-choice" gdb-subprompt) | 647 | ("overload-choice" gdb-subprompt) |
| 666 | ("query" gdb-subprompt) | 648 | ("query" gdb-subprompt) |
| 649 | ;; Need this prompt for GDB 6.1 | ||
| 667 | ("nquery" gdb-subprompt) | 650 | ("nquery" gdb-subprompt) |
| 668 | ("prompt-for-continue" gdb-subprompt) | 651 | ("prompt-for-continue" gdb-subprompt) |
| 669 | ("post-prompt" gdb-post-prompt) | 652 | ("post-prompt" gdb-post-prompt) |
| @@ -693,87 +676,95 @@ This filter may simply queue output for a later time." | |||
| 693 | (setq gdb-view-source t) | 676 | (setq gdb-view-source t) |
| 694 | ;; cover for auto-display output which comes *before* | 677 | ;; cover for auto-display output which comes *before* |
| 695 | ;; stopped annotation | 678 | ;; stopped annotation |
| 696 | (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user))) | 679 | (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) |
| 697 | 680 | ||
| 698 | (defun gdb-send-item (item) | 681 | (defun gdb-send-item (item) |
| 699 | (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) | 682 | (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) |
| 700 | (gdb-set-current-item item) | 683 | (setq gdb-current-item item) |
| 701 | (if (stringp item) | 684 | (with-current-buffer gud-comint-buffer |
| 702 | (progn | 685 | (if (eq gud-minor-mode 'gdba) |
| 703 | (gdb-set-output-sink 'user) | 686 | (progn |
| 704 | (process-send-string (get-buffer-process gud-comint-buffer) item)) | 687 | (if (stringp item) |
| 705 | (progn | 688 | (progn |
| 689 | (setq gdb-output-sink 'user) | ||
| 690 | (process-send-string (get-buffer-process gud-comint-buffer) item)) | ||
| 691 | (progn | ||
| 692 | (gdb-clear-partial-output) | ||
| 693 | (setq gdb-output-sink 'pre-emacs) | ||
| 694 | (process-send-string (get-buffer-process gud-comint-buffer) | ||
| 695 | (car item))))) | ||
| 696 | ; case: eq gud-minor-mode 'gdbmi | ||
| 706 | (gdb-clear-partial-output) | 697 | (gdb-clear-partial-output) |
| 707 | (gdb-set-output-sink 'pre-emacs) | 698 | (setq gdb-output-sink 'emacs) |
| 708 | (process-send-string (get-buffer-process gud-comint-buffer) | 699 | (process-send-string (get-buffer-process gud-comint-buffer) |
| 709 | (car item))))) | 700 | (car item))))) |
| 710 | 701 | ||
| 711 | (defun gdb-pre-prompt (ignored) | 702 | (defun gdb-pre-prompt (ignored) |
| 712 | "An annotation handler for `pre-prompt'. This terminates the collection of | 703 | "An annotation handler for `pre-prompt'. This terminates the collection of |
| 713 | output from a previous command if that happens to be in effect." | 704 | output from a previous command if that happens to be in effect." |
| 714 | (let ((sink (gdb-get-output-sink))) | 705 | (let ((sink gdb-output-sink)) |
| 715 | (cond | 706 | (cond |
| 716 | ((eq sink 'user) t) | 707 | ((eq sink 'user) t) |
| 717 | ((eq sink 'emacs) | 708 | ((eq sink 'emacs) |
| 718 | (gdb-set-output-sink 'post-emacs)) | 709 | (setq gdb-output-sink 'post-emacs)) |
| 719 | (t | 710 | (t |
| 720 | (gdb-set-output-sink 'user) | 711 | (setq gdb-output-sink 'user) |
| 721 | (error "Phase error in gdb-pre-prompt (got %s)" sink))))) | 712 | (error "Phase error in gdb-pre-prompt (got %s)" sink))))) |
| 722 | 713 | ||
| 723 | (defun gdb-prompt (ignored) | 714 | (defun gdb-prompt (ignored) |
| 724 | "An annotation handler for `prompt'. | 715 | "An annotation handler for `prompt'. |
| 725 | This sends the next command (if any) to gdb." | 716 | This sends the next command (if any) to gdb." |
| 726 | (when gdb-first-prompt (gdb-ann3)) | 717 | (when gdb-first-prompt (gdb-ann3)) |
| 727 | (let ((sink (gdb-get-output-sink))) | 718 | (let ((sink gdb-output-sink)) |
| 728 | (cond | 719 | (cond |
| 729 | ((eq sink 'user) t) | 720 | ((eq sink 'user) t) |
| 730 | ((eq sink 'post-emacs) | 721 | ((eq sink 'post-emacs) |
| 731 | (gdb-set-output-sink 'user) | 722 | (setq gdb-output-sink 'user) |
| 732 | (let ((handler | 723 | (let ((handler |
| 733 | (car (cdr (gdb-get-current-item))))) | 724 | (car (cdr gdb-current-item)))) |
| 734 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 725 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 735 | (funcall handler)))) | 726 | (funcall handler)))) |
| 736 | (t | 727 | (t |
| 737 | (gdb-set-output-sink 'user) | 728 | (setq gdb-output-sink 'user) |
| 738 | (error "Phase error in gdb-prompt (got %s)" sink)))) | 729 | (error "Phase error in gdb-prompt (got %s)" sink)))) |
| 739 | (let ((input (gdb-dequeue-input))) | 730 | (let ((input (gdb-dequeue-input))) |
| 740 | (if input | 731 | (if input |
| 741 | (gdb-send-item input) | 732 | (gdb-send-item input) |
| 742 | (progn | 733 | (progn |
| 743 | (gdb-set-prompting t) | 734 | (setq gdb-prompting t) |
| 744 | (gud-display-frame))))) | 735 | (gud-display-frame))))) |
| 745 | 736 | ||
| 746 | (defun gdb-subprompt (ignored) | 737 | (defun gdb-subprompt (ignored) |
| 747 | "An annotation handler for non-top-level prompts." | 738 | "An annotation handler for non-top-level prompts." |
| 748 | (gdb-set-prompting t)) | 739 | (setq gdb-prompting t)) |
| 749 | 740 | ||
| 750 | (defun gdb-starting (ignored) | 741 | (defun gdb-starting (ignored) |
| 751 | "An annotation handler for `starting'. This says that I/O for the | 742 | "An annotation handler for `starting'. This says that I/O for the |
| 752 | subprocess is now the program being debugged, not GDB." | 743 | subprocess is now the program being debugged, not GDB." |
| 753 | (let ((sink (gdb-get-output-sink))) | 744 | (let ((sink gdb-output-sink)) |
| 754 | (cond | 745 | (cond |
| 755 | ((eq sink 'user) | 746 | ((eq sink 'user) |
| 756 | (progn | 747 | (progn |
| 757 | (setq gud-running t) | 748 | (setq gud-running t) |
| 758 | (if gdb-use-inferior-io-buffer | 749 | (if gdb-use-inferior-io-buffer |
| 759 | (gdb-set-output-sink 'inferior)))) | 750 | (setq gdb-output-sink 'inferior)))) |
| 760 | (t (error "Unexpected `starting' annotation"))))) | 751 | (t (error "Unexpected `starting' annotation"))))) |
| 761 | 752 | ||
| 762 | (defun gdb-stopping (ignored) | 753 | (defun gdb-stopping (ignored) |
| 763 | "An annotation handler for `exited' and other annotations which say that I/O | 754 | "An annotation handler for `exited' and other annotations which say that I/O |
| 764 | for the subprocess is now GDB, not the program being debugged." | 755 | for the subprocess is now GDB, not the program being debugged." |
| 765 | (if gdb-use-inferior-io-buffer | 756 | (if gdb-use-inferior-io-buffer |
| 766 | (let ((sink (gdb-get-output-sink))) | 757 | (let ((sink gdb-output-sink)) |
| 767 | (cond | 758 | (cond |
| 768 | ((eq sink 'inferior) | 759 | ((eq sink 'inferior) |
| 769 | (gdb-set-output-sink 'user)) | 760 | (setq gdb-output-sink 'user)) |
| 770 | (t (error "Unexpected stopping annotation")))))) | 761 | (t (error "Unexpected stopping annotation")))))) |
| 771 | 762 | ||
| 772 | (defun gdb-frame-begin (ignored) | 763 | (defun gdb-frame-begin (ignored) |
| 773 | (let ((sink (gdb-get-output-sink))) | 764 | (let ((sink gdb-output-sink)) |
| 774 | (cond | 765 | (cond |
| 775 | ((eq sink 'inferior) | 766 | ((eq sink 'inferior) |
| 776 | (gdb-set-output-sink 'user)) | 767 | (setq gdb-output-sink 'user)) |
| 777 | ((eq sink 'user) t) | 768 | ((eq sink 'user) t) |
| 778 | ((eq sink 'emacs) t) | 769 | ((eq sink 'emacs) t) |
| 779 | (t (error "Unexpected frame-begin annotation (%S)" sink))))) | 770 | (t (error "Unexpected frame-begin annotation (%S)" sink))))) |
| @@ -782,17 +773,17 @@ for the subprocess is now GDB, not the program being debugged." | |||
| 782 | "An annotation handler for `stopped'. It is just like gdb-stopping, except | 773 | "An annotation handler for `stopped'. It is just like gdb-stopping, except |
| 783 | that if we already set the output sink to 'user in gdb-stopping, that is fine." | 774 | that if we already set the output sink to 'user in gdb-stopping, that is fine." |
| 784 | (setq gud-running nil) | 775 | (setq gud-running nil) |
| 785 | (let ((sink (gdb-get-output-sink))) | 776 | (let ((sink gdb-output-sink)) |
| 786 | (cond | 777 | (cond |
| 787 | ((eq sink 'inferior) | 778 | ((eq sink 'inferior) |
| 788 | (gdb-set-output-sink 'user)) | 779 | (setq gdb-output-sink 'user)) |
| 789 | ((eq sink 'user) t) | 780 | ((eq sink 'user) t) |
| 790 | (t (error "Unexpected stopped annotation"))))) | 781 | (t (error "Unexpected stopped annotation"))))) |
| 791 | 782 | ||
| 792 | (defun gdb-post-prompt (ignored) | 783 | (defun gdb-post-prompt (ignored) |
| 793 | "An annotation handler for `post-prompt'. This begins the collection of | 784 | "An annotation handler for `post-prompt'. This begins the collection of |
| 794 | output from the current command if that happens to be appropriate." | 785 | output from the current command if that happens to be appropriate." |
| 795 | (if (not (gdb-get-pending-triggers)) | 786 | (if (not gdb-pending-triggers) |
| 796 | (progn | 787 | (progn |
| 797 | (gdb-get-current-frame) | 788 | (gdb-get-current-frame) |
| 798 | (gdb-invalidate-frames) | 789 | (gdb-invalidate-frames) |
| @@ -809,13 +800,13 @@ output from the current command if that happens to be appropriate." | |||
| 809 | (dolist (var gdb-var-list) | 800 | (dolist (var gdb-var-list) |
| 810 | (setcar (nthcdr 5 var) nil)))) | 801 | (setcar (nthcdr 5 var) nil)))) |
| 811 | (gdb-var-update)))) | 802 | (gdb-var-update)))) |
| 812 | (let ((sink (gdb-get-output-sink))) | 803 | (let ((sink gdb-output-sink)) |
| 813 | (cond | 804 | (cond |
| 814 | ((eq sink 'user) t) | 805 | ((eq sink 'user) t) |
| 815 | ((eq sink 'pre-emacs) | 806 | ((eq sink 'pre-emacs) |
| 816 | (gdb-set-output-sink 'emacs)) | 807 | (setq gdb-output-sink 'emacs)) |
| 817 | (t | 808 | (t |
| 818 | (gdb-set-output-sink 'user) | 809 | (setq gdb-output-sink 'user) |
| 819 | (error "Phase error in gdb-post-prompt (got %s)" sink))))) | 810 | (error "Phase error in gdb-post-prompt (got %s)" sink))))) |
| 820 | 811 | ||
| 821 | (defun gud-gdba-marker-filter (string) | 812 | (defun gud-gdba-marker-filter (string) |
| @@ -877,7 +868,7 @@ output from the current command if that happens to be appropriate." | |||
| 877 | output)) | 868 | output)) |
| 878 | 869 | ||
| 879 | (defun gdb-concat-output (so-far new) | 870 | (defun gdb-concat-output (so-far new) |
| 880 | (let ((sink (gdb-get-output-sink ))) | 871 | (let ((sink gdb-output-sink)) |
| 881 | (cond | 872 | (cond |
| 882 | ((eq sink 'user) (concat so-far new)) | 873 | ((eq sink 'user) (concat so-far new)) |
| 883 | ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far) | 874 | ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far) |
| @@ -939,19 +930,17 @@ output from the current command if that happens to be appropriate." | |||
| 939 | `(defun ,name (&optional ignored) | 930 | `(defun ,name (&optional ignored) |
| 940 | (if (and (,demand-predicate) | 931 | (if (and (,demand-predicate) |
| 941 | (not (member ',name | 932 | (not (member ',name |
| 942 | (gdb-get-pending-triggers)))) | 933 | gdb-pending-triggers))) |
| 943 | (progn | 934 | (progn |
| 944 | (gdb-enqueue-input | 935 | (gdb-enqueue-input |
| 945 | (list ,gdb-command ',output-handler)) | 936 | (list ,gdb-command ',output-handler)) |
| 946 | (gdb-set-pending-triggers | 937 | (push ',name gdb-pending-triggers))))) |
| 947 | (cons ',name | ||
| 948 | (gdb-get-pending-triggers))))))) | ||
| 949 | 938 | ||
| 950 | (defmacro def-gdb-auto-update-handler (name trigger buf-key custom-defun) | 939 | (defmacro def-gdb-auto-update-handler (name trigger buf-key custom-defun) |
| 951 | `(defun ,name () | 940 | `(defun ,name () |
| 952 | (gdb-set-pending-triggers | 941 | (setq gdb-pending-triggers |
| 953 | (delq ',trigger | 942 | (delq ',trigger |
| 954 | (gdb-get-pending-triggers))) | 943 | gdb-pending-triggers)) |
| 955 | (let ((buf (gdb-get-buffer ',buf-key))) | 944 | (let ((buf (gdb-get-buffer ',buf-key))) |
| 956 | (and buf | 945 | (and buf |
| 957 | (with-current-buffer buf | 946 | (with-current-buffer buf |
| @@ -1083,7 +1072,7 @@ static char *magick[] = { | |||
| 1083 | (dolist (buffer (buffer-list)) | 1072 | (dolist (buffer (buffer-list)) |
| 1084 | (with-current-buffer buffer | 1073 | (with-current-buffer buffer |
| 1085 | (if (and (eq gud-minor-mode 'gdba) | 1074 | (if (and (eq gud-minor-mode 'gdba) |
| 1086 | (not (string-match "^\*" (buffer-name)))) | 1075 | (not (string-match "\\`\\*.+\\*\\'" (buffer-name)))) |
| 1087 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) | 1076 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) |
| 1088 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) | 1077 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) |
| 1089 | (save-excursion | 1078 | (save-excursion |
| @@ -1181,7 +1170,9 @@ static char *magick[] = { | |||
| 1181 | (setq mode-name "Breakpoints") | 1170 | (setq mode-name "Breakpoints") |
| 1182 | (use-local-map gdb-breakpoints-mode-map) | 1171 | (use-local-map gdb-breakpoints-mode-map) |
| 1183 | (setq buffer-read-only t) | 1172 | (setq buffer-read-only t) |
| 1184 | (gdb-invalidate-breakpoints)) | 1173 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1174 | (gdb-invalidate-breakpoints) | ||
| 1175 | (gdbmi-invalidate-breakpoints))) | ||
| 1185 | 1176 | ||
| 1186 | (defun gdb-toggle-breakpoint () | 1177 | (defun gdb-toggle-breakpoint () |
| 1187 | "Enable/disable the breakpoint at current line." | 1178 | "Enable/disable the breakpoint at current line." |
| @@ -1194,8 +1185,8 @@ static char *magick[] = { | |||
| 1194 | (list | 1185 | (list |
| 1195 | (concat | 1186 | (concat |
| 1196 | (if (eq ?y (char-after (match-beginning 2))) | 1187 | (if (eq ?y (char-after (match-beginning 2))) |
| 1197 | "server disable " | 1188 | gdb-server-prefix "disable " |
| 1198 | "server enable ") | 1189 | gdb-server-prefix "enable ") |
| 1199 | (match-string 1) "\n") | 1190 | (match-string 1) "\n") |
| 1200 | 'ignore))))) | 1191 | 'ignore))))) |
| 1201 | 1192 | ||
| @@ -1206,7 +1197,7 @@ static char *magick[] = { | |||
| 1206 | (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) | 1197 | (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) |
| 1207 | (error "Not recognized as break/watchpoint line") | 1198 | (error "Not recognized as break/watchpoint line") |
| 1208 | (gdb-enqueue-input | 1199 | (gdb-enqueue-input |
| 1209 | (list (concat "server delete " (match-string 1) "\n") 'ignore)))) | 1200 | (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)))) |
| 1210 | 1201 | ||
| 1211 | (defun gdb-goto-breakpoint () | 1202 | (defun gdb-goto-breakpoint () |
| 1212 | "Display the breakpoint location specified at current line." | 1203 | "Display the breakpoint location specified at current line." |
| @@ -1299,7 +1290,9 @@ static char *magick[] = { | |||
| 1299 | (setq buffer-read-only t) | 1290 | (setq buffer-read-only t) |
| 1300 | (use-local-map gdb-frames-mode-map) | 1291 | (use-local-map gdb-frames-mode-map) |
| 1301 | (font-lock-mode -1) | 1292 | (font-lock-mode -1) |
| 1302 | (gdb-invalidate-frames)) | 1293 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1294 | (gdb-invalidate-frames) | ||
| 1295 | (gdbmi-invalidate-frames))) | ||
| 1303 | 1296 | ||
| 1304 | (defun gdb-get-frame-number () | 1297 | (defun gdb-get-frame-number () |
| 1305 | (save-excursion | 1298 | (save-excursion |
| @@ -1311,7 +1304,7 @@ static char *magick[] = { | |||
| 1311 | "Select the frame and display the relevant source." | 1304 | "Select the frame and display the relevant source." |
| 1312 | (interactive) | 1305 | (interactive) |
| 1313 | (gdb-enqueue-input | 1306 | (gdb-enqueue-input |
| 1314 | (list (concat "server frame " (gdb-get-frame-number) "\n") 'ignore)) | 1307 | (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) |
| 1315 | (gud-display-frame)) | 1308 | (gud-display-frame)) |
| 1316 | 1309 | ||
| 1317 | (defun gdb-frames-mouse-select (event) | 1310 | (defun gdb-frames-mouse-select (event) |
| @@ -1329,7 +1322,7 @@ static char *magick[] = { | |||
| 1329 | 1322 | ||
| 1330 | (def-gdb-auto-updated-buffer gdb-threads-buffer | 1323 | (def-gdb-auto-updated-buffer gdb-threads-buffer |
| 1331 | gdb-invalidate-threads | 1324 | gdb-invalidate-threads |
| 1332 | "server info threads\n" | 1325 | (concat gdb-server-prefix "info threads\n") |
| 1333 | gdb-info-threads-handler | 1326 | gdb-info-threads-handler |
| 1334 | gdb-info-threads-custom) | 1327 | gdb-info-threads-custom) |
| 1335 | 1328 | ||
| @@ -1370,7 +1363,7 @@ static char *magick[] = { | |||
| 1370 | (defun gdb-threads-mode () | 1363 | (defun gdb-threads-mode () |
| 1371 | "Major mode for gdb frames. | 1364 | "Major mode for gdb frames. |
| 1372 | 1365 | ||
| 1373 | \\{gdb-frames-mode-map}" | 1366 | \\{gdb-threads-mode-map}" |
| 1374 | (setq major-mode 'gdb-threads-mode) | 1367 | (setq major-mode 'gdb-threads-mode) |
| 1375 | (setq mode-name "Threads") | 1368 | (setq mode-name "Threads") |
| 1376 | (setq buffer-read-only t) | 1369 | (setq buffer-read-only t) |
| @@ -1404,7 +1397,7 @@ static char *magick[] = { | |||
| 1404 | 1397 | ||
| 1405 | (def-gdb-auto-updated-buffer gdb-registers-buffer | 1398 | (def-gdb-auto-updated-buffer gdb-registers-buffer |
| 1406 | gdb-invalidate-registers | 1399 | gdb-invalidate-registers |
| 1407 | "server info registers\n" | 1400 | (concat gdb-server-prefix "info registers\n") |
| 1408 | gdb-info-registers-handler | 1401 | gdb-info-registers-handler |
| 1409 | gdb-info-registers-custom) | 1402 | gdb-info-registers-custom) |
| 1410 | 1403 | ||
| @@ -1458,8 +1451,8 @@ static char *magick[] = { | |||
| 1458 | ;; Abbreviate for arrays and structures. | 1451 | ;; Abbreviate for arrays and structures. |
| 1459 | ;; These can be expanded using gud-display. | 1452 | ;; These can be expanded using gud-display. |
| 1460 | (defun gdb-info-locals-handler nil | 1453 | (defun gdb-info-locals-handler nil |
| 1461 | (gdb-set-pending-triggers (delq 'gdb-invalidate-locals | 1454 | (setq gdb-pending-triggers (delq 'gdb-invalidate-locals |
| 1462 | (gdb-get-pending-triggers))) | 1455 | gdb-pending-triggers)) |
| 1463 | (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer))) | 1456 | (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer))) |
| 1464 | (with-current-buffer buf | 1457 | (with-current-buffer buf |
| 1465 | (goto-char (point-min)) | 1458 | (goto-char (point-min)) |
| @@ -1497,7 +1490,9 @@ static char *magick[] = { | |||
| 1497 | (setq mode-name "Locals") | 1490 | (setq mode-name "Locals") |
| 1498 | (setq buffer-read-only t) | 1491 | (setq buffer-read-only t) |
| 1499 | (use-local-map gdb-locals-mode-map) | 1492 | (use-local-map gdb-locals-mode-map) |
| 1500 | (gdb-invalidate-locals)) | 1493 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1494 | (gdb-invalidate-locals) | ||
| 1495 | (gdbmi-invalidate-locals))) | ||
| 1501 | 1496 | ||
| 1502 | (defun gdb-locals-buffer-name () | 1497 | (defun gdb-locals-buffer-name () |
| 1503 | (with-current-buffer gud-comint-buffer | 1498 | (with-current-buffer gud-comint-buffer |
| @@ -1567,24 +1562,22 @@ static char *magick[] = { | |||
| 1567 | `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) | 1562 | `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) |
| 1568 | (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) | 1563 | (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) |
| 1569 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) | 1564 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) |
| 1565 | (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) | ||
| 1570 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 1566 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 1571 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) | 1567 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) |
| 1572 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) | 1568 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) |
| 1573 | (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)) | 1569 | (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))) |
| 1574 | ; (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) | ||
| 1575 | ) | ||
| 1576 | 1570 | ||
| 1577 | (let ((menu (make-sparse-keymap "GDB-Windows"))) | 1571 | (let ((menu (make-sparse-keymap "GDB-Windows"))) |
| 1578 | (define-key gud-menu-map [displays] | 1572 | (define-key gud-menu-map [displays] |
| 1579 | `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) | 1573 | `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) |
| 1580 | (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) | 1574 | (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) |
| 1575 | (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) | ||
| 1581 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) | 1576 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) |
| 1582 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) | 1577 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) |
| 1583 | (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) | 1578 | (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) |
| 1584 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) | 1579 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) |
| 1585 | (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)) | 1580 | (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))) |
| 1586 | ; (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) | ||
| 1587 | ) | ||
| 1588 | 1581 | ||
| 1589 | (let ((menu (make-sparse-keymap "View"))) | 1582 | (let ((menu (make-sparse-keymap "View"))) |
| 1590 | (define-key gud-menu-map [view] | 1583 | (define-key gud-menu-map [view] |
| @@ -1686,7 +1679,7 @@ static char *magick[] = { | |||
| 1686 | "Nil (the default value) means just pop up the GUD buffer | 1679 | "Nil (the default value) means just pop up the GUD buffer |
| 1687 | unless `gdb-show-main' is t. In this case it starts with two | 1680 | unless `gdb-show-main' is t. In this case it starts with two |
| 1688 | windows: one displaying the GUD buffer and the other with the | 1681 | windows: one displaying the GUD buffer and the other with the |
| 1689 | source file with the main routine of the debugee. Non-nil means | 1682 | source file with the main routine of the inferior. Non-nil means |
| 1690 | display the layout shown for `gdba'." | 1683 | display the layout shown for `gdba'." |
| 1691 | :type 'boolean | 1684 | :type 'boolean |
| 1692 | :group 'gud) | 1685 | :group 'gud) |
| @@ -1730,7 +1723,7 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 1730 | (dolist (buffer (buffer-list)) | 1723 | (dolist (buffer (buffer-list)) |
| 1731 | (unless (eq buffer gud-comint-buffer) | 1724 | (unless (eq buffer gud-comint-buffer) |
| 1732 | (with-current-buffer buffer | 1725 | (with-current-buffer buffer |
| 1733 | (if (memq gud-minor-mode '(gdba pdb)) | 1726 | (if (memq gud-minor-mode '(gdbmi gdba)) |
| 1734 | (if (string-match "\\`\\*.+\\*\\'" (buffer-name)) | 1727 | (if (string-match "\\`\\*.+\\*\\'" (buffer-name)) |
| 1735 | (kill-buffer nil) | 1728 | (kill-buffer nil) |
| 1736 | (gdb-remove-breakpoint-icons (point-min) (point-max) t) | 1729 | (gdb-remove-breakpoint-icons (point-min) (point-max) t) |
| @@ -1872,7 +1865,7 @@ BUFFER nil or omitted means use the current buffer." | |||
| 1872 | 1865 | ||
| 1873 | (def-gdb-auto-updated-buffer gdb-assembler-buffer | 1866 | (def-gdb-auto-updated-buffer gdb-assembler-buffer |
| 1874 | gdb-invalidate-assembler | 1867 | gdb-invalidate-assembler |
| 1875 | (concat "server disassemble " gdb-current-address "\n") | 1868 | (concat gdb-server-prefix "disassemble " gdb-current-address "\n") |
| 1876 | gdb-assembler-handler | 1869 | gdb-assembler-handler |
| 1877 | gdb-assembler-custom) | 1870 | gdb-assembler-custom) |
| 1878 | 1871 | ||
| @@ -1956,38 +1949,35 @@ BUFFER nil or omitted means use the current buffer." | |||
| 1956 | (progn | 1949 | (progn |
| 1957 | (unless (string-equal gdb-current-frame gdb-previous-frame) | 1950 | (unless (string-equal gdb-current-frame gdb-previous-frame) |
| 1958 | (if (or (not (member 'gdb-invalidate-assembler | 1951 | (if (or (not (member 'gdb-invalidate-assembler |
| 1959 | (gdb-get-pending-triggers))) | 1952 | gdb-pending-triggers)) |
| 1960 | (not (string-equal gdb-current-address | 1953 | (not (string-equal gdb-current-address |
| 1961 | gdb-previous-address))) | 1954 | gdb-previous-address))) |
| 1962 | (progn | 1955 | (progn |
| 1963 | ;; take previous disassemble command off the queue | 1956 | ;; take previous disassemble command off the queue |
| 1964 | (with-current-buffer gud-comint-buffer | 1957 | (with-current-buffer gud-comint-buffer |
| 1965 | (let ((queue (gdb-get-input-queue)) (item)) | 1958 | (let ((queue gdb-input-queue) (item)) |
| 1966 | (dolist (item queue) | 1959 | (dolist (item queue) |
| 1967 | (if (equal (cdr item) '(gdb-assembler-handler)) | 1960 | (if (equal (cdr item) '(gdb-assembler-handler)) |
| 1968 | (gdb-set-input-queue | 1961 | (setq gdb-input-queue |
| 1969 | (delete item (gdb-get-input-queue))))))) | 1962 | (delete item gdb-input-queue)))))) |
| 1970 | (gdb-enqueue-input | 1963 | (gdb-enqueue-input |
| 1971 | (list (concat "server disassemble " gdb-current-address "\n") | 1964 | (list (concat gdb-server-prefix "disassemble " gdb-current-address "\n") |
| 1972 | 'gdb-assembler-handler)) | 1965 | 'gdb-assembler-handler)) |
| 1973 | (gdb-set-pending-triggers | 1966 | (push 'gdb-invalidate-assembler gdb-pending-triggers) |
| 1974 | (cons 'gdb-invalidate-assembler | ||
| 1975 | (gdb-get-pending-triggers))) | ||
| 1976 | (setq gdb-previous-address gdb-current-address) | 1967 | (setq gdb-previous-address gdb-current-address) |
| 1977 | (setq gdb-previous-frame gdb-current-frame))))))) | 1968 | (setq gdb-previous-frame gdb-current-frame))))))) |
| 1978 | 1969 | ||
| 1979 | (defun gdb-get-current-frame () | 1970 | (defun gdb-get-current-frame () |
| 1980 | (if (not (member 'gdb-get-current-frame (gdb-get-pending-triggers))) | 1971 | (if (not (member 'gdb-get-current-frame gdb-pending-triggers)) |
| 1981 | (progn | 1972 | (progn |
| 1982 | (gdb-enqueue-input | 1973 | (gdb-enqueue-input |
| 1983 | (list (concat "server info frame\n") 'gdb-frame-handler)) | 1974 | (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) |
| 1984 | (gdb-set-pending-triggers | 1975 | (push 'gdb-get-current-frame |
| 1985 | (cons 'gdb-get-current-frame | 1976 | gdb-pending-triggers)))) |
| 1986 | (gdb-get-pending-triggers)))))) | ||
| 1987 | 1977 | ||
| 1988 | (defun gdb-frame-handler () | 1978 | (defun gdb-frame-handler () |
| 1989 | (gdb-set-pending-triggers | 1979 | (setq gdb-pending-triggers |
| 1990 | (delq 'gdb-get-current-frame (gdb-get-pending-triggers))) | 1980 | (delq 'gdb-get-current-frame gdb-pending-triggers)) |
| 1991 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 1981 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 1992 | (goto-char (point-min)) | 1982 | (goto-char (point-min)) |
| 1993 | (forward-line) | 1983 | (forward-line) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 94937ba1e87..c5e322a657a 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -533,7 +533,8 @@ those sub directories of DIR." | |||
| 533 | (files | 533 | (files |
| 534 | (read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): "))) | 534 | (read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): "))) |
| 535 | (dir | 535 | (dir |
| 536 | (read-directory-name "Base directory: " nil default-directory t))) | 536 | (file-name-as-directory |
| 537 | (read-directory-name "Base directory: " nil default-directory t)))) | ||
| 537 | (list regexp files dir))) | 538 | (list regexp files dir))) |
| 538 | (unless grep-tree-command | 539 | (unless grep-tree-command |
| 539 | (grep-compute-defaults)) | 540 | (grep-compute-defaults)) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index eb0b887bdf3..4ea4fcb6ea2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -93,42 +93,43 @@ Used to grey out relevant toolbar icons.") | |||
| 93 | 93 | ||
| 94 | (easy-mmode-defmap gud-menu-map | 94 | (easy-mmode-defmap gud-menu-map |
| 95 | '(([help] menu-item "Help" gdb-goto-info | 95 | '(([help] menu-item "Help" gdb-goto-info |
| 96 | :enable (eq gud-minor-mode 'gdba)) | 96 | :enable (memq gud-minor-mode '(gdbmi gdba))) |
| 97 | ([refresh] "Refresh" . gud-refresh) | 97 | ([refresh] "Refresh" . gud-refresh) |
| 98 | ([run] menu-item "Run" gud-run | 98 | ([run] menu-item "Run" gud-run |
| 99 | :enable (and (not gud-running) | 99 | :enable (and (not gud-running) |
| 100 | (memq gud-minor-mode '(gdba gdb dbx jdb)))) | 100 | (memq gud-minor-mode '(gdbmi gdba gdb dbx jdb)))) |
| 101 | ([until] menu-item "Continue to selection" gud-until | 101 | ([until] menu-item "Continue to selection" gud-until |
| 102 | :enable (and (not gud-running) | 102 | :enable (and (not gud-running) |
| 103 | (memq gud-minor-mode '(gdba gdb perldb)))) | 103 | (memq gud-minor-mode '(gdbmi gdba gdb perldb)))) |
| 104 | ([remove] menu-item "Remove Breakpoint" gud-remove | 104 | ([remove] menu-item "Remove Breakpoint" gud-remove |
| 105 | :enable (not gud-running)) | 105 | :enable (not gud-running)) |
| 106 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak | 106 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak |
| 107 | :enable (memq gud-minor-mode '(gdba gdb sdb xdb bashdb))) | 107 | :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb))) |
| 108 | ([break] menu-item "Set Breakpoint" gud-break | 108 | ([break] menu-item "Set Breakpoint" gud-break |
| 109 | :enable (not gud-running)) | 109 | :enable (not gud-running)) |
| 110 | ([up] menu-item "Up Stack" gud-up | 110 | ([up] menu-item "Up Stack" gud-up |
| 111 | :enable (and (not gud-running) | 111 | :enable (and (not gud-running) |
| 112 | (memq gud-minor-mode | 112 | (memq gud-minor-mode |
| 113 | '(gdba gdb dbx xdb jdb pdb bashdb)))) | 113 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 114 | ([down] menu-item "Down Stack" gud-down | 114 | ([down] menu-item "Down Stack" gud-down |
| 115 | :enable (and (not gud-running) | 115 | :enable (and (not gud-running) |
| 116 | (memq gud-minor-mode | 116 | (memq gud-minor-mode |
| 117 | '(gdba gdb dbx xdb jdb pdb bashdb)))) | 117 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 118 | ([print] menu-item "Print Expression" gud-print | 118 | ([print] menu-item "Print Expression" gud-print |
| 119 | :enable (not gud-running)) | 119 | :enable (not gud-running)) |
| 120 | ([watch] menu-item "Watch Expression" gud-watch | 120 | ([watch] menu-item "Watch Expression" gud-watch |
| 121 | :enable (and (not gud-running) (eq gud-minor-mode 'gdba))) | 121 | :enable (and (not gud-running) |
| 122 | (memq gud-minor-mode '(gdbmi gdba)))) | ||
| 122 | ([finish] menu-item "Finish Function" gud-finish | 123 | ([finish] menu-item "Finish Function" gud-finish |
| 123 | :enable (and (not gud-running) | 124 | :enable (and (not gud-running) |
| 124 | (memq gud-minor-mode | 125 | (memq gud-minor-mode |
| 125 | '(gdba gdb xdb jdb pdb bashdb)))) | 126 | '(gdbmi gdba gdb xdb jdb pdb bashdb)))) |
| 126 | ([stepi] menu-item "Step Instruction" gud-stepi | 127 | ([stepi] menu-item "Step Instruction" gud-stepi |
| 127 | :enable (and (not gud-running) | 128 | :enable (and (not gud-running) |
| 128 | (memq gud-minor-mode '(gdba gdb dbx)))) | 129 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) |
| 129 | ([nexti] menu-item "Next Instruction" gud-nexti | 130 | ([nexti] menu-item "Next Instruction" gud-nexti |
| 130 | :enable (and (not gud-running) | 131 | :enable (and (not gud-running) |
| 131 | (memq gud-minor-mode '(gdba gdb dbx)))) | 132 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) |
| 132 | ([step] menu-item "Step Line" gud-step | 133 | ([step] menu-item "Step Line" gud-step |
| 133 | :enable (not gud-running)) | 134 | :enable (not gud-running)) |
| 134 | ([next] menu-item "Next Line" gud-next | 135 | ([next] menu-item "Next Line" gud-next |
| @@ -312,11 +313,14 @@ t means that there is no stack, and we are in display-file mode.") | |||
| 312 | (defvar gud-speedbar-menu-items | 313 | (defvar gud-speedbar-menu-items |
| 313 | ;; Note to self. Add expand, and turn off items when not available. | 314 | ;; Note to self. Add expand, and turn off items when not available. |
| 314 | '(["Jump to stack frame" speedbar-edit-line | 315 | '(["Jump to stack frame" speedbar-edit-line |
| 315 | (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))] | 316 | (with-current-buffer gud-comint-buffer |
| 317 | (not (memq gud-minor-mode '(gdbmi gdba))))] | ||
| 316 | ["Edit value" speedbar-edit-line | 318 | ["Edit value" speedbar-edit-line |
| 317 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))] | 319 | (with-current-buffer gud-comint-buffer |
| 320 | (not (memq gud-minor-mode '(gdbmi gdba))))] | ||
| 318 | ["Delete expression" gdb-var-delete | 321 | ["Delete expression" gdb-var-delete |
| 319 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]) | 322 | (with-current-buffer gud-comint-buffer |
| 323 | (not (memq gud-minor-mode '(gdbmi gdba))))]) | ||
| 320 | "Additional menu items to add to the speedbar frame.") | 324 | "Additional menu items to add to the speedbar frame.") |
| 321 | 325 | ||
| 322 | ;; Make sure our special speedbar mode is loaded | 326 | ;; Make sure our special speedbar mode is loaded |
| @@ -330,7 +334,7 @@ If the GUD BUFFER is not running a supported debugger, then turn | |||
| 330 | off the specialized speedbar mode." | 334 | off the specialized speedbar mode." |
| 331 | (let ((minor-mode (with-current-buffer buffer gud-minor-mode))) | 335 | (let ((minor-mode (with-current-buffer buffer gud-minor-mode))) |
| 332 | (cond | 336 | (cond |
| 333 | ((eq minor-mode 'gdba) | 337 | ((memq minor-mode '(gdbmi gdba)) |
| 334 | (when (or gdb-var-changed | 338 | (when (or gdb-var-changed |
| 335 | (not (save-excursion | 339 | (not (save-excursion |
| 336 | (goto-char (point-min)) | 340 | (goto-char (point-min)) |
| @@ -397,7 +401,7 @@ off the specialized speedbar mode." | |||
| 397 | (speedbar-insert-button (car frame) | 401 | (speedbar-insert-button (car frame) |
| 398 | 'speedbar-file-face | 402 | 'speedbar-file-face |
| 399 | 'speedbar-highlight-face | 403 | 'speedbar-highlight-face |
| 400 | (cond ((memq minor-mode '(gdba gdb)) | 404 | (cond ((memq minor-mode '(gdbmi gdba gdb)) |
| 401 | 'gud-gdb-goto-stackframe) | 405 | 'gud-gdb-goto-stackframe) |
| 402 | (t (error "Should never be here"))) | 406 | (t (error "Should never be here"))) |
| 403 | frame t))) | 407 | frame t))) |
| @@ -2511,14 +2515,14 @@ It is saved for when this flag is not set.") | |||
| 2511 | ;; Stop displaying an arrow in a source file. | 2515 | ;; Stop displaying an arrow in a source file. |
| 2512 | (setq overlay-arrow-position nil) | 2516 | (setq overlay-arrow-position nil) |
| 2513 | (set-process-buffer proc nil) | 2517 | (set-process-buffer proc nil) |
| 2514 | (if (eq gud-minor-mode-type 'gdba) | 2518 | (if (memq gud-minor-mode-type '(gdbmi gdba)) |
| 2515 | (gdb-reset) | 2519 | (gdb-reset) |
| 2516 | (gud-reset))) | 2520 | (gud-reset))) |
| 2517 | ((memq (process-status proc) '(signal exit)) | 2521 | ((memq (process-status proc) '(signal exit)) |
| 2518 | ;; Stop displaying an arrow in a source file. | 2522 | ;; Stop displaying an arrow in a source file. |
| 2519 | (setq overlay-arrow-position nil) | 2523 | (setq overlay-arrow-position nil) |
| 2520 | (with-current-buffer gud-comint-buffer | 2524 | (with-current-buffer gud-comint-buffer |
| 2521 | (if (eq gud-minor-mode 'gdba) | 2525 | (if (memq gud-minor-mode-type '(gdbmi gdba)) |
| 2522 | (gdb-reset) | 2526 | (gdb-reset) |
| 2523 | (gud-reset))) | 2527 | (gud-reset))) |
| 2524 | (let* ((obuf (current-buffer))) | 2528 | (let* ((obuf (current-buffer))) |
| @@ -2583,7 +2587,7 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2583 | (with-current-buffer gud-comint-buffer | 2587 | (with-current-buffer gud-comint-buffer |
| 2584 | (gud-find-file true-file))) | 2588 | (gud-find-file true-file))) |
| 2585 | (window (and buffer (or (get-buffer-window buffer) | 2589 | (window (and buffer (or (get-buffer-window buffer) |
| 2586 | (if (eq gud-minor-mode 'gdba) | 2590 | (if (memq gud-minor-mode '(gdbmi gdba)) |
| 2587 | (gdb-display-source-buffer buffer) | 2591 | (gdb-display-source-buffer buffer) |
| 2588 | (display-buffer buffer))))) | 2592 | (display-buffer buffer))))) |
| 2589 | (pos)) | 2593 | (pos)) |
| @@ -2707,7 +2711,7 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2707 | (forward-line 0) | 2711 | (forward-line 0) |
| 2708 | (if (looking-at comint-prompt-regexp) | 2712 | (if (looking-at comint-prompt-regexp) |
| 2709 | (set-marker gud-delete-prompt-marker (point))) | 2713 | (set-marker gud-delete-prompt-marker (point))) |
| 2710 | (if (eq gud-minor-mode 'gdba) | 2714 | (if (memq gud-minor-mode '(gdbmi gdba)) |
| 2711 | (apply comint-input-sender (list proc command)) | 2715 | (apply comint-input-sender (list proc command)) |
| 2712 | (process-send-string proc (concat command "\n"))))))) | 2716 | (process-send-string proc (concat command "\n"))))))) |
| 2713 | 2717 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index fc8553cb133..1a1d80bcd41 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -91,36 +91,49 @@ to navigate in it.") | |||
| 91 | (or (and extra-test (funcall extra-test)) | 91 | (or (and extra-test (funcall extra-test)) |
| 92 | next-error-function))) | 92 | next-error-function))) |
| 93 | 93 | ||
| 94 | ;; Return a next-error capable buffer. | 94 | ;; Return a next-error capable buffer according to the following rules: |
| 95 | ;; If the current buffer is such, return it. | 95 | ;; 1. If the current buffer is a next-error capable buffer, return it. |
| 96 | ;; If next-error-last-buffer is set to a live buffer, use that. | 96 | ;; 2. If one window on the selected frame displays such buffer, return it. |
| 97 | ;; Otherwise, look for a next-error capable buffer and signal an error | 97 | ;; 3. If next-error-last-buffer is set to a live buffer, use that. |
| 98 | ;; if there are none. | 98 | ;; 4. Otherwise, look for a next-error capable buffer in a buffer list. |
| 99 | ;; 5. Signal an error if there are none. | ||
| 99 | (defun next-error-find-buffer (&optional other-buffer extra-test) | 100 | (defun next-error-find-buffer (&optional other-buffer extra-test) |
| 100 | (if (and (not other-buffer) | 101 | (if (and (not other-buffer) |
| 101 | (next-error-buffer-p (current-buffer) extra-test)) | 102 | (next-error-buffer-p (current-buffer) extra-test)) |
| 102 | ;; The current buffer is a next-error capable buffer. | 103 | ;; The current buffer is a next-error capable buffer. |
| 103 | (current-buffer) | 104 | (current-buffer) |
| 104 | (if (and next-error-last-buffer (buffer-name next-error-last-buffer) | 105 | (or |
| 105 | (next-error-buffer-p next-error-last-buffer extra-test) | 106 | (let ((window-buffers |
| 106 | (or (not other-buffer) (not (eq next-error-last-buffer | 107 | (delete-dups |
| 107 | (current-buffer))))) | 108 | (delq nil |
| 108 | next-error-last-buffer | 109 | (mapcar (lambda (w) |
| 109 | (let ((buffers (buffer-list))) | 110 | (and (next-error-buffer-p (window-buffer w) extra-test) |
| 110 | (while (and buffers (or (not (next-error-buffer-p (car buffers) extra-test)) | 111 | (window-buffer w))) |
| 111 | (and other-buffer | 112 | (window-list)))))) |
| 112 | (eq (car buffers) (current-buffer))))) | 113 | (if other-buffer |
| 113 | (setq buffers (cdr buffers))) | 114 | (setq window-buffers (delq (current-buffer) window-buffers))) |
| 114 | (if buffers | 115 | (if (eq (length window-buffers) 1) |
| 115 | (car buffers) | 116 | (car window-buffers))) |
| 116 | (or (and other-buffer | 117 | (if (and next-error-last-buffer (buffer-name next-error-last-buffer) |
| 117 | (next-error-buffer-p (current-buffer) extra-test) | 118 | (next-error-buffer-p next-error-last-buffer extra-test) |
| 118 | ;; The current buffer is a next-error capable buffer. | 119 | (or (not other-buffer) (not (eq next-error-last-buffer |
| 119 | (progn | 120 | (current-buffer))))) |
| 120 | (if other-buffer | 121 | next-error-last-buffer |
| 121 | (message "This is the only next-error capable buffer.")) | 122 | (let ((buffers (buffer-list))) |
| 122 | (current-buffer))) | 123 | (while (and buffers (or (not (next-error-buffer-p (car buffers) extra-test)) |
| 123 | (error "No next-error capable buffer found!"))))))) | 124 | (and other-buffer |
| 125 | (eq (car buffers) (current-buffer))))) | ||
| 126 | (setq buffers (cdr buffers))) | ||
| 127 | (if buffers | ||
| 128 | (car buffers) | ||
| 129 | (or (and other-buffer | ||
| 130 | (next-error-buffer-p (current-buffer) extra-test) | ||
| 131 | ;; The current buffer is a next-error capable buffer. | ||
| 132 | (progn | ||
| 133 | (if other-buffer | ||
| 134 | (message "This is the only next-error capable buffer.")) | ||
| 135 | (current-buffer))) | ||
| 136 | (error "No next-error capable buffer found!")))))))) | ||
| 124 | 137 | ||
| 125 | (defun next-error (arg &optional reset) | 138 | (defun next-error (arg &optional reset) |
| 126 | "Visit next next-error message and corresponding source code. | 139 | "Visit next next-error message and corresponding source code. |
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 3e79d18a108..9a4d30bd904 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -3032,7 +3032,7 @@ Default is to leave paragraph indentation as is." | |||
| 3032 | (indent-to 54) | 3032 | (indent-to 54) |
| 3033 | (insert | 3033 | (insert |
| 3034 | (if (nth 2 (car indexelts)) | 3034 | (if (nth 2 (car indexelts)) |
| 3035 | (format " %d." (nth 2 (car indexelts))) | 3035 | (format " (line %3d)" (1+ (nth 2 (car indexelts)))) |
| 3036 | "") | 3036 | "") |
| 3037 | "\n")) | 3037 | "\n")) |
| 3038 | ;; index entries from @include'd file | 3038 | ;; index entries from @include'd file |
diff --git a/src/ChangeLog b/src/ChangeLog index 68f74e457e9..cbbf4ab09a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-05-23 K,Ba(Broly L,Bu(Brentey <lorentey@elte.hu> (tiny change) | ||
| 2 | |||
| 3 | * coding.c (Fset_safe_terminal_coding_system_internal): Set | ||
| 4 | suppress_error in safe_terminal_coding, not terminal_coding. | ||
| 5 | |||
| 1 | 2004-05-22 Richard M. Stallman <rms@gnu.org> | 6 | 2004-05-22 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * alloc.c (Fmake_string): Doc fix. | 8 | * alloc.c (Fmake_string): Doc fix. |