# HG changeset patch # User Karoly Lorentey # Date 1080606767 0 # Node ID 38afc630f7a09439a3ac6d6c8bdfbefb5b39c0b9 # Parent 3af83746f9121580522a9fc409aeb7dd4efbb135# Parent 47c4cb867a8420f461c0a6aa972ac2fdb63273e7 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 diff -r 3af83746f912 -r 38afc630f7a0 lisp/ChangeLog --- a/lisp/ChangeLog Mon Mar 29 12:05:03 2004 +0000 +++ b/lisp/ChangeLog Tue Mar 30 00:32:47 2004 +0000 @@ -1,3 +1,25 @@ +2004-03-28 Nick Roberts + + * 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 + + * 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 + + * 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 * 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 @@ -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 diff -r 3af83746f912 -r 38afc630f7a0 lisp/autorevert.el --- a/lisp/autorevert.el Mon Mar 29 12:05:03 2004 +0000 +++ b/lisp/autorevert.el Tue Mar 30 00:32:47 2004 +0000 @@ -132,9 +132,7 @@ (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 @@ "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 @@ ;;;###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 @@ (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 @@ )))))) (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 @@ ((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 @@ (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 `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 @@ (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 -r 3af83746f912 -r 38afc630f7a0 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Mon Mar 29 12:05:03 2004 +0000 +++ b/lisp/progmodes/compile.el Tue Mar 30 00:32:47 2004 +0000 @@ -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 @@ (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 @@ (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 @@ (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 @@ (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 @@ ;;;###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 -r 3af83746f912 -r 38afc630f7a0 lisp/progmodes/gdb-ui.el --- a/lisp/progmodes/gdb-ui.el Mon Mar 29 12:05:03 2004 +0000 +++ b/lisp/progmodes/gdb-ui.el Tue Mar 30 00:32:47 2004 +0000 @@ -119,7 +119,15 @@ (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 @@ (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 @@ 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 @@ (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 @@ (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 @@ (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 -r 3af83746f912 -r 38afc630f7a0 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Mon Mar 29 12:05:03 2004 +0000 +++ b/lisp/vc-hooks.el Tue Mar 30 00:32:47 2004 +0000 @@ -6,7 +6,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $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.