summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-03-30 00:32:47 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-03-30 00:32:47 +0000
commit41d39f41e3d59b090d4fcc18fff140abd64275af (patch)
tree94f1905d82e00d8450e384361b555a101680761a /lisp
parent2491d293f3e87e0925cd71e9e72ac2edaa94ecc6 (diff)
parentdbefaa008de0ee0997504861950aa4b13178e2dc (diff)
downloademacs-41d39f41e3d59b090d4fcc18fff140abd64275af.tar.gz
emacs-41d39f41e3d59b090d4fcc18fff140abd64275af.tar.bz2
emacs-41d39f41e3d59b090d4fcc18fff140abd64275af.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-175 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-176 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-129
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog28
-rw-r--r--lisp/autorevert.el38
-rw-r--r--lisp/progmodes/compile.el48
-rw-r--r--lisp/progmodes/gdb-ui.el27
-rw-r--r--lisp/vc-hooks.el2
5 files changed, 91 insertions, 52 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab3ac98ea9d..3bb9e41cd2c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,25 @@
+2004-03-28 Nick Roberts <nick@nick.uklinux.net>
+
+ * progmodes/gdb-ui.el (gdb-ann3, gdb-send-item)
+ (gud-gdba-marker-filter): Log the process input and output, if
+ required. (from Stefan Monnier)
+ (gdb-debug-log, gdb-enable-debug-log): New variables.
+ (gdb-post-prompt): Don't do gdb-var-update on Mac OS X.
+
+2004-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-hooks.el (vc-file-not-found-hook): Fix typo.
+ From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly).
+
+2004-03-27 Luc Teirlinck <teirllm@auburn.edu>
+
+ * autorevert.el (auto-revert-handler): Handle auto-revert-mode.
+ Call vc-find-file-hook here instead of in auto-revert-buffers.
+ (auto-revert-buffers): Delete call to vc-find-file-hook.
+ (auto-revert-verbose, global-auto-revert-non-file-buffers)
+ (global-auto-revert-mode, auto-revert-set-timer)
+ (auto-revert-handler, auto-revert-buffers): Doc fixes.
+
2004-03-27 Francis J. Wright <F.J.Wright@qmul.ac.uk>
* woman.el (woman-change-fonts): Rename local variable
@@ -9,8 +31,8 @@
Fix copyright years.
* strokes.el (strokes-global-set-stroke-string): New function.
- (strokes-list-strokes): Cope with strings, not just commands. Set
- foreground colour of image.
+ (strokes-list-strokes): Cope with strings, not just commands.
+ Set foreground colour of image.
(strokes-global-set-stroke): Doc fix.
2004-03-26 Luc Teirlinck <teirllm@auburn.edu>
@@ -31,7 +53,7 @@
before, rather than after, reverting.
(buffer-stale-function): Move to files.el.
- * files.el (buffer-stale-function): Moved here from autorevert.el.
+ * files.el (buffer-stale-function): Move here from autorevert.el.
2004-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 152b21eef84..165c6b8b24f 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -132,9 +132,7 @@ next editing session."
(defcustom auto-revert-verbose t
"When nil, Auto-Revert Mode will not generate any messages.
-
-Currently, messages are generated when the mode is activated or
-deactivated, and whenever a file is reverted."
+When non-nil, a message is generated whenever a file is reverted."
:group 'auto-revert
:type 'boolean)
@@ -170,7 +168,8 @@ would only waste precious space."
"When nil only file buffers are reverted by Global Auto-Revert Mode.
When non-nil, both file buffers and buffers with a custom
-`revert-buffer-function' are reverted by Global Auto-Revert Mode.
+`revert-buffer-function' and a `buffer-stale-function' are
+reverted by Global Auto-Revert Mode.
Use this option with care since it could lead to excessive reverts.
Note also that for some non-file buffers the check whether the
@@ -244,7 +243,7 @@ This function is designed to be added to hooks, for example:
;;;###autoload
(define-minor-mode global-auto-revert-mode
- "Revert any buffer when file on disk change.
+ "Revert any buffer when file on disk changes.
With arg, turn Auto Revert mode on globally if and only if arg is positive.
This is a minor mode that affects all buffers.
@@ -256,7 +255,11 @@ Use `auto-revert-mode' to revert a particular buffer."
(defun auto-revert-set-timer ()
- "Restart or cancel the timer."
+ "Restart or cancel the timer used by Auto-Revert Mode.
+If such a timer is active, cancel it. Start a new timer if
+Global Auto-Revert Mode is active or if Auto-Revert Mode is active
+in some buffer. Restarting the timer ensures that Auto-Revert Mode
+will use an up-to-date value of `auto-revert-interval'"
(interactive)
(if (timerp auto-revert-timer)
(cancel-timer auto-revert-timer))
@@ -331,7 +334,8 @@ Use `auto-revert-mode' to revert a particular buffer."
))))))
(defun auto-revert-handler ()
- "Revert current buffer."
+ "Revert current buffer, if appropriate.
+This is an internal function used by Auto-Revert Mode."
(unless (buffer-modified-p)
(let (revert)
(cond
@@ -341,7 +345,7 @@ Use `auto-revert-mode' to revert a particular buffer."
((or (and (buffer-file-name)
(file-readable-p (buffer-file-name))
(not (verify-visited-file-modtime (current-buffer))))
- (and global-auto-revert-non-file-buffers
+ (and (or auto-revert-mode global-auto-revert-non-file-buffers)
revert-buffer-function
(boundp 'buffer-stale-function)
(functionp buffer-stale-function)
@@ -351,6 +355,9 @@ Use `auto-revert-mode' to revert a particular buffer."
(when auto-revert-verbose
(message "Reverting buffer `%s'." (buffer-name)))
(revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)
+ ;; `preserve-modes' avoids changing the (minor) modes. But we
+ ;; do want to reset the mode for VC, so we do it explicitly.
+ (vc-find-file-hook)
(if (eq revert 'vc)
(vc-mode-line buffer-file-name))))))
@@ -362,10 +369,11 @@ Should `global-auto-revert-mode' be active all file buffers are checked.
Should `auto-revert-mode' be active in some buffers, those buffers
are checked.
-Non-file buffers that have a custom `revert-buffer-function' are
-reverted either when Auto-Revert Mode is active in that buffer, or
-when the variable `global-auto-revert-non-file-buffers' is non-nil
-and Global Auto-Revert Mode is active.
+Non-file buffers that have a custom `revert-buffer-function' and
+a `buffer-stale-function' are reverted either when Auto-Revert
+Mode is active in that buffer, or when the variable
+`global-auto-revert-non-file-buffers' is non-nil and Global
+Auto-Revert Mode is active.
This function stops whenever there is user input. The buffers not
checked are stored in the variable `auto-revert-remaining-buffers'.
@@ -404,11 +412,7 @@ the timer when no buffers need to be checked."
(memq buf auto-revert-buffer-list))
(setq auto-revert-buffer-list
(delq buf auto-revert-buffer-list)))
- (when (auto-revert-active-p)
- (auto-revert-handler)
- ;; `preserve-modes' avoids changing the (minor) modes. But we
- ;; do want to reset the mode for VC, so we do it explicitly.
- (vc-find-file-hook)))
+ (when (auto-revert-active-p) (auto-revert-handler)))
;; Remove dead buffer from `auto-revert-buffer-list'.
(setq auto-revert-buffer-list
(delq buf auto-revert-buffer-list))))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 34611d3aa37..8415fd2050e 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -30,11 +30,6 @@
;; This package provides the compile facilities documented in the Emacs user's
;; manual.
-;;; Code:
-
-;; This is the parsing engine for compile:
-(require 'font-lock) ; needed to get font-lock-value-in-major-mode
-
;;; This mode uses some complex data-structures:
;;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE)
@@ -72,6 +67,11 @@
;; buffer.
+;;; Code:
+
+;; This is the parsing engine for compile:
+(require 'font-lock) ; needed to get font-lock-value-in-major-mode
+
(defgroup compilation nil
"Run compiler as inferior of Emacs, parse error messages."
:group 'tools
@@ -1284,7 +1284,8 @@ Does NOT find the source line like \\[previous-error]."
(defun next-error-no-select (n)
"Move point to the next error in the compilation buffer and highlight match.
-Prefix arg N says how many error messages to move forwards.
+Prefix arg N says how many error messages to move forwards (or
+backwards, if negative).
Finds and highlights the source line like \\[next-error], but does not
select the source buffer."
(interactive "p")
@@ -1293,19 +1294,22 @@ select the source buffer."
(defun previous-error-no-select (n)
"Move point to the previous error in the compilation buffer and highlight match.
-Prefix arg N says how many error messages to move forwards.
+Prefix arg N says how many error messages to move backwards (or
+forwards, if negative).
Finds and highlights the source line like \\[previous-error], but does not
select the source buffer."
(interactive "p")
(next-error-no-select (- n)))
(defun compilation-next-file (n)
- "Move point to the next error for a different file than the current one."
+ "Move point to the next error for a different file than the current one.
+Prefix arg N says how many files to move forwards (or backwards, if negative)."
(interactive "p")
(compilation-next-error n t))
(defun compilation-previous-file (n)
- "Move point to the previous error for a different file than the current one."
+ "Move point to the previous error for a different file than the current one.
+Prefix arg N says how many files to move backwards (or forwards, if negative)."
(interactive "p")
(compilation-next-file (- n)))
@@ -1368,11 +1372,10 @@ Use this command in a compilation log buffer. Sets the mark at point there."
(error "No compilation started!")))))))
;;;###autoload
-(defun next-error (n)
+(defun next-error (&optional n)
"Visit next compilation error message and corresponding source code.
-
-A prefix ARGP specifies how many error messages to move;
-negative means move back to previous error messages.
+Prefix arg N says how many error messages to move forwards (or
+backwards, if negative).
\\[next-error] normally uses the most recently started compilation or
grep buffer. However, it can operate on any buffer with output from
@@ -1390,7 +1393,7 @@ See variable `compilation-error-regexp-alist' for customization ideas."
(set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
(let* ((columns compilation-error-screen-columns) ; buffer's local value
(last 1)
- (loc (compilation-next-error n))
+ (loc (compilation-next-error (or n 1)))
(end-loc (nth 2 loc))
(marker (point-marker)))
(setq loc (car loc))
@@ -1429,25 +1432,24 @@ See variable `compilation-error-regexp-alist' for customization ideas."
;;;###autoload (define-key ctl-x-map "`" 'next-error)
-(defun previous-error (argp)
+(defun previous-error (n)
"Visit previous compilation error message and corresponding source code.
-
-A prefix ARGP specifies how many error messages to move;
-negative means move forward to next error messages.
+Prefix arg N says how many error messages to move backwards (or
+forwards, if negative).
This operates on the output from the \\[compile] and \\[grep] commands."
- (interactive "P")
- (next-error (- (prefix-numeric-value argp))))
+ (interactive "p")
+ (next-error (- n)))
-(defun first-error (arg)
+(defun first-error (n)
"Restart at the first error.
Visit corresponding source code.
-With prefix ARG, visit the source code of the ARGth error.
+With prefix arg N, visit the source code of the Nth error.
This operates on the output from the \\[compile] command."
(interactive "p")
(set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
(goto-char (point-min))
- (next-error arg))
+ (next-error n))
(defvar compilation-skip-to-next-location nil
"*If non-nil, skip multiple error messages for the same source location.")
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 1ae5ce2cfce..08a5a2ccbd3 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -119,7 +119,15 @@ The following interactive lisp functions help control operation :
(gdb command-line)
(gdb-ann3))
+(defvar gdb-debug-log nil)
+
+(defcustom gdb-enable-debug-log nil
+ "Non-nil means record the process input and output in `gdb-debug-log'."
+ :type 'boolean
+ :group 'gud)
+
(defun gdb-ann3 ()
+ (setq gdb-debug-log nil)
(set (make-local-variable 'gud-minor-mode) 'gdba)
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
;;
@@ -380,7 +388,7 @@ INDENT is the current indentation depth."
(setq ,name val))))))
(def-gdb-var buffer-type nil
- "One of the symbols bound in gdb-buffer-rules")
+ "One of the symbols bound in `gdb-buffer-rules'.")
(def-gdb-var burst ""
"A string of characters from gdb that have not yet been processed.")
@@ -407,7 +415,7 @@ Possible values are these symbols:
for subsequent processing by a command. This is the
disposition of output generated by commands that
gdb mode sends to gdb on its own behalf.
- post-emacs -- ignore input until the prompt annotation is
+ post-emacs -- ignore output until the prompt annotation is
received, then go to USER disposition.
")
@@ -667,6 +675,7 @@ This filter may simply queue output for a later time."
(setq gdb-view-source t))
(defun gdb-send-item (item)
+ (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
(gdb-set-current-item item)
(if (stringp item)
(progn
@@ -769,12 +778,13 @@ output from the current command if that happens to be appropriate."
(gdb-invalidate-registers)
(gdb-invalidate-locals)
(gdb-invalidate-threads)
- (dolist (frame (frame-list))
- (when (string-equal (frame-parameter frame 'name) "Speedbar")
- (setq gdb-var-changed t) ; force update
- (dolist (var gdb-var-list)
- (setcar (nthcdr 5 var) nil))))
- (gdb-var-update)))
+ (unless (eq window-system 'mac)
+ (dolist (frame (frame-list))
+ (when (string-equal (frame-parameter frame 'name) "Speedbar")
+ (setq gdb-var-changed t) ; force update
+ (dolist (var gdb-var-list)
+ (setcar (nthcdr 5 var) nil))))
+ (gdb-var-update))))
(let ((sink (gdb-get-output-sink)))
(cond
((eq sink 'user) t)
@@ -786,6 +796,7 @@ output from the current command if that happens to be appropriate."
(defun gud-gdba-marker-filter (string)
"A gud marker filter for gdb. Handle a burst of output from GDB."
+ (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log))
;; Recall the left over gud-marker-acc from last time
(setq gud-marker-acc (concat gud-marker-acc string))
;; Start accumulating output for the GUD buffer
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index f08c5fc1dfa..904a8f0ccd2 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -6,7 +6,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-hooks.el,v 1.164 2004/03/26 06:06:39 spiegel Exp $
+;; $Id: vc-hooks.el,v 1.165 2004/03/28 17:38:03 monnier Exp $
;; This file is part of GNU Emacs.