diff options
| author | Jim Blandy | 1992-01-09 05:06:34 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-01-09 05:06:34 +0000 |
| commit | 10a4c11f7e8d1bcb8448a7771850b95c7c46caba (patch) | |
| tree | 7daac1a5fee21309d54e7cb53ac17e02b9fba11a | |
| parent | e652a34a67f502767cd6e06800690438e4843a18 (diff) | |
| download | emacs-10a4c11f7e8d1bcb8448a7771850b95c7c46caba.tar.gz emacs-10a4c11f7e8d1bcb8448a7771850b95c7c46caba.zip | |
*** empty log message ***
| -rw-r--r-- | etc/TUTORIAL | 24 | ||||
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 11 | ||||
| -rw-r--r-- | lisp/gud.el | 40 | ||||
| -rw-r--r-- | lisp/mail/mail-utils.el | 114 |
4 files changed, 109 insertions, 80 deletions
diff --git a/etc/TUTORIAL b/etc/TUTORIAL index db88bc3ed74..98e1243837a 100644 --- a/etc/TUTORIAL +++ b/etc/TUTORIAL | |||
| @@ -790,11 +790,11 @@ To get more information on the command, use C-h k instead of C-h c. | |||
| 790 | 790 | ||
| 791 | >> Type C-h k Control-p. | 791 | >> Type C-h k Control-p. |
| 792 | 792 | ||
| 793 | This displays the documentation of the function, as well as its name, | 793 | This displays the documentation of the function, as well as its |
| 794 | in an Emacs window. When you are finished reading the output, type | 794 | name, in an Emacs window. When you are finished reading the |
| 795 | C-x 1 to get rid of the help text. You do not have to do this right | 795 | output, type C-x 1 to get rid of the help text. You do not have |
| 796 | away. You can do some editing based on the help text before you type | 796 | to do this right away. You can do some editing while referring |
| 797 | C-x 1. | 797 | to the help text and then type C-x 1. |
| 798 | 798 | ||
| 799 | Here are some other useful C-h options: | 799 | Here are some other useful C-h options: |
| 800 | 800 | ||
| @@ -811,10 +811,16 @@ Here are some other useful C-h options: | |||
| 811 | For some commands, Command Apropos will also list a one | 811 | For some commands, Command Apropos will also list a one |
| 812 | or two character sequence which has the same effect. | 812 | or two character sequence which has the same effect. |
| 813 | 813 | ||
| 814 | >> Type C-h a file<Return>. You will see a list of all M-x commands | 814 | >> Type C-h a file<Return>. |
| 815 | with "file" in their names. You will also see commands | 815 | |
| 816 | like C-x C-f and C-x C-w, listed beside the command names | 816 | This displays in another window a list of all M-x commands with |
| 817 | find-file and write-file. | 817 | "file" in their names. You will also see commands like C-x C-f |
| 818 | and C-x C-w, listed beside the command names find-file and | ||
| 819 | write-file. | ||
| 820 | |||
| 821 | >> Type C-M-v to scroll the help window. Do this a few times. | ||
| 822 | |||
| 823 | >> Type C-x 1 to delete the help window. | ||
| 818 | 824 | ||
| 819 | 825 | ||
| 820 | CONCLUSION | 826 | CONCLUSION |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 1b4ebf8c3b9..ff31feb68ce 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -286,7 +286,16 @@ Redefining FUNCTION also does that." | |||
| 286 | (defun cancel-debug-on-entry (&optional function) | 286 | (defun cancel-debug-on-entry (&optional function) |
| 287 | "Undo effect of \\[debug-on-entry] on FUNCTION. | 287 | "Undo effect of \\[debug-on-entry] on FUNCTION. |
| 288 | If argument is nil or an empty string, cancel for all functions." | 288 | If argument is nil or an empty string, cancel for all functions." |
| 289 | (interactive "aCancel debug on entry (to function): ") | 289 | (interactive |
| 290 | (list (let ((name | ||
| 291 | (completing-read "Cancel debug on entry (to function): " | ||
| 292 | ;; Make an "alist" of the functions | ||
| 293 | ;; that now have debug on entry. | ||
| 294 | (mapcar 'list | ||
| 295 | (mapcar 'symbol-name | ||
| 296 | debug-function-list)) | ||
| 297 | nil t nil))) | ||
| 298 | (if name (intern name))))) | ||
| 290 | (debugger-reenable) | 299 | (debugger-reenable) |
| 291 | (if (and function (not (string= function ""))) | 300 | (if (and function (not (string= function ""))) |
| 292 | (progn | 301 | (progn |
diff --git a/lisp/gud.el b/lisp/gud.el index aebcc68f4ed..172781e0fea 100644 --- a/lisp/gud.el +++ b/lisp/gud.el | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;; Grand Unified Debugger mode --- run gdb, sdb, dbx under Emacs control | 1 | ;; Grand Unified Debugger mode --- run gdb, sdb, dbx under Emacs control |
| 2 | ;; @(#)gud.el 1.8 | 2 | ;; @(#)gud.el 1.10 |
| 3 | 3 | ||
| 4 | ;; This file is part of GNU Emacs. | 4 | ;; This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -85,6 +85,24 @@ This association list has elements of the form | |||
| 85 | ;; gud-<name>-file-visit | 85 | ;; gud-<name>-file-visit |
| 86 | ;; gud-<name>-set-break | 86 | ;; gud-<name>-set-break |
| 87 | ;; | 87 | ;; |
| 88 | ;; The job of the startup-command method is to fire up a copy of the debugger, | ||
| 89 | ;; given an object file and source directory. | ||
| 90 | ;; | ||
| 91 | ;; The job of the marker-filter method is to detect file/line markers in | ||
| 92 | ;; strings and set the global gud-last-frame to indicate what display | ||
| 93 | ;; action (if any) should be triggered by the marker. Note that only | ||
| 94 | ;; whetever the method *returns* is displayed in the buffer; thus, you | ||
| 95 | ;; can filter the debugger's output, interpreting some and passing on | ||
| 96 | ;; the rest. | ||
| 97 | ;; | ||
| 98 | ;; The job of the visit-file method is to visit and return the buffer indicated | ||
| 99 | ;; by the car of gud-tag-frame. This may be a file name, a tag name, or | ||
| 100 | ;; something else. | ||
| 101 | ;; | ||
| 102 | ;; The job of the gud-set-break method is to send the commands necessary | ||
| 103 | ;; to set a breakpoint at a given line in a given source file. | ||
| 104 | ;; | ||
| 105 | ;; Debugger-specific information begins here: | ||
| 88 | 106 | ||
| 89 | ;; ====================================================================== | 107 | ;; ====================================================================== |
| 90 | ;; gdb functions | 108 | ;; gdb functions |
| @@ -114,6 +132,7 @@ This association list has elements of the form | |||
| 114 | (defun gud-gdb-set-break (proc f n) | 132 | (defun gud-gdb-set-break (proc f n) |
| 115 | (gud-call "break %s:%d" f n)) | 133 | (gud-call "break %s:%d" f n)) |
| 116 | 134 | ||
| 135 | ;;;###autoload | ||
| 117 | (defun gdb (path) | 136 | (defun gdb (path) |
| 118 | "Run gdb on program FILE in buffer *gud-FILE*. | 137 | "Run gdb on program FILE in buffer *gud-FILE*. |
| 119 | The directory containing FILE becomes the initial working directory | 138 | The directory containing FILE becomes the initial working directory |
| @@ -162,6 +181,7 @@ and source-file directory for your debugger." | |||
| 162 | (defun gud-sdb-set-break (proc f n) | 181 | (defun gud-sdb-set-break (proc f n) |
| 163 | (gud-queue-send (format "e %s" f) (format "%d b" n))) | 182 | (gud-queue-send (format "e %s" f) (format "%d b" n))) |
| 164 | 183 | ||
| 184 | ;;;###autoload | ||
| 165 | (defun sdb (path) | 185 | (defun sdb (path) |
| 166 | "Run sdb on program FILE in buffer *gud-FILE*. | 186 | "Run sdb on program FILE in buffer *gud-FILE*. |
| 167 | The directory containing FILE becomes the initial working directory | 187 | The directory containing FILE becomes the initial working directory |
| @@ -207,6 +227,7 @@ and source-file directory for your debugger." | |||
| 207 | (defun gud-dbx-set-break (proc f n) | 227 | (defun gud-dbx-set-break (proc f n) |
| 208 | (gud-call "stop at \"%s\":%d" f n)) | 228 | (gud-call "stop at \"%s\":%d" f n)) |
| 209 | 229 | ||
| 230 | ;;;###autoload | ||
| 210 | (defun dbx (path) | 231 | (defun dbx (path) |
| 211 | "Run dbx on program FILE in buffer *gud-FILE*. | 232 | "Run dbx on program FILE in buffer *gud-FILE*. |
| 212 | The directory containing FILE becomes the initial working directory | 233 | The directory containing FILE becomes the initial working directory |
| @@ -225,21 +246,9 @@ and source-file directory for your debugger." | |||
| 225 | (run-hooks 'dbx-mode-hook) | 246 | (run-hooks 'dbx-mode-hook) |
| 226 | ) | 247 | ) |
| 227 | 248 | ||
| 228 | ;; The job of the debugger-startup method is to fire up a copy of the debugger, | ||
| 229 | ;; given an object file and source directory. | ||
| 230 | ;; | ||
| 231 | ;; The job of the marker-filter method is to detect file/line markers in | ||
| 232 | ;; strings and set the global gud-last-frame to indicate what display | ||
| 233 | ;; action (if any) should be triggered by the marker | ||
| 234 | ;; | ||
| 235 | ;; The job of the visit-file method is to visit and return the buffer indicated | ||
| 236 | ;; by the car of gud-tag-frame. This may be a file name, a tag name, or | ||
| 237 | ;; something else. | ||
| 238 | ;; | ||
| 239 | ;; The job of the gud-set-break method is to send the commands necessary | ||
| 240 | ;; to set a breakpoint at a given line in a given source file. | ||
| 241 | ;; | 249 | ;; |
| 242 | ;; End of debugger-specific information | 250 | ;; End of debugger-specific information |
| 251 | ;; | ||
| 243 | 252 | ||
| 244 | (defvar gud-mode-map nil | 253 | (defvar gud-mode-map nil |
| 245 | "Keymap for gud-mode.") | 254 | "Keymap for gud-mode.") |
| @@ -519,3 +528,6 @@ It is for customization by you.") | |||
| 519 | (switch-to-buffer current-gud-buffer) | 528 | (switch-to-buffer current-gud-buffer) |
| 520 | (goto-char (dot-max)) | 529 | (goto-char (dot-max)) |
| 521 | (insert-string comm))) | 530 | (insert-string comm))) |
| 531 | |||
| 532 | ;; gud.e ends here | ||
| 533 | |||
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 320f0967460..4f97f1d3508 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el | |||
| @@ -41,64 +41,66 @@ from START (inclusive) to END (exclusive)." | |||
| 41 | "Delete comments and quoted strings in an address list ADDRESS. | 41 | "Delete comments and quoted strings in an address list ADDRESS. |
| 42 | Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR. | 42 | Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR. |
| 43 | Return a modified address list." | 43 | Return a modified address list." |
| 44 | (if mail-use-rfc822 | 44 | (if (null address) |
| 45 | (progn (require 'rfc822) | 45 | nil |
| 46 | (mapconcat 'identity (rfc822-addresses address) ", ")) | 46 | (if mail-use-rfc822 |
| 47 | (let (pos) | 47 | (progn (require 'rfc822) |
| 48 | (string-match "\\`[ \t\n]*" address) | 48 | (mapconcat 'identity (rfc822-addresses address) ", ")) |
| 49 | ;; strip surrounding whitespace | 49 | (let (pos) |
| 50 | (setq address (substring address | 50 | (string-match "\\`[ \t\n]*" address) |
| 51 | (match-end 0) | 51 | ;; strip surrounding whitespace |
| 52 | (string-match "[ \t\n]*\\'" address | 52 | (setq address (substring address |
| 53 | (match-end 0)))) | 53 | (match-end 0) |
| 54 | (string-match "[ \t\n]*\\'" address | ||
| 55 | (match-end 0)))) | ||
| 54 | 56 | ||
| 55 | ;; Detect nested comments. | 57 | ;; Detect nested comments. |
| 56 | (if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address) | 58 | (if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address) |
| 57 | ;; Strip nested comments. | 59 | ;; Strip nested comments. |
| 58 | (save-excursion | 60 | (save-excursion |
| 59 | (set-buffer (get-buffer-create " *temp*")) | 61 | (set-buffer (get-buffer-create " *temp*")) |
| 60 | (erase-buffer) | 62 | (erase-buffer) |
| 61 | (insert address) | 63 | (insert address) |
| 62 | (set-syntax-table lisp-mode-syntax-table) | 64 | (set-syntax-table lisp-mode-syntax-table) |
| 63 | (goto-char 1) | 65 | (goto-char 1) |
| 64 | (while (search-forward "(" nil t) | 66 | (while (search-forward "(" nil t) |
| 65 | (forward-char -1) | 67 | (forward-char -1) |
| 66 | (skip-chars-backward " \t") | 68 | (skip-chars-backward " \t") |
| 67 | (delete-region (point) | 69 | (delete-region (point) |
| 68 | (save-excursion (forward-sexp 1) (point)))) | 70 | (save-excursion (forward-sexp 1) (point)))) |
| 69 | (setq address (buffer-string)) | 71 | (setq address (buffer-string)) |
| 70 | (erase-buffer)) | 72 | (erase-buffer)) |
| 71 | ;; Strip non-nested comments an easier way. | 73 | ;; Strip non-nested comments an easier way. |
| 72 | (while (setq pos (string-match | 74 | (while (setq pos (string-match |
| 73 | ;; This doesn't hack rfc822 nested comments | 75 | ;; This doesn't hack rfc822 nested comments |
| 74 | ;; `(xyzzy (foo) whinge)' properly. Big deal. | 76 | ;; `(xyzzy (foo) whinge)' properly. Big deal. |
| 75 | "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)" | 77 | "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)" |
| 76 | address)) | 78 | address)) |
| 77 | (setq address | 79 | (setq address |
| 78 | (mail-string-delete address | 80 | (mail-string-delete address |
| 79 | pos (match-end 0))))) | 81 | pos (match-end 0))))) |
| 80 | 82 | ||
| 81 | ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>') | 83 | ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>') |
| 82 | (setq pos 0) | 84 | (setq pos 0) |
| 83 | (while (setq pos (string-match | 85 | (while (setq pos (string-match |
| 84 | "[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*" | 86 | "[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*" |
| 85 | address pos)) | 87 | address pos)) |
| 86 | ;; If the next thing is "@", we have "foo bar"@host. Leave it. | 88 | ;; If the next thing is "@", we have "foo bar"@host. Leave it. |
| 87 | (if (and (> (length address) (match-end 0)) | 89 | (if (and (> (length address) (match-end 0)) |
| 88 | (= (aref address (match-end 0)) ?@)) | 90 | (= (aref address (match-end 0)) ?@)) |
| 89 | (setq pos (match-end 0)) | 91 | (setq pos (match-end 0)) |
| 90 | (setq address | 92 | (setq address |
| 91 | (mail-string-delete address | 93 | (mail-string-delete address |
| 92 | pos (match-end 0))))) | 94 | pos (match-end 0))))) |
| 93 | ;; Retain only part of address in <> delims, if there is such a thing. | 95 | ;; Retain only part of address in <> delims, if there is such a thing. |
| 94 | (while (setq pos (string-match "\\(,\\|\\`\\)[^,]*<\\([^>,]*>\\)" | 96 | (while (setq pos (string-match "\\(,\\|\\`\\)[^,]*<\\([^>,]*>\\)" |
| 95 | address)) | 97 | address)) |
| 96 | (let ((junk-beg (match-end 1)) | 98 | (let ((junk-beg (match-end 1)) |
| 97 | (junk-end (match-beginning 2)) | 99 | (junk-end (match-beginning 2)) |
| 98 | (close (match-end 0))) | 100 | (close (match-end 0))) |
| 99 | (setq address (mail-string-delete address (1- close) close)) | 101 | (setq address (mail-string-delete address (1- close) close)) |
| 100 | (setq address (mail-string-delete address junk-beg junk-end)))) | 102 | (setq address (mail-string-delete address junk-beg junk-end)))) |
| 101 | address))) | 103 | address)))) |
| 102 | 104 | ||
| 103 | (or (and (boundp 'rmail-default-dont-reply-to-names) | 105 | (or (and (boundp 'rmail-default-dont-reply-to-names) |
| 104 | (not (null rmail-default-dont-reply-to-names))) | 106 | (not (null rmail-default-dont-reply-to-names))) |