aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2011-09-07 23:08:02 +0200
committerJoakim Verona2011-09-07 23:08:02 +0200
commit94110bea46d4a1481b6f2f4e33cf8ce6ac6d8d62 (patch)
treefbde4dc571d870d20593329f3189a43672ad5b2a /lisp
parentcca374c8ffc682c33754424406b2e0bef4fd4560 (diff)
parentdcdc460c01cea51a03392b62416ed637adec80cb (diff)
downloademacs-94110bea46d4a1481b6f2f4e33cf8ce6ac6d8d62.tar.gz
emacs-94110bea46d4a1481b6f2f4e33cf8ce6ac6d8d62.zip
upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog28
-rw-r--r--lisp/help-mode.el1
-rw-r--r--lisp/progmodes/compile.el4
-rw-r--r--lisp/progmodes/grep.el32
-rw-r--r--lisp/simple.el6
-rw-r--r--lisp/vc/vc-git.el4
6 files changed, 58 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2efe3a5e7fe..9d9d564fa15 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,31 @@
12011-09-07 Chong Yidong <cyd@stupidchicken.com>
2
3 * help-mode.el (help-mode): Restore autoload.
4
52011-09-07 Juri Linkov <juri@jurta.org>
6
7 * progmodes/compile.el (compilation-start): Let-bind `thisenv' to
8 `compilation-environment'. Set buffer-local
9 `compilation-environment' to `thisenv' later after (funcall mode).
10 (Bug#8340)
11
12 * vc/vc-git.el (vc-git-grep): Remove --no-color. (Bug#9408)
13 (vc-git-grep): Prepend "PAGER=" to `compilation-environment'
14 instead of replacing its value. (Bug#8340)
15
162011-09-07 Juri Linkov <juri@jurta.org>
17
18 * progmodes/grep.el (grep-regexp-alist): Calculate column positions
19 based on text properties put by `grep-filter' instead of matching
20 escape sequences.
21 (grep-mode): Set buffer-local `compilation-error-screen-columns'
22 to the value of `grep-error-screen-columns' (bug#9438).
23
242011-09-07 Juri Linkov <juri@jurta.org>
25
26 * simple.el (next-error-highlight, next-error-highlight-no-select):
27 Doc fix (bug#9432).
28
12011-09-07 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change) 292011-09-07 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change)
2 30
3 * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): 31 * progmodes/cc-fonts.el (c-font-lock-enclosing-decls):
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 64c114c993d..5d67a6c4f4c 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -265,6 +265,7 @@ The format is (FUNCTION ARGS...).")
265 'help-function 'customize-create-theme 265 'help-function 'customize-create-theme
266 'help-echo (purecopy "mouse-2, RET: edit this theme file")) 266 'help-echo (purecopy "mouse-2, RET: edit this theme file"))
267 267
268;;;###autoload
268(define-derived-mode help-mode special-mode "Help" 269(define-derived-mode help-mode special-mode "Help"
269 "Major mode for viewing help text and navigating references in it. 270 "Major mode for viewing help text and navigating references in it.
270Entry to this mode runs the normal hook `help-mode-hook'. 271Entry to this mode runs the normal hook `help-mode-hook'.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 5f99cfe0028..4871c980fb5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1482,6 +1482,7 @@ Returns the compilation buffer created."
1482 "compilation" 1482 "compilation"
1483 (replace-regexp-in-string "-mode\\'" "" (symbol-name mode)))) 1483 (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))
1484 (thisdir default-directory) 1484 (thisdir default-directory)
1485 (thisenv compilation-environment)
1485 outwin outbuf) 1486 outwin outbuf)
1486 (with-current-buffer 1487 (with-current-buffer
1487 (setq outbuf 1488 (setq outbuf
@@ -1528,8 +1529,9 @@ Returns the compilation buffer created."
1528 ;; Remember the original dir, so we can use it when we recompile. 1529 ;; Remember the original dir, so we can use it when we recompile.
1529 ;; default-directory' can't be used reliably for that because it may be 1530 ;; default-directory' can't be used reliably for that because it may be
1530 ;; affected by the special handling of "cd ...;". 1531 ;; affected by the special handling of "cd ...;".
1531 ;; NB: must be fone after (funcall mode) as that resets local variables 1532 ;; NB: must be done after (funcall mode) as that resets local variables
1532 (set (make-local-variable 'compilation-directory) thisdir) 1533 (set (make-local-variable 'compilation-directory) thisdir)
1534 (set (make-local-variable 'compilation-environment) thisenv)
1533 (if highlight-regexp 1535 (if highlight-regexp
1534 (set (make-local-variable 'compilation-highlight-regexp) 1536 (set (make-local-variable 'compilation-highlight-regexp)
1535 highlight-regexp)) 1537 highlight-regexp))
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index de46dc19169..b3f9758bacf 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -344,7 +344,24 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
344;;;###autoload 344;;;###autoload
345(defconst grep-regexp-alist 345(defconst grep-regexp-alist
346 '(("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2" 346 '(("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"
347 1 3) 347 1 3
348 ;; Calculate column positions (col . end-col) of first grep match on a line
349 ((lambda ()
350 (when grep-highlight-matches
351 (let* ((beg (match-end 0))
352 (end (save-excursion (goto-char beg) (line-end-position)))
353 (mbeg (text-property-any beg end 'font-lock-face 'match)))
354 (when mbeg
355 (- mbeg beg)))))
356 .
357 (lambda ()
358 (when grep-highlight-matches
359 (let* ((beg (match-end 0))
360 (end (save-excursion (goto-char beg) (line-end-position)))
361 (mbeg (text-property-any beg end 'font-lock-face 'match))
362 (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end))))
363 (when mend
364 (- mend beg)))))))
348 ;; Rule to match column numbers is commented out since no known grep 365 ;; Rule to match column numbers is commented out since no known grep
349 ;; produces them 366 ;; produces them
350 ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\2\\)?" 367 ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\2\\)?"
@@ -353,17 +370,6 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
353 ;; handle weird file names (with colons in them) as well as possible. 370 ;; handle weird file names (with colons in them) as well as possible.
354 ;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:" in 371 ;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:" in
355 ;; file names. 372 ;; file names.
356 ("^\\(\\(.+?\\):\\([1-9][0-9]*\\):\\).*?\
357\\(\033\\[01;31m\\(?:\033\\[K\\)?\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
358 2 3
359 ;; Calculate column positions (beg . end) of first grep match on a line
360 ((lambda ()
361 (setq compilation-error-screen-columns nil)
362 (- (match-beginning 4) (match-end 1)))
363 .
364 (lambda () (- (match-end 5) (match-end 1)
365 (- (match-end 4) (match-beginning 4)))))
366 nil 1)
367 ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) 373 ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
368 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") 374 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
369 375
@@ -709,6 +715,8 @@ This function is called from `compilation-filter-hook'."
709 (set (make-local-variable 'compilation-process-setup-function) 715 (set (make-local-variable 'compilation-process-setup-function)
710 'grep-process-setup) 716 'grep-process-setup)
711 (set (make-local-variable 'compilation-disable-input) t) 717 (set (make-local-variable 'compilation-disable-input) t)
718 (set (make-local-variable 'compilation-error-screen-columns)
719 grep-error-screen-columns)
712 (add-hook 'compilation-filter-hook 'grep-filter nil t)) 720 (add-hook 'compilation-filter-hook 'grep-filter nil t))
713 721
714 722
diff --git a/lisp/simple.el b/lisp/simple.el
index fe46e36fdac..2d4f883f1ed 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -73,7 +73,8 @@ in seconds, or until the next command is executed.
73If t, highlight the locus until the next command is executed, or until 73If t, highlight the locus until the next command is executed, or until
74some other locus replaces it. 74some other locus replaces it.
75If nil, don't highlight the locus in the source buffer. 75If nil, don't highlight the locus in the source buffer.
76If `fringe-arrow', indicate the locus by the fringe arrow." 76If `fringe-arrow', indicate the locus by the fringe arrow
77indefinitely until some other locus replaces it."
77 :type '(choice (number :tag "Highlight for specified time") 78 :type '(choice (number :tag "Highlight for specified time")
78 (const :tag "Semipermanent highlighting" t) 79 (const :tag "Semipermanent highlighting" t)
79 (const :tag "No highlighting" nil) 80 (const :tag "No highlighting" nil)
@@ -86,7 +87,8 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
86If number, highlight the locus in `next-error' face for given time in seconds. 87If number, highlight the locus in `next-error' face for given time in seconds.
87If t, highlight the locus indefinitely until some other locus replaces it. 88If t, highlight the locus indefinitely until some other locus replaces it.
88If nil, don't highlight the locus in the source buffer. 89If nil, don't highlight the locus in the source buffer.
89If `fringe-arrow', indicate the locus by the fringe arrow." 90If `fringe-arrow', indicate the locus by the fringe arrow
91indefinitely until some other locus replaces it."
90 :type '(choice (number :tag "Highlight for specified time") 92 :type '(choice (number :tag "Highlight for specified time")
91 (const :tag "Semipermanent highlighting" t) 93 (const :tag "Semipermanent highlighting" t)
92 (const :tag "No highlighting" nil) 94 (const :tag "No highlighting" nil)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index fc42b43c97d..1bb246fea0b 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -988,7 +988,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
988 (setq command nil)) 988 (setq command nil))
989 (setq dir (file-name-as-directory (expand-file-name dir))) 989 (setq dir (file-name-as-directory (expand-file-name dir)))
990 (setq command 990 (setq command
991 (grep-expand-template "git grep --no-color -n -e <R> -- <F>" 991 (grep-expand-template "git grep -n -e <R> -- <F>"
992 regexp files)) 992 regexp files))
993 (when command 993 (when command
994 (if (equal current-prefix-arg '(4)) 994 (if (equal current-prefix-arg '(4))
@@ -998,7 +998,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
998 (add-to-history 'grep-history command)))) 998 (add-to-history 'grep-history command))))
999 (when command 999 (when command
1000 (let ((default-directory dir) 1000 (let ((default-directory dir)
1001 (compilation-environment '("PAGER="))) 1001 (compilation-environment (cons "PAGER=" compilation-environment)))
1002 ;; Setting process-setup-function makes exit-message-function work 1002 ;; Setting process-setup-function makes exit-message-function work
1003 ;; even when async processes aren't supported. 1003 ;; even when async processes aren't supported.
1004 (compilation-start command 'grep-mode)) 1004 (compilation-start command 'grep-mode))