aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-03-30 00:32:47 +0000
committerKaroly Lorentey2004-03-30 00:32:47 +0000
commit41d39f41e3d59b090d4fcc18fff140abd64275af (patch)
tree94f1905d82e00d8450e384361b555a101680761a
parent2491d293f3e87e0925cd71e9e72ac2edaa94ecc6 (diff)
parentdbefaa008de0ee0997504861950aa4b13178e2dc (diff)
downloademacs-41d39f41e3d59b090d4fcc18fff140abd64275af.tar.gz
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
-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 @@
12004-03-28 Nick Roberts <nick@nick.uklinux.net>
2
3 * progmodes/gdb-ui.el (gdb-ann3, gdb-send-item)
4 (gud-gdba-marker-filter): Log the process input and output, if
5 required. (from Stefan Monnier)
6 (gdb-debug-log, gdb-enable-debug-log): New variables.
7 (gdb-post-prompt): Don't do gdb-var-update on Mac OS X.
8
92004-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
10
11 * vc-hooks.el (vc-file-not-found-hook): Fix typo.
12 From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly).
13
142004-03-27 Luc Teirlinck <teirllm@auburn.edu>
15
16 * autorevert.el (auto-revert-handler): Handle auto-revert-mode.
17 Call vc-find-file-hook here instead of in auto-revert-buffers.
18 (auto-revert-buffers): Delete call to vc-find-file-hook.
19 (auto-revert-verbose, global-auto-revert-non-file-buffers)
20 (global-auto-revert-mode, auto-revert-set-timer)
21 (auto-revert-handler, auto-revert-buffers): Doc fixes.
22
12004-03-27 Francis J. Wright <F.J.Wright@qmul.ac.uk> 232004-03-27 Francis J. Wright <F.J.Wright@qmul.ac.uk>
2 24
3 * woman.el (woman-change-fonts): Rename local variable 25 * woman.el (woman-change-fonts): Rename local variable
@@ -9,8 +31,8 @@
9 Fix copyright years. 31 Fix copyright years.
10 32
11 * strokes.el (strokes-global-set-stroke-string): New function. 33 * strokes.el (strokes-global-set-stroke-string): New function.
12 (strokes-list-strokes): Cope with strings, not just commands. Set 34 (strokes-list-strokes): Cope with strings, not just commands.
13 foreground colour of image. 35 Set foreground colour of image.
14 (strokes-global-set-stroke): Doc fix. 36 (strokes-global-set-stroke): Doc fix.
15 37
162004-03-26 Luc Teirlinck <teirllm@auburn.edu> 382004-03-26 Luc Teirlinck <teirllm@auburn.edu>
@@ -31,7 +53,7 @@
31 before, rather than after, reverting. 53 before, rather than after, reverting.
32 (buffer-stale-function): Move to files.el. 54 (buffer-stale-function): Move to files.el.
33 55
34 * files.el (buffer-stale-function): Moved here from autorevert.el. 56 * files.el (buffer-stale-function): Move here from autorevert.el.
35 57
362004-03-26 Stefan Monnier <monnier@iro.umontreal.ca> 582004-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
37 59
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."
132 132
133(defcustom auto-revert-verbose t 133(defcustom auto-revert-verbose t
134 "When nil, Auto-Revert Mode will not generate any messages. 134 "When nil, Auto-Revert Mode will not generate any messages.
135 135When non-nil, a message is generated whenever a file is reverted."
136Currently, messages are generated when the mode is activated or
137deactivated, and whenever a file is reverted."
138 :group 'auto-revert 136 :group 'auto-revert
139 :type 'boolean) 137 :type 'boolean)
140 138
@@ -170,7 +168,8 @@ would only waste precious space."
170 "When nil only file buffers are reverted by Global Auto-Revert Mode. 168 "When nil only file buffers are reverted by Global Auto-Revert Mode.
171 169
172When non-nil, both file buffers and buffers with a custom 170When non-nil, both file buffers and buffers with a custom
173`revert-buffer-function' are reverted by Global Auto-Revert Mode. 171`revert-buffer-function' and a `buffer-stale-function' are
172reverted by Global Auto-Revert Mode.
174 173
175Use this option with care since it could lead to excessive reverts. 174Use this option with care since it could lead to excessive reverts.
176Note also that for some non-file buffers the check whether the 175Note 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:
244 243
245;;;###autoload 244;;;###autoload
246(define-minor-mode global-auto-revert-mode 245(define-minor-mode global-auto-revert-mode
247 "Revert any buffer when file on disk change. 246 "Revert any buffer when file on disk changes.
248 247
249With arg, turn Auto Revert mode on globally if and only if arg is positive. 248With arg, turn Auto Revert mode on globally if and only if arg is positive.
250This is a minor mode that affects all buffers. 249This is a minor mode that affects all buffers.
@@ -256,7 +255,11 @@ Use `auto-revert-mode' to revert a particular buffer."
256 255
257 256
258(defun auto-revert-set-timer () 257(defun auto-revert-set-timer ()
259 "Restart or cancel the timer." 258 "Restart or cancel the timer used by Auto-Revert Mode.
259If such a timer is active, cancel it. Start a new timer if
260Global Auto-Revert Mode is active or if Auto-Revert Mode is active
261in some buffer. Restarting the timer ensures that Auto-Revert Mode
262will use an up-to-date value of `auto-revert-interval'"
260 (interactive) 263 (interactive)
261 (if (timerp auto-revert-timer) 264 (if (timerp auto-revert-timer)
262 (cancel-timer auto-revert-timer)) 265 (cancel-timer auto-revert-timer))
@@ -331,7 +334,8 @@ Use `auto-revert-mode' to revert a particular buffer."
331 )))))) 334 ))))))
332 335
333(defun auto-revert-handler () 336(defun auto-revert-handler ()
334 "Revert current buffer." 337 "Revert current buffer, if appropriate.
338This is an internal function used by Auto-Revert Mode."
335 (unless (buffer-modified-p) 339 (unless (buffer-modified-p)
336 (let (revert) 340 (let (revert)
337 (cond 341 (cond
@@ -341,7 +345,7 @@ Use `auto-revert-mode' to revert a particular buffer."
341 ((or (and (buffer-file-name) 345 ((or (and (buffer-file-name)
342 (file-readable-p (buffer-file-name)) 346 (file-readable-p (buffer-file-name))
343 (not (verify-visited-file-modtime (current-buffer)))) 347 (not (verify-visited-file-modtime (current-buffer))))
344 (and global-auto-revert-non-file-buffers 348 (and (or auto-revert-mode global-auto-revert-non-file-buffers)
345 revert-buffer-function 349 revert-buffer-function
346 (boundp 'buffer-stale-function) 350 (boundp 'buffer-stale-function)
347 (functionp buffer-stale-function) 351 (functionp buffer-stale-function)
@@ -351,6 +355,9 @@ Use `auto-revert-mode' to revert a particular buffer."
351 (when auto-revert-verbose 355 (when auto-revert-verbose
352 (message "Reverting buffer `%s'." (buffer-name))) 356 (message "Reverting buffer `%s'." (buffer-name)))
353 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) 357 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)
358 ;; `preserve-modes' avoids changing the (minor) modes. But we
359 ;; do want to reset the mode for VC, so we do it explicitly.
360 (vc-find-file-hook)
354 (if (eq revert 'vc) 361 (if (eq revert 'vc)
355 (vc-mode-line buffer-file-name)))))) 362 (vc-mode-line buffer-file-name))))))
356 363
@@ -362,10 +369,11 @@ Should `global-auto-revert-mode' be active all file buffers are checked.
362Should `auto-revert-mode' be active in some buffers, those buffers 369Should `auto-revert-mode' be active in some buffers, those buffers
363are checked. 370are checked.
364 371
365Non-file buffers that have a custom `revert-buffer-function' are 372Non-file buffers that have a custom `revert-buffer-function' and
366reverted either when Auto-Revert Mode is active in that buffer, or 373a `buffer-stale-function' are reverted either when Auto-Revert
367when the variable `global-auto-revert-non-file-buffers' is non-nil 374Mode is active in that buffer, or when the variable
368and Global Auto-Revert Mode is active. 375`global-auto-revert-non-file-buffers' is non-nil and Global
376Auto-Revert Mode is active.
369 377
370This function stops whenever there is user input. The buffers not 378This function stops whenever there is user input. The buffers not
371checked are stored in the variable `auto-revert-remaining-buffers'. 379checked are stored in the variable `auto-revert-remaining-buffers'.
@@ -404,11 +412,7 @@ the timer when no buffers need to be checked."
404 (memq buf auto-revert-buffer-list)) 412 (memq buf auto-revert-buffer-list))
405 (setq auto-revert-buffer-list 413 (setq auto-revert-buffer-list
406 (delq buf auto-revert-buffer-list))) 414 (delq buf auto-revert-buffer-list)))
407 (when (auto-revert-active-p) 415 (when (auto-revert-active-p) (auto-revert-handler)))
408 (auto-revert-handler)
409 ;; `preserve-modes' avoids changing the (minor) modes. But we
410 ;; do want to reset the mode for VC, so we do it explicitly.
411 (vc-find-file-hook)))
412 ;; Remove dead buffer from `auto-revert-buffer-list'. 416 ;; Remove dead buffer from `auto-revert-buffer-list'.
413 (setq auto-revert-buffer-list 417 (setq auto-revert-buffer-list
414 (delq buf auto-revert-buffer-list)))) 418 (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 @@
30;; This package provides the compile facilities documented in the Emacs user's 30;; This package provides the compile facilities documented in the Emacs user's
31;; manual. 31;; manual.
32 32
33;;; Code:
34
35;; This is the parsing engine for compile:
36(require 'font-lock) ; needed to get font-lock-value-in-major-mode
37
38;;; This mode uses some complex data-structures: 33;;; This mode uses some complex data-structures:
39 34
40;;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE) 35;;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE)
@@ -72,6 +67,11 @@
72;; buffer. 67;; buffer.
73 68
74 69
70;;; Code:
71
72;; This is the parsing engine for compile:
73(require 'font-lock) ; needed to get font-lock-value-in-major-mode
74
75(defgroup compilation nil 75(defgroup compilation nil
76 "Run compiler as inferior of Emacs, parse error messages." 76 "Run compiler as inferior of Emacs, parse error messages."
77 :group 'tools 77 :group 'tools
@@ -1284,7 +1284,8 @@ Does NOT find the source line like \\[previous-error]."
1284 1284
1285(defun next-error-no-select (n) 1285(defun next-error-no-select (n)
1286 "Move point to the next error in the compilation buffer and highlight match. 1286 "Move point to the next error in the compilation buffer and highlight match.
1287Prefix arg N says how many error messages to move forwards. 1287Prefix arg N says how many error messages to move forwards (or
1288backwards, if negative).
1288Finds and highlights the source line like \\[next-error], but does not 1289Finds and highlights the source line like \\[next-error], but does not
1289select the source buffer." 1290select the source buffer."
1290 (interactive "p") 1291 (interactive "p")
@@ -1293,19 +1294,22 @@ select the source buffer."
1293 1294
1294(defun previous-error-no-select (n) 1295(defun previous-error-no-select (n)
1295 "Move point to the previous error in the compilation buffer and highlight match. 1296 "Move point to the previous error in the compilation buffer and highlight match.
1296Prefix arg N says how many error messages to move forwards. 1297Prefix arg N says how many error messages to move backwards (or
1298forwards, if negative).
1297Finds and highlights the source line like \\[previous-error], but does not 1299Finds and highlights the source line like \\[previous-error], but does not
1298select the source buffer." 1300select the source buffer."
1299 (interactive "p") 1301 (interactive "p")
1300 (next-error-no-select (- n))) 1302 (next-error-no-select (- n)))
1301 1303
1302(defun compilation-next-file (n) 1304(defun compilation-next-file (n)
1303 "Move point to the next error for a different file than the current one." 1305 "Move point to the next error for a different file than the current one.
1306Prefix arg N says how many files to move forwards (or backwards, if negative)."
1304 (interactive "p") 1307 (interactive "p")
1305 (compilation-next-error n t)) 1308 (compilation-next-error n t))
1306 1309
1307(defun compilation-previous-file (n) 1310(defun compilation-previous-file (n)
1308 "Move point to the previous error for a different file than the current one." 1311 "Move point to the previous error for a different file than the current one.
1312Prefix arg N says how many files to move backwards (or forwards, if negative)."
1309 (interactive "p") 1313 (interactive "p")
1310 (compilation-next-file (- n))) 1314 (compilation-next-file (- n)))
1311 1315
@@ -1368,11 +1372,10 @@ Use this command in a compilation log buffer. Sets the mark at point there."
1368 (error "No compilation started!"))))))) 1372 (error "No compilation started!")))))))
1369 1373
1370;;;###autoload 1374;;;###autoload
1371(defun next-error (n) 1375(defun next-error (&optional n)
1372 "Visit next compilation error message and corresponding source code. 1376 "Visit next compilation error message and corresponding source code.
1373 1377Prefix arg N says how many error messages to move forwards (or
1374A prefix ARGP specifies how many error messages to move; 1378backwards, if negative).
1375negative means move back to previous error messages.
1376 1379
1377\\[next-error] normally uses the most recently started compilation or 1380\\[next-error] normally uses the most recently started compilation or
1378grep buffer. However, it can operate on any buffer with output from 1381grep buffer. However, it can operate on any buffer with output from
@@ -1390,7 +1393,7 @@ See variable `compilation-error-regexp-alist' for customization ideas."
1390 (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) 1393 (set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
1391 (let* ((columns compilation-error-screen-columns) ; buffer's local value 1394 (let* ((columns compilation-error-screen-columns) ; buffer's local value
1392 (last 1) 1395 (last 1)
1393 (loc (compilation-next-error n)) 1396 (loc (compilation-next-error (or n 1)))
1394 (end-loc (nth 2 loc)) 1397 (end-loc (nth 2 loc))
1395 (marker (point-marker))) 1398 (marker (point-marker)))
1396 (setq loc (car loc)) 1399 (setq loc (car loc))
@@ -1429,25 +1432,24 @@ See variable `compilation-error-regexp-alist' for customization ideas."
1429 1432
1430;;;###autoload (define-key ctl-x-map "`" 'next-error) 1433;;;###autoload (define-key ctl-x-map "`" 'next-error)
1431 1434
1432(defun previous-error (argp) 1435(defun previous-error (n)
1433 "Visit previous compilation error message and corresponding source code. 1436 "Visit previous compilation error message and corresponding source code.
1434 1437Prefix arg N says how many error messages to move backwards (or
1435A prefix ARGP specifies how many error messages to move; 1438forwards, if negative).
1436negative means move forward to next error messages.
1437 1439
1438This operates on the output from the \\[compile] and \\[grep] commands." 1440This operates on the output from the \\[compile] and \\[grep] commands."
1439 (interactive "P") 1441 (interactive "p")
1440 (next-error (- (prefix-numeric-value argp)))) 1442 (next-error (- n)))
1441 1443
1442(defun first-error (arg) 1444(defun first-error (n)
1443 "Restart at the first error. 1445 "Restart at the first error.
1444Visit corresponding source code. 1446Visit corresponding source code.
1445With prefix ARG, visit the source code of the ARGth error. 1447With prefix arg N, visit the source code of the Nth error.
1446This operates on the output from the \\[compile] command." 1448This operates on the output from the \\[compile] command."
1447 (interactive "p") 1449 (interactive "p")
1448 (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) 1450 (set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
1449 (goto-char (point-min)) 1451 (goto-char (point-min))
1450 (next-error arg)) 1452 (next-error n))
1451 1453
1452(defvar compilation-skip-to-next-location nil 1454(defvar compilation-skip-to-next-location nil
1453 "*If non-nil, skip multiple error messages for the same source location.") 1455 "*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 :
119 (gdb command-line) 119 (gdb command-line)
120 (gdb-ann3)) 120 (gdb-ann3))
121 121
122(defvar gdb-debug-log nil)
123
124(defcustom gdb-enable-debug-log nil
125 "Non-nil means record the process input and output in `gdb-debug-log'."
126 :type 'boolean
127 :group 'gud)
128
122(defun gdb-ann3 () 129(defun gdb-ann3 ()
130 (setq gdb-debug-log nil)
123 (set (make-local-variable 'gud-minor-mode) 'gdba) 131 (set (make-local-variable 'gud-minor-mode) 'gdba)
124 (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) 132 (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
125 ;; 133 ;;
@@ -380,7 +388,7 @@ INDENT is the current indentation depth."
380 (setq ,name val)))))) 388 (setq ,name val))))))
381 389
382(def-gdb-var buffer-type nil 390(def-gdb-var buffer-type nil
383 "One of the symbols bound in gdb-buffer-rules") 391 "One of the symbols bound in `gdb-buffer-rules'.")
384 392
385(def-gdb-var burst "" 393(def-gdb-var burst ""
386 "A string of characters from gdb that have not yet been processed.") 394 "A string of characters from gdb that have not yet been processed.")
@@ -407,7 +415,7 @@ Possible values are these symbols:
407 for subsequent processing by a command. This is the 415 for subsequent processing by a command. This is the
408 disposition of output generated by commands that 416 disposition of output generated by commands that
409 gdb mode sends to gdb on its own behalf. 417 gdb mode sends to gdb on its own behalf.
410 post-emacs -- ignore input until the prompt annotation is 418 post-emacs -- ignore output until the prompt annotation is
411 received, then go to USER disposition. 419 received, then go to USER disposition.
412") 420")
413 421
@@ -667,6 +675,7 @@ This filter may simply queue output for a later time."
667 (setq gdb-view-source t)) 675 (setq gdb-view-source t))
668 676
669(defun gdb-send-item (item) 677(defun gdb-send-item (item)
678 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
670 (gdb-set-current-item item) 679 (gdb-set-current-item item)
671 (if (stringp item) 680 (if (stringp item)
672 (progn 681 (progn
@@ -769,12 +778,13 @@ output from the current command if that happens to be appropriate."
769 (gdb-invalidate-registers) 778 (gdb-invalidate-registers)
770 (gdb-invalidate-locals) 779 (gdb-invalidate-locals)
771 (gdb-invalidate-threads) 780 (gdb-invalidate-threads)
772 (dolist (frame (frame-list)) 781 (unless (eq window-system 'mac)
773 (when (string-equal (frame-parameter frame 'name) "Speedbar") 782 (dolist (frame (frame-list))
774 (setq gdb-var-changed t) ; force update 783 (when (string-equal (frame-parameter frame 'name) "Speedbar")
775 (dolist (var gdb-var-list) 784 (setq gdb-var-changed t) ; force update
776 (setcar (nthcdr 5 var) nil)))) 785 (dolist (var gdb-var-list)
777 (gdb-var-update))) 786 (setcar (nthcdr 5 var) nil))))
787 (gdb-var-update))))
778 (let ((sink (gdb-get-output-sink))) 788 (let ((sink (gdb-get-output-sink)))
779 (cond 789 (cond
780 ((eq sink 'user) t) 790 ((eq sink 'user) t)
@@ -786,6 +796,7 @@ output from the current command if that happens to be appropriate."
786 796
787(defun gud-gdba-marker-filter (string) 797(defun gud-gdba-marker-filter (string)
788 "A gud marker filter for gdb. Handle a burst of output from GDB." 798 "A gud marker filter for gdb. Handle a burst of output from GDB."
799 (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log))
789 ;; Recall the left over gud-marker-acc from last time 800 ;; Recall the left over gud-marker-acc from last time
790 (setq gud-marker-acc (concat gud-marker-acc string)) 801 (setq gud-marker-acc (concat gud-marker-acc string))
791 ;; Start accumulating output for the GUD buffer 802 ;; 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 @@
6;; Author: FSF (see vc.el for full credits) 6;; Author: FSF (see vc.el for full credits)
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8 8
9;; $Id: vc-hooks.el,v 1.164 2004/03/26 06:06:39 spiegel Exp $ 9;; $Id: vc-hooks.el,v 1.165 2004/03/28 17:38:03 monnier Exp $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12