aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2005-07-22 08:27:27 +0000
committerMiles Bader2005-07-22 08:27:27 +0000
commit3674ae2f87e47a654524af689ea610ee3edeaca7 (patch)
tree58ea33c40c8521a79fb503080b8bb6231ffbf579 /lisp/progmodes
parent3e03f554f116e04ba860dcde7c6d862939911e16 (diff)
parent7929f858f8897f0448771a471f8afc5f244e4bca (diff)
downloademacs-3674ae2f87e47a654524af689ea610ee3edeaca7.tar.gz
emacs-3674ae2f87e47a654524af689ea610ee3edeaca7.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-71
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 485-492) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 92-94) - Merge from emacs--cvs-trunk--0 - Update from CVS
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el3
-rw-r--r--lisp/progmodes/asm-mode.el3
-rw-r--r--lisp/progmodes/f90.el3
-rw-r--r--lisp/progmodes/gdb-ui.el33
-rw-r--r--lisp/progmodes/grep.el28
-rw-r--r--lisp/progmodes/gud.el6
-rw-r--r--lisp/progmodes/pascal.el12
7 files changed, 48 insertions, 40 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index fdb1a9d69f7..d062d6d1e98 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -5349,7 +5349,8 @@ spec buffer in here and modify it to make it a body.
5349This function typically is to be hooked into `ff-file-created-hooks'." 5349This function typically is to be hooked into `ff-file-created-hooks'."
5350 (interactive) 5350 (interactive)
5351 (delete-region (point-min) (point-max)) 5351 (delete-region (point-min) (point-max))
5352 (insert-buffer (car (cdr (buffer-list)))) 5352 (insert-buffer-substring (car (cdr (buffer-list))))
5353 (goto-char (point-min))
5353 (ada-mode) 5354 (ada-mode)
5354 5355
5355 (let (found ada-procedure-or-package-start-regexp) 5356 (let (found ada-procedure-or-package-start-regexp)
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 94ac76c0686..c98dbdac892 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -204,7 +204,8 @@ repeatedly until you are satisfied with the kind of comment."
204 (let (comempty comment) 204 (let (comempty comment)
205 (save-excursion 205 (save-excursion
206 (beginning-of-line) 206 (beginning-of-line)
207 (setq comment (comment-search-forward (line-end-position) t)) 207 (with-no-warnings
208 (setq comment (comment-search-forward (line-end-position) t)))
208 (setq comempty (looking-at "[ \t]*$"))) 209 (setq comempty (looking-at "[ \t]*$")))
209 210
210 (cond 211 (cond
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 99d33553f53..02fe9c5f117 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1790,7 +1790,8 @@ Any other key combination is executed normally."
1790 (let (char event) 1790 (let (char event)
1791 (if (fboundp 'next-command-event) ; XEmacs 1791 (if (fboundp 'next-command-event) ; XEmacs
1792 (setq event (next-command-event) 1792 (setq event (next-command-event)
1793 char (event-to-character event)) 1793 char (and (fboundp 'event-to-character)
1794 (event-to-character event)))
1794 (setq event (read-event) 1795 (setq event (read-event)
1795 char event)) 1796 char event))
1796 ;; Insert char if not equal to `?', or if abbrev-mode is off. 1797 ;; Insert char if not equal to `?', or if abbrev-mode is off.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index f4b6a705ea9..8a426a37365 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -503,15 +503,11 @@ Also display the main routine in the disassembly buffer if present."
503 (setq gdb-var-list (nreverse var-list)))))) 503 (setq gdb-var-list (nreverse var-list))))))
504 504
505(defun gdb-var-update () 505(defun gdb-var-update ()
506 (if (not (member 'gdb-var-update gdb-pending-triggers)) 506 (when (not (member 'gdb-var-update gdb-pending-triggers))
507 (progn 507 (gdb-enqueue-input
508 (gdb-enqueue-input 508 (list "server interpreter mi \"-var-update *\"\n"
509 (list 509 'gdb-var-update-handler))
510 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 510 (push 'gdb-var-update gdb-pending-triggers)))
511 "server interpreter mi \"-var-update *\"\n"
512 "-var-update *\n")
513 'gdb-var-update-handler))
514 (push 'gdb-var-update gdb-pending-triggers))))
515 511
516(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") 512(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")
517 513
@@ -522,13 +518,9 @@ Also display the main routine in the disassembly buffer if present."
522 (let ((varnum (match-string 1))) 518 (let ((varnum (match-string 1)))
523 (gdb-enqueue-input 519 (gdb-enqueue-input
524 (list 520 (list
525 (if (with-current-buffer gud-comint-buffer 521 (concat "server interpreter mi \"-var-evaluate-expression "
526 (eq gud-minor-mode 'gdba)) 522 varnum "\"\n")
527 (concat "server interpreter mi \"-var-evaluate-expression " 523 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
528 varnum "\"\n")
529 (concat "-var-evaluate-expression " varnum "\n"))
530 `(lambda () (gdb-var-evaluate-expression-handler
531 ,varnum t)))))))
532 (setq gdb-pending-triggers 524 (setq gdb-pending-triggers
533 (delq 'gdb-var-update gdb-pending-triggers)) 525 (delq 'gdb-var-update gdb-pending-triggers))
534 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 526 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -544,9 +536,10 @@ Also display the main routine in the disassembly buffer if present."
544 (speedbar-timer-fn))) 536 (speedbar-timer-fn)))
545 537
546(defun gdb-var-delete () 538(defun gdb-var-delete ()
547 "Delete watched expression from the speedbar." 539 "Delete watch expression at point from the speedbar."
548 (interactive) 540 (interactive)
549 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 541 (if (with-current-buffer
542 gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))
550 (let ((text (speedbar-line-text))) 543 (let ((text (speedbar-line-text)))
551 (string-match "\\(\\S-+\\)" text) 544 (string-match "\\(\\S-+\\)" text)
552 (let* ((expr (match-string 1 text)) 545 (let* ((expr (match-string 1 text))
@@ -595,7 +588,9 @@ INDENT is the current indentation depth."
595 (cond ((string-match "+" text) ;expand this node 588 (cond ((string-match "+" text) ;expand this node
596 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 589 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
597 (gdb-var-list-children token) 590 (gdb-var-list-children token)
598 (gdbmi-var-list-children token))) 591 (progn
592 (gdbmi-var-update)
593 (gdbmi-var-list-children token))))
599 ((string-match "-" text) ;contract this node 594 ((string-match "-" text) ;contract this node
600 (dolist (var gdb-var-list) 595 (dolist (var gdb-var-list)
601 (if (string-match (concat token "\\.") (nth 1 var)) 596 (if (string-match (concat token "\\.") (nth 1 var))
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 0f1045eeb5a..8f6dd73cba1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -196,6 +196,7 @@ See `compilation-error-screen-columns'"
196 (define-key map "p" 'previous-error-no-select) 196 (define-key map "p" 'previous-error-no-select)
197 (define-key map "{" 'compilation-previous-file) 197 (define-key map "{" 'compilation-previous-file)
198 (define-key map "}" 'compilation-next-file) 198 (define-key map "}" 'compilation-next-file)
199 (define-key map [backtab] 'compilation-previous-file)
199 (define-key map "\t" 'compilation-next-file) 200 (define-key map "\t" 'compilation-next-file)
200 201
201 ;; Set up the menu-bar 202 ;; Set up the menu-bar
@@ -255,16 +256,17 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
255\\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2" 256\\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2"
256 1 (3 . 6) (5 . 7)) 257 1 (3 . 6) (5 . 7))
257 ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\ 258 ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\
258\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" 259\\(\033\\[01;31m\\(?:\033\\[K\\)?\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
259 2 3 260 2 3
260 ;; Calculate column positions (beg . end) of first grep match on a line 261 ;; Calculate column positions (beg . end) of first grep match on a line
261 ((lambda () 262 ((lambda ()
262 (setq compilation-error-screen-columns nil) 263 (setq compilation-error-screen-columns nil)
263 (- (match-beginning 5) (match-end 1) 8)) 264 (- (match-beginning 4) (match-end 1)))
264 . 265 .
265 (lambda () (- (match-end 5) (match-end 1) 8))) 266 (lambda () (- (match-end 5) (match-end 1)
267 (- (match-end 4) (match-beginning 4)))))
266 nil 1) 268 nil 1)
267 ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) 269 ("^Binary file \\(.+\\) matches$" 1 nil nil 1 1))
268 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") 270 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
269 271
270(defvar grep-error "grep hit" 272(defvar grep-error "grep hit"
@@ -296,17 +298,21 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
296 (1 compilation-warning-face) 298 (1 compilation-warning-face)
297 (2 compilation-line-face)) 299 (2 compilation-line-face))
298 ;; Highlight grep matches and delete markers 300 ;; Highlight grep matches and delete markers
299 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" 301 ("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
300 ;; Refontification does not work after the markers have been 302 ;; Refontification does not work after the markers have been
301 ;; deleted. So we use the font-lock-face property here as Font 303 ;; deleted. So we use the font-lock-face property here as Font
302 ;; Lock does not clear that. 304 ;; Lock does not clear that.
303 (2 (list 'face nil 'font-lock-face grep-match-face)) 305 (2 (list 'face nil 'font-lock-face grep-match-face))
304 ((lambda (p)) 306 ((lambda (bound))
305 (progn 307 (progn
306 ;; Delete markers with `replace-match' because it updates 308 ;; Delete markers with `replace-match' because it updates
307 ;; the match-data, whereas `delete-region' would render it obsolete. 309 ;; the match-data, whereas `delete-region' would render it obsolete.
308 (replace-match "" t t nil 3) 310 (replace-match "" t t nil 3)
309 (replace-match "" t t nil 1))))) 311 (replace-match "" t t nil 1))))
312 ("\\(\033\\[[0-9;]*[mK]\\)"
313 ;; Delete all remaining escape sequences
314 ((lambda (bound))
315 (replace-match "" t t nil 1))))
310 "Additional things to highlight in grep output. 316 "Additional things to highlight in grep output.
311This gets tacked on the end of the generated expressions.") 317This gets tacked on the end of the generated expressions.")
312 318
@@ -354,7 +360,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
354 (when (eq grep-highlight-matches t) 360 (when (eq grep-highlight-matches t)
355 ;; Modify `process-environment' locally bound in `compilation-start' 361 ;; Modify `process-environment' locally bound in `compilation-start'
356 (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always")) 362 (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always"))
357 (setenv "GREP_COLOR" "01;41")) 363 ;; for GNU grep 2.5.1
364 (setenv "GREP_COLOR" "01;31")
365 ;; for GNU grep 2.5.1-cvs
366 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne"))
358 (set (make-local-variable 'compilation-exit-message-function) 367 (set (make-local-variable 'compilation-exit-message-function)
359 (lambda (status code msg) 368 (lambda (status code msg)
360 (if (eq status 'exit) 369 (if (eq status 'exit)
@@ -514,6 +523,7 @@ temporarily highlight in visited source lines."
514 command-args) 523 command-args)
515 'grep-mode nil highlight-regexp))) 524 'grep-mode nil highlight-regexp)))
516 525
526;;;###autoload
517(define-compilation-mode grep-mode "Grep" 527(define-compilation-mode grep-mode "Grep"
518 "Sets `grep-last-buffer' and `compilation-window-height'." 528 "Sets `grep-last-buffer' and `compilation-window-height'."
519 (setq grep-last-buffer (current-buffer)) 529 (setq grep-last-buffer (current-buffer))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 50644383667..f93ff3d7e02 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -42,7 +42,6 @@
42(eval-when-compile (require 'cl)) ; for case macro 42(eval-when-compile (require 'cl)) ; for case macro
43 43
44(require 'comint) 44(require 'comint)
45(require 'etags)
46(require 'font-lock) 45(require 'font-lock)
47 46
48;; ====================================================================== 47;; ======================================================================
@@ -352,10 +351,10 @@ t means that there is no stack, and we are in display-file mode.")
352 (not (memq gud-minor-mode '(gdbmi gdba))))] 351 (not (memq gud-minor-mode '(gdbmi gdba))))]
353 ["Edit value" speedbar-edit-line 352 ["Edit value" speedbar-edit-line
354 (with-current-buffer gud-comint-buffer 353 (with-current-buffer gud-comint-buffer
355 (not (memq gud-minor-mode '(gdbmi gdba))))] 354 (memq gud-minor-mode '(gdbmi gdba)))]
356 ["Delete expression" gdb-var-delete 355 ["Delete expression" gdb-var-delete
357 (with-current-buffer gud-comint-buffer 356 (with-current-buffer gud-comint-buffer
358 (not (memq gud-minor-mode '(gdbmi gdba))))]) 357 (memq gud-minor-mode '(gdbmi gdba)))])
359 "Additional menu items to add to the speedbar frame.") 358 "Additional menu items to add to the speedbar frame.")
360 359
361;; Make sure our special speedbar mode is loaded 360;; Make sure our special speedbar mode is loaded
@@ -833,6 +832,7 @@ The directory containing FILE becomes the initial working directory
833and source-file directory for your debugger." 832and source-file directory for your debugger."
834 (interactive (list (gud-query-cmdline 'sdb))) 833 (interactive (list (gud-query-cmdline 'sdb)))
835 834
835 (if gud-sdb-needs-tags (require 'etags))
836 (if (and gud-sdb-needs-tags 836 (if (and gud-sdb-needs-tags
837 (not (and (boundp 'tags-file-name) 837 (not (and (boundp 'tags-file-name)
838 (stringp tags-file-name) 838 (stringp tags-file-name)
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index ebe37bc1d46..3212107b20d 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1493,12 +1493,12 @@ The default is a name found in the buffer around point."
1493 1493
1494(if pascal-outline-map 1494(if pascal-outline-map
1495 nil 1495 nil
1496 (if (boundp 'set-keymap-name) 1496 (if (fboundp 'set-keymap-name)
1497 (set-keymap-name pascal-outline-map 'pascal-outline-map)) 1497 (set-keymap-name pascal-outline-map 'pascal-outline-map))
1498 (if (not (boundp 'set-keymap-parent)) 1498 (if (fboundp 'set-keymap-parent)
1499 (setq pascal-outline-map (copy-keymap pascal-mode-map)) 1499 (set-keymap-parent (setq pascal-outline-map (make-sparse-keymap))
1500 (setq pascal-outline-map (make-sparse-keymap)) 1500 pascal-mode-map)
1501 (set-keymap-parent pascal-outline-map pascal-mode-map)) 1501 (setq pascal-outline-map (copy-keymap pascal-mode-map)))
1502 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun) 1502 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun)
1503 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun) 1503 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun)
1504 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun) 1504 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun)
@@ -1533,7 +1533,7 @@ Pascal Outline mode provides some additional commands.
1533 (interactive "P") 1533 (interactive "P")
1534 (setq pascal-outline-mode 1534 (setq pascal-outline-mode
1535 (if (null arg) (not pascal-outline-mode) t)) 1535 (if (null arg) (not pascal-outline-mode) t))
1536 (if (boundp 'redraw-mode-line) 1536 (if (fboundp 'redraw-mode-line)
1537 (redraw-mode-line)) 1537 (redraw-mode-line))
1538 (if pascal-outline-mode 1538 (if pascal-outline-mode
1539 (progn 1539 (progn