Commit 10a4c11f authored by Jim Blandy's avatar Jim Blandy

*** empty log message ***

parent e652a34a
...@@ -790,11 +790,11 @@ To get more information on the command, use C-h k instead of C-h c. ...@@ -790,11 +790,11 @@ To get more information on the command, use C-h k instead of C-h c.
>> Type C-h k Control-p. >> Type C-h k Control-p.
This displays the documentation of the function, as well as its name, This displays the documentation of the function, as well as its
in an Emacs window. When you are finished reading the output, type name, in an Emacs window. When you are finished reading the
C-x 1 to get rid of the help text. You do not have to do this right output, type C-x 1 to get rid of the help text. You do not have
away. You can do some editing based on the help text before you type to do this right away. You can do some editing while referring
C-x 1. to the help text and then type C-x 1.
Here are some other useful C-h options: Here are some other useful C-h options:
...@@ -811,10 +811,16 @@ Here are some other useful C-h options: ...@@ -811,10 +811,16 @@ Here are some other useful C-h options:
For some commands, Command Apropos will also list a one For some commands, Command Apropos will also list a one
or two character sequence which has the same effect. or two character sequence which has the same effect.
>> Type C-h a file<Return>. You will see a list of all M-x commands >> Type C-h a file<Return>.
with "file" in their names. You will also see commands
like C-x C-f and C-x C-w, listed beside the command names This displays in another window a list of all M-x commands with
find-file and write-file. "file" in their names. You will also see commands like C-x C-f
and C-x C-w, listed beside the command names find-file and
write-file.
>> Type C-M-v to scroll the help window. Do this a few times.
>> Type C-x 1 to delete the help window.
CONCLUSION CONCLUSION
......
...@@ -286,7 +286,16 @@ Redefining FUNCTION also does that." ...@@ -286,7 +286,16 @@ Redefining FUNCTION also does that."
(defun cancel-debug-on-entry (&optional function) (defun cancel-debug-on-entry (&optional function)
"Undo effect of \\[debug-on-entry] on FUNCTION. "Undo effect of \\[debug-on-entry] on FUNCTION.
If argument is nil or an empty string, cancel for all functions." If argument is nil or an empty string, cancel for all functions."
(interactive "aCancel debug on entry (to function): ") (interactive
(list (let ((name
(completing-read "Cancel debug on entry (to function): "
;; Make an "alist" of the functions
;; that now have debug on entry.
(mapcar 'list
(mapcar 'symbol-name
debug-function-list))
nil t nil)))
(if name (intern name)))))
(debugger-reenable) (debugger-reenable)
(if (and function (not (string= function ""))) (if (and function (not (string= function "")))
(progn (progn
......
;; Grand Unified Debugger mode --- run gdb, sdb, dbx under Emacs control ;; Grand Unified Debugger mode --- run gdb, sdb, dbx under Emacs control
;; @(#)gud.el 1.8 ;; @(#)gud.el 1.10
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -85,6 +85,24 @@ This association list has elements of the form ...@@ -85,6 +85,24 @@ This association list has elements of the form
;; gud-<name>-file-visit ;; gud-<name>-file-visit
;; gud-<name>-set-break ;; gud-<name>-set-break
;; ;;
;; The job of the startup-command method is to fire up a copy of the debugger,
;; given an object file and source directory.
;;
;; The job of the marker-filter method is to detect file/line markers in
;; strings and set the global gud-last-frame to indicate what display
;; action (if any) should be triggered by the marker. Note that only
;; whetever the method *returns* is displayed in the buffer; thus, you
;; can filter the debugger's output, interpreting some and passing on
;; the rest.
;;
;; The job of the visit-file method is to visit and return the buffer indicated
;; by the car of gud-tag-frame. This may be a file name, a tag name, or
;; something else.
;;
;; The job of the gud-set-break method is to send the commands necessary
;; to set a breakpoint at a given line in a given source file.
;;
;; Debugger-specific information begins here:
;; ====================================================================== ;; ======================================================================
;; gdb functions ;; gdb functions
...@@ -114,6 +132,7 @@ This association list has elements of the form ...@@ -114,6 +132,7 @@ This association list has elements of the form
(defun gud-gdb-set-break (proc f n) (defun gud-gdb-set-break (proc f n)
(gud-call "break %s:%d" f n)) (gud-call "break %s:%d" f n))
;;;###autoload
(defun gdb (path) (defun gdb (path)
"Run gdb on program FILE in buffer *gud-FILE*. "Run gdb on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory The directory containing FILE becomes the initial working directory
...@@ -162,6 +181,7 @@ and source-file directory for your debugger." ...@@ -162,6 +181,7 @@ and source-file directory for your debugger."
(defun gud-sdb-set-break (proc f n) (defun gud-sdb-set-break (proc f n)
(gud-queue-send (format "e %s" f) (format "%d b" n))) (gud-queue-send (format "e %s" f) (format "%d b" n)))
;;;###autoload
(defun sdb (path) (defun sdb (path)
"Run sdb on program FILE in buffer *gud-FILE*. "Run sdb on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory The directory containing FILE becomes the initial working directory
...@@ -207,6 +227,7 @@ and source-file directory for your debugger." ...@@ -207,6 +227,7 @@ and source-file directory for your debugger."
(defun gud-dbx-set-break (proc f n) (defun gud-dbx-set-break (proc f n)
(gud-call "stop at \"%s\":%d" f n)) (gud-call "stop at \"%s\":%d" f n))
;;;###autoload
(defun dbx (path) (defun dbx (path)
"Run dbx on program FILE in buffer *gud-FILE*. "Run dbx on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory The directory containing FILE becomes the initial working directory
...@@ -225,21 +246,9 @@ and source-file directory for your debugger." ...@@ -225,21 +246,9 @@ and source-file directory for your debugger."
(run-hooks 'dbx-mode-hook) (run-hooks 'dbx-mode-hook)
) )
;; The job of the debugger-startup method is to fire up a copy of the debugger,
;; given an object file and source directory.
;;
;; The job of the marker-filter method is to detect file/line markers in
;; strings and set the global gud-last-frame to indicate what display
;; action (if any) should be triggered by the marker
;;
;; The job of the visit-file method is to visit and return the buffer indicated
;; by the car of gud-tag-frame. This may be a file name, a tag name, or
;; something else.
;;
;; The job of the gud-set-break method is to send the commands necessary
;; to set a breakpoint at a given line in a given source file.
;; ;;
;; End of debugger-specific information ;; End of debugger-specific information
;;
(defvar gud-mode-map nil (defvar gud-mode-map nil
"Keymap for gud-mode.") "Keymap for gud-mode.")
...@@ -519,3 +528,6 @@ It is for customization by you.") ...@@ -519,3 +528,6 @@ It is for customization by you.")
(switch-to-buffer current-gud-buffer) (switch-to-buffer current-gud-buffer)
(goto-char (dot-max)) (goto-char (dot-max))
(insert-string comm))) (insert-string comm)))
;; gud.e ends here
...@@ -41,64 +41,66 @@ from START (inclusive) to END (exclusive)." ...@@ -41,64 +41,66 @@ from START (inclusive) to END (exclusive)."
"Delete comments and quoted strings in an address list ADDRESS. "Delete comments and quoted strings in an address list ADDRESS.
Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR. Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
Return a modified address list." Return a modified address list."
(if mail-use-rfc822 (if (null address)
(progn (require 'rfc822) nil
(mapconcat 'identity (rfc822-addresses address) ", ")) (if mail-use-rfc822
(let (pos) (progn (require 'rfc822)
(string-match "\\`[ \t\n]*" address) (mapconcat 'identity (rfc822-addresses address) ", "))
;; strip surrounding whitespace (let (pos)
(setq address (substring address (string-match "\\`[ \t\n]*" address)
(match-end 0) ;; strip surrounding whitespace
(string-match "[ \t\n]*\\'" address (setq address (substring address
(match-end 0)))) (match-end 0)
(string-match "[ \t\n]*\\'" address
(match-end 0))))
;; Detect nested comments. ;; Detect nested comments.
(if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address) (if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address)
;; Strip nested comments. ;; Strip nested comments.
(save-excursion (save-excursion
(set-buffer (get-buffer-create " *temp*")) (set-buffer (get-buffer-create " *temp*"))
(erase-buffer) (erase-buffer)
(insert address) (insert address)
(set-syntax-table lisp-mode-syntax-table) (set-syntax-table lisp-mode-syntax-table)
(goto-char 1) (goto-char 1)
(while (search-forward "(" nil t) (while (search-forward "(" nil t)
(forward-char -1) (forward-char -1)
(skip-chars-backward " \t") (skip-chars-backward " \t")
(delete-region (point) (delete-region (point)
(save-excursion (forward-sexp 1) (point)))) (save-excursion (forward-sexp 1) (point))))
(setq address (buffer-string)) (setq address (buffer-string))
(erase-buffer)) (erase-buffer))
;; Strip non-nested comments an easier way. ;; Strip non-nested comments an easier way.
(while (setq pos (string-match (while (setq pos (string-match
;; This doesn't hack rfc822 nested comments ;; This doesn't hack rfc822 nested comments
;; `(xyzzy (foo) whinge)' properly. Big deal. ;; `(xyzzy (foo) whinge)' properly. Big deal.
"[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)" "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)"
address)) address))
(setq address (setq address
(mail-string-delete address (mail-string-delete address
pos (match-end 0))))) pos (match-end 0)))))
;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>') ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>')
(setq pos 0) (setq pos 0)
(while (setq pos (string-match (while (setq pos (string-match
"[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*" "[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*"
address pos)) address pos))
;; If the next thing is "@", we have "foo bar"@host. Leave it. ;; If the next thing is "@", we have "foo bar"@host. Leave it.
(if (and (> (length address) (match-end 0)) (if (and (> (length address) (match-end 0))
(= (aref address (match-end 0)) ?@)) (= (aref address (match-end 0)) ?@))
(setq pos (match-end 0)) (setq pos (match-end 0))
(setq address (setq address
(mail-string-delete address (mail-string-delete address
pos (match-end 0))))) pos (match-end 0)))))
;; Retain only part of address in <> delims, if there is such a thing. ;; Retain only part of address in <> delims, if there is such a thing.
(while (setq pos (string-match "\\(,\\|\\`\\)[^,]*<\\([^>,]*>\\)" (while (setq pos (string-match "\\(,\\|\\`\\)[^,]*<\\([^>,]*>\\)"
address)) address))
(let ((junk-beg (match-end 1)) (let ((junk-beg (match-end 1))
(junk-end (match-beginning 2)) (junk-end (match-beginning 2))
(close (match-end 0))) (close (match-end 0)))
(setq address (mail-string-delete address (1- close) close)) (setq address (mail-string-delete address (1- close) close))
(setq address (mail-string-delete address junk-beg junk-end)))) (setq address (mail-string-delete address junk-beg junk-end))))
address))) address))))
(or (and (boundp 'rmail-default-dont-reply-to-names) (or (and (boundp 'rmail-default-dont-reply-to-names)
(not (null rmail-default-dont-reply-to-names))) (not (null rmail-default-dont-reply-to-names)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment