aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2005-06-30 00:31:46 +0000
committerMiles Bader2005-06-30 00:31:46 +0000
commiteeb88b27e1dbd3f412aa684d44e4a784f6e536a2 (patch)
tree23ea1eda87f588e060b6c00e9c7ffac6a89a7e42 /lisp/progmodes
parent16e1457021e3f6e3b83fc9b5262fde38b7140c96 (diff)
parent84861437f914ac45c1eea7b6477ffc4783bb3bdd (diff)
downloademacs-eeb88b27e1dbd3f412aa684d44e4a784f6e536a2.tar.gz
emacs-eeb88b27e1dbd3f412aa684d44e4a784f6e536a2.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-67
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 447-458) - Update from CVS - Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 83-85) - Merge from emacs--cvs-trunk--0 - Update from CVS
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el53
-rw-r--r--lisp/progmodes/cperl-mode.el15
-rw-r--r--lisp/progmodes/gud.el13
-rw-r--r--lisp/progmodes/python.el1
4 files changed, 61 insertions, 21 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 3f3b385c5ed..f8da248535b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -493,25 +493,60 @@ starting the compilation process.")
493;; backward-compatibility alias 493;; backward-compatibility alias
494(put 'compilation-info-face 'face-alias 'compilation-info) 494(put 'compilation-info-face 'face-alias 'compilation-info)
495 495
496(defface compilation-error-file-name
497 '((default :inherit font-lock-warning-face)
498 (((supports :underline t)) :underline t))
499 "Face for displaying file names in compilation errors."
500 :group 'font-lock-highlighting-faces
501 :version "22.1")
502
503(defface compilation-warning-file-name
504 '((default :inherit font-lock-warning-face)
505 (((supports :underline t)) :underline t))
506 "Face for displaying file names in compilation errors."
507 :group 'font-lock-highlighting-faces
508 :version "22.1")
509
510(defface compilation-info-file-name
511 '((default :inherit compilation-info)
512 (((supports :underline t)) :underline t))
513 "Face for displaying file names in compilation errors."
514 :group 'font-lock-highlighting-faces
515 :version "22.1")
516
517(defface compilation-line-number
518 '((default :inherit font-lock-variable-name-face)
519 (((supports :underline t)) :underline t))
520 "Face for displaying file names in compilation errors."
521 :group 'font-lock-highlighting-faces
522 :version "22.1")
523
524(defface compilation-column-number
525 '((default :inherit font-lock-type-face)
526 (((supports :underline t)) :underline t))
527 "Face for displaying file names in compilation errors."
528 :group 'font-lock-highlighting-faces
529 :version "22.1")
530
496(defvar compilation-message-face nil 531(defvar compilation-message-face nil
497 "Face name to use for whole messages. 532 "Face name to use for whole messages.
498Faces `compilation-error-face', `compilation-warning-face', 533Faces `compilation-error-face', `compilation-warning-face',
499`compilation-info-face', `compilation-line-face' and 534`compilation-info-face', `compilation-line-face' and
500`compilation-column-face' get prepended to this, when applicable.") 535`compilation-column-face' get prepended to this, when applicable.")
501 536
502(defvar compilation-error-face 'font-lock-warning-face 537(defvar compilation-error-face 'compilation-error-file-name
503 "Face name to use for file name in error messages.") 538 "Face name to use for file name in error messages.")
504 539
505(defvar compilation-warning-face 'compilation-warning 540(defvar compilation-warning-face 'compilation-warning-file-name
506 "Face name to use for file name in warning messages.") 541 "Face name to use for file name in warning messages.")
507 542
508(defvar compilation-info-face 'compilation-info 543(defvar compilation-info-face 'compilation-info-file-name
509 "Face name to use for file name in informational messages.") 544 "Face name to use for file name in informational messages.")
510 545
511(defvar compilation-line-face 'font-lock-variable-name-face 546(defvar compilation-line-face 'compilation-line-number
512 "Face name to use for line number in message.") 547 "Face name to use for line number in message.")
513 548
514(defvar compilation-column-face 'font-lock-type-face 549(defvar compilation-column-face 'compilation-column-number
515 "Face name to use for column number in message.") 550 "Face name to use for column number in message.")
516 551
517;; same faces as dired uses 552;; same faces as dired uses
@@ -1342,8 +1377,9 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'."
1342 (force-mode-line-update) 1377 (force-mode-line-update)
1343 (if (and opoint (< opoint omax)) 1378 (if (and opoint (< opoint omax))
1344 (goto-char opoint)) 1379 (goto-char opoint))
1345 (if compilation-finish-function 1380 (with-no-warnings
1346 (funcall compilation-finish-function (current-buffer) msg)) 1381 (if compilation-finish-function
1382 (funcall compilation-finish-function (current-buffer) msg)))
1347 (let ((functions compilation-finish-functions)) 1383 (let ((functions compilation-finish-functions))
1348 (while functions 1384 (while functions
1349 (funcall (car functions) (current-buffer) msg) 1385 (funcall (car functions) (current-buffer) msg)
@@ -1501,8 +1537,9 @@ Use this command in a compilation log buffer. Sets the mark at point there."
1501 1537
1502;;;###autoload 1538;;;###autoload
1503(defun compilation-next-error-function (n &optional reset) 1539(defun compilation-next-error-function (n &optional reset)
1540 "Advance to the next error message and visit the file where the error was.
1541This is the value of `next-error-function' in Compilation buffers."
1504 (interactive "p") 1542 (interactive "p")
1505 (set-buffer (compilation-find-buffer))
1506 (when reset 1543 (when reset
1507 (setq compilation-current-error nil)) 1544 (setq compilation-current-error nil))
1508 (let* ((columns compilation-error-screen-columns) ; buffer's local value 1545 (let* ((columns compilation-error-screen-columns) ; buffer's local value
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index d95c0294c4d..052df4eedda 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1516,7 +1516,8 @@ or as help on variables `cperl-tips', `cperl-problems',
1516 (t 1516 (t
1517 '((cperl-load-font-lock-keywords 1517 '((cperl-load-font-lock-keywords
1518 cperl-load-font-lock-keywords-1 1518 cperl-load-font-lock-keywords-1
1519 cperl-load-font-lock-keywords-2))))) 1519 cperl-load-font-lock-keywords-2)
1520 nil nil ((?_ . "w"))))))
1520 (make-local-variable 'cperl-syntax-state) 1521 (make-local-variable 'cperl-syntax-state)
1521 (if cperl-use-syntax-table-text-property 1522 (if cperl-use-syntax-table-text-property
1522 (progn 1523 (progn
@@ -3840,7 +3841,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3840 (and (buffer-modified-p) 3841 (and (buffer-modified-p)
3841 (not modified) 3842 (not modified)
3842 (set-buffer-modified-p nil)) 3843 (set-buffer-modified-p nil))
3843 (set-syntax-table cperl-mode-syntax-table)) 3844 ;; I do not understand what this is doing here. It breaks font-locking
3845 ;; because it resets the syntax-table from font-lock-syntax-table to
3846 ;; cperl-mode-syntax-table.
3847 ;; (set-syntax-table cperl-mode-syntax-table)
3848 )
3844 (car err-l))) 3849 (car err-l)))
3845 3850
3846(defun cperl-backward-to-noncomment (lim) 3851(defun cperl-backward-to-noncomment (lim)
@@ -4350,7 +4355,7 @@ indentation and initial hashes. Behaves usually outside of comment."
4350 fill-column) 4355 fill-column)
4351 (let ((c (save-excursion (beginning-of-line) 4356 (let ((c (save-excursion (beginning-of-line)
4352 (cperl-to-comment-or-eol) (point))) 4357 (cperl-to-comment-or-eol) (point)))
4353 (s (memq (following-char) '(?\ ?\t))) marker) 4358 (s (memq (following-char) '(?\s ?\t))) marker)
4354 (if (>= c (point)) 4359 (if (>= c (point))
4355 ;; Don't break line inside code: only inside comment. 4360 ;; Don't break line inside code: only inside comment.
4356 nil 4361 nil
@@ -4361,11 +4366,11 @@ indentation and initial hashes. Behaves usually outside of comment."
4361 (if (bolp) (progn (re-search-forward "#+[ \t]*") 4366 (if (bolp) (progn (re-search-forward "#+[ \t]*")
4362 (goto-char (match-end 0)))) 4367 (goto-char (match-end 0))))
4363 ;; Following space could have gone: 4368 ;; Following space could have gone:
4364 (if (or (not s) (memq (following-char) '(?\ ?\t))) nil 4369 (if (or (not s) (memq (following-char) '(?\s ?\t))) nil
4365 (insert " ") 4370 (insert " ")
4366 (backward-char 1)) 4371 (backward-char 1))
4367 ;; Previous space could have gone: 4372 ;; Previous space could have gone:
4368 (or (memq (preceding-char) '(?\ ?\t)) (insert " ")))))) 4373 (or (memq (preceding-char) '(?\s ?\t)) (insert " "))))))
4369 4374
4370(defun cperl-imenu-addback (lst &optional isback name) 4375(defun cperl-imenu-addback (lst &optional isback name)
4371 ;; We suppose that the lst is a DAG, unless the first element only 4376 ;; We suppose that the lst is a DAG, unless the first element only
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index c6e85934db4..dc7e64e6e35 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2534,16 +2534,13 @@ It is saved for when this flag is not set.")
2534 ;; This must be outside of the save-excursion 2534 ;; This must be outside of the save-excursion
2535 ;; in case the source file is our current buffer. 2535 ;; in case the source file is our current buffer.
2536 (if process-window 2536 (if process-window
2537 (save-selected-window 2537 (progn
2538 (select-window process-window) 2538 (with-selected-window process-window
2539 (gud-display-frame)) 2539 (gud-display-frame)))
2540 ;; We have to be in the proper buffer, (process-buffer proc), 2540 ;; We have to be in the proper buffer, (process-buffer proc),
2541 ;; but not in a save-excursion, because that would restore point. 2541 ;; but not in a save-excursion, because that would restore point.
2542 (let ((old-buf (current-buffer))) 2542 (with-current-buffer (process-buffer proc)
2543 (set-buffer (process-buffer proc)) 2543 (gud-display-frame))))
2544 (unwind-protect
2545 (gud-display-frame)
2546 (set-buffer old-buf)))))
2547 2544
2548 ;; If we deferred text that arrived during this processing, 2545 ;; If we deferred text that arrived during this processing,
2549 ;; handle it now. 2546 ;; handle it now.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 3f556bdb695..70ea8b4bac6 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -949,6 +949,7 @@ See `python-check-command' for the default."
949 (if name 949 (if name
950 (file-name-nondirectory name)))))))) 950 (file-name-nondirectory name))))))))
951 (setq python-saved-check-command command) 951 (setq python-saved-check-command command)
952 (require 'compile) ;To define compilation-* variables.
952 (save-some-buffers (not compilation-ask-about-save) nil) 953 (save-some-buffers (not compilation-ask-about-save) nil)
953 (let ((compilation-error-regexp-alist 954 (let ((compilation-error-regexp-alist
954 (cons '("(\\([^,]+\\), line \\([0-9]+\\))" 1 2) 955 (cons '("(\\([^,]+\\), line \\([0-9]+\\))" 1 2)