aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2010-03-08 10:53:37 +0900
committerKenichi Handa2010-03-08 10:53:37 +0900
commit59513a2f81060efb01a8a6d684901718c3b4d236 (patch)
tree5433967c8574959bf737f94ea33ed5edf5c8a177
parentb799f2211562060966feabf1975a11b3985264a9 (diff)
parentb327c9751037d3d8abc7485c6a78ec96f4da1c1e (diff)
downloademacs-59513a2f81060efb01a8a6d684901718c3b4d236.tar.gz
emacs-59513a2f81060efb01a8a6d684901718c3b4d236.zip
from trunk
-rw-r--r--doc/emacs/ChangeLog7
-rw-r--r--doc/emacs/custom.texi7
-rw-r--r--doc/emacs/major.texi34
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/objects.texi7
-rw-r--r--etc/ChangeLog9
-rw-r--r--etc/NEWS13
-rw-r--r--etc/refcards/Makefile5
-rw-r--r--etc/refcards/orgcard.tex7
-rw-r--r--etc/srecode/default.srt8
-rw-r--r--lisp/ChangeLog51
-rw-r--r--lisp/calculator.el3
-rw-r--r--lisp/cedet/semantic/grammar.el12
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/macros.el3
-rw-r--r--lisp/mail/rfc822.el40
-rw-r--r--lisp/man.el3
-rw-r--r--lisp/vc-git.el177
-rw-r--r--src/ChangeLog18
-rw-r--r--src/bytecode.c1
-rw-r--r--src/keymap.c36
-rw-r--r--src/lisp.h23
-rw-r--r--src/regex.c7
-rw-r--r--src/syntax.c8
-rw-r--r--test/cedet/ede-tests.el28
-rw-r--r--test/cedet/srecode-tests.el29
26 files changed, 369 insertions, 174 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index a9d7e1bcf69..55ae0882882 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,10 @@
12010-03-06 Chong Yidong <cyd@stupidchicken.com>
2
3 * custom.texi (Init Examples): Add xref to Locals.
4
5 * major.texi (Choosing Modes): Mention usage of setq-default for
6 setting the default value of major-mode (Bug#5688).
7
12010-03-02 Chong Yidong <cyd@stupidchicken.com> 82010-03-02 Chong Yidong <cyd@stupidchicken.com>
2 9
3 * frames.texi (Mouse Avoidance): Mention make-pointer-invisible. 10 * frames.texi (Mouse Avoidance): Mention make-pointer-invisible.
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index a4914531192..408de24ed6e 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2256,9 +2256,10 @@ override this).
2256@end example 2256@end example
2257 2257
2258This sets the default value, which is effective in all buffers that do 2258This sets the default value, which is effective in all buffers that do
2259not have local values for the variable. Setting @code{case-fold-search} 2259not have local values for the variable (@pxref{Locals}). Setting
2260with @code{setq} affects only the current buffer's local value, which 2260@code{case-fold-search} with @code{setq} affects only the current
2261is not what you probably want to do in an init file. 2261buffer's local value, which is probably not what you want to do in an
2262init file.
2262 2263
2263@item 2264@item
2264@vindex user-mail-address 2265@vindex user-mail-address
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi
index e2e7c3d2a4c..19ab86f91dd 100644
--- a/doc/emacs/major.texi
+++ b/doc/emacs/major.texi
@@ -196,17 +196,33 @@ only after @code{auto-mode-alist}. By default,
196@code{magic-fallback-mode-alist} contains forms that check for image 196@code{magic-fallback-mode-alist} contains forms that check for image
197files, HTML/XML/SGML files, and Postscript files. 197files, HTML/XML/SGML files, and Postscript files.
198 198
199 When you visit a file that does not specify a major mode to use, or 199@vindex major-mode
200when you create a new buffer with @kbd{C-x b}, the default value of 200 Once a major mode is chosen, Emacs sets the value of the variable
201the variable @code{major-mode} specifies which major mode to use. Normally 201@code{major-mode} to the symbol for that major mode (e.g.,
202its value is the symbol @code{fundamental-mode}, which specifies 202@code{text-mode} for Text mode). This is a per-buffer variable
203Fundamental mode. If the default value of @code{major-mode} is @code{nil}, 203(@pxref{Locals}); its buffer-local value is set automatically, and you
204the major mode is taken from the previously current buffer. 204should not change it yourself.
205
206 The default value of @code{major-mode} determines the major mode to
207use for files that do not specify a major mode, and for new buffers
208created with @kbd{C-x b}. Normally, this default value is the symbol
209@code{fundamental-mode}, which specifies Fundamental mode. You can
210change it via the Customization interface (@pxref{Easy
211Customization}), or by adding a line like this to your init file
212(@pxref{Init File}):
213
214@smallexample
215(setq-default major-mode 'text-mode)
216@end smallexample
217
218@noindent
219If the default value of @code{major-mode} is @code{nil}, the major
220mode is taken from the previously current buffer.
205 221
206@findex normal-mode 222@findex normal-mode
207 If you change the major mode of a buffer, you can go back to the major 223 If you have changed the major mode of a buffer, you can return to
208mode Emacs would choose automatically: use the command @kbd{M-x 224the major mode Emacs would have chosen automatically, by typing
209normal-mode} to do this. This is the same function that 225@kbd{M-x normal-mode}. This is the same function that
210@code{find-file} calls to choose the major mode. It also processes 226@code{find-file} calls to choose the major mode. It also processes
211the file's @samp{-*-} line or local variables list (if any). 227the file's @samp{-*-} line or local variables list (if any).
212@xref{File Variables}. 228@xref{File Variables}.
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 755e83b65ef..1b9e028e598 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12010-03-06 Chong Yidong <cyd@stupidchicken.com>
2
3 * objects.texi (Integer Type): Take note of the read syntax
4 exception for numbers that cannot fit in the integer type.
5
12010-03-03 Glenn Morris <rgm@gnu.org> 62010-03-03 Glenn Morris <rgm@gnu.org>
2 7
3 * numbers.texi (Integer Basics, Bitwise Operations): 8 * numbers.texi (Integer Basics, Bitwise Operations):
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 26c17f09f0e..5c3ac13cdaf 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -200,6 +200,13 @@ leading @samp{+} or a final @samp{.}.
200@end group 200@end group
201@end example 201@end example
202 202
203@noindent
204As a special exception, if a sequence of digits specifies an integer
205too large or too small to be a valid integer object, the Lisp reader
206reads it as a floating-point number (@pxref{Floating Point Type}).
207For instance, on most machines @code{536870912} is read as the
208floating-point number @code{536870912.0}.
209
203 @xref{Numbers}, for more information. 210 @xref{Numbers}, for more information.
204 211
205@node Floating Point Type 212@node Floating Point Type
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 9fbdeabb6cd..b45e48a7edb 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,12 @@
12010-03-06 Glenn Morris <rgm@gnu.org>
2
3 * srecode/default.srt (COPYRIGHT): Update template copyright to GPLv3+.
4
52010-03-05 Glenn Morris <rgm@gnu.org>
6
7 * refcards/orgcard.tex: Use pdflayout.sty.
8 * refcards/Makefile (orgcard.pdf): Special rule no longer needed.
9
12010-03-02 Glenn Morris <rgm@gnu.org> 102010-03-02 Glenn Morris <rgm@gnu.org>
2 11
3 * refcards/Makefile: For cs- and sk-, use pdfcsplain if available. 12 * refcards/Makefile: For cs- and sk-, use pdfcsplain if available.
diff --git a/etc/NEWS b/etc/NEWS
index ecff7f0342e..00c4765f822 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -123,11 +123,6 @@ international/ucs-normalize.el.
123** Function arguments in *Help* buffers are now shown in upper-case. 123** Function arguments in *Help* buffers are now shown in upper-case.
124Customize `help-downcase-arguments' to t to show them in lower-case. 124Customize `help-downcase-arguments' to t to show them in lower-case.
125 125
126** Delete Auto Composition Mode. Now the variable
127`auto-composition-mode' is simply a buffer local variable. The
128commands `auto-composition-mode' and `global-auto-composition-mode'
129still works as before.
130
131 126
132* Editing Changes in Emacs 23.2 127* Editing Changes in Emacs 23.2
133 128
@@ -437,6 +432,14 @@ System (CLOS). It is used by the other CEDET packages.
437 432
438* Incompatible Lisp Changes in Emacs 23.2 433* Incompatible Lisp Changes in Emacs 23.2
439 434
435+++
436** The Lisp reader turns integers that are too large/small into floats.
437For instance, on machines where `536870911' is the largest integer,
438reading `536870912' gives the floating-point object `536870912.0'.
439
440This change only concerns the Lisp reader; it does not affect how
441actual integer objects overflow.
442
440--- 443---
441** Several obsolete functions removed. 444** Several obsolete functions removed.
442The functions have been obsolete since Emacs 19, and are unlikely to 445The functions have been obsolete since Emacs 19, and are unlikely to
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile
index c08a9b2cfab..c1bddd124d7 100644
--- a/etc/refcards/Makefile
+++ b/etc/refcards/Makefile
@@ -81,16 +81,11 @@ gnus-refcard.pdf: %.pdf: %.tex gnus-logo.pdf
81gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf 81gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf
82 pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' 82 pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
83 83
84## FIXME just pdftex produces portrait rather than landscape.
85orgcard.pdf: orgcard.ps
86 ps2pdf $<
87
88## Everything not explicitly listed above. 84## Everything not explicitly listed above.
89%.pdf: %.tex 85%.pdf: %.tex
90 pdftex $< 86 pdftex $<
91 87
92 88
93
94## dvi files. 89## dvi files.
95 90
96cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \ 91cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index ff498236467..c35cafbba52 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -9,14 +9,17 @@
9 9
10% This file can be printed with 1, 2, or 3 columns per page (see below). 10% This file can be printed with 1, 2, or 3 columns per page (see below).
11% Specify how many you want here. 11% Specify how many you want here.
12
13\columnsperpage=3 12\columnsperpage=3
14 13
15% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful 14% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful
16% only when columnsperpage is 2 or 3. 15% only when columnsperpage is 2 or 3.
17
18\letterpaper=0 16\letterpaper=0
19 17
18% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
19% a landscape layout.
20\input pdflayout.sty
21\pdflayout=(0l)
22
20% Nothing else needs to be changed below this line. 23% Nothing else needs to be changed below this line.
21% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005, 24% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
22% 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 25% 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
diff --git a/etc/srecode/default.srt b/etc/srecode/default.srt
index 7d83d550f10..b42de2f7835 100644
--- a/etc/srecode/default.srt
+++ b/etc/srecode/default.srt
@@ -25,8 +25,8 @@ set comment_start "#"
25 25
26set COPYRIGHT "This program is free software; you can redistribute it and/or 26set COPYRIGHT "This program is free software; you can redistribute it and/or
27modify it under the terms of the GNU General Public License as 27modify it under the terms of the GNU General Public License as
28published by the Free Software Foundation; either version 2, or (at 28published by the Free Software Foundation, either version 3 of the
29your option) any later version. 29License, or (at your option) any later version.
30 30
31This program is distributed in the hope that it will be useful, but 31This program is distributed in the hope that it will be useful, but
32WITHOUT ANY WARRANTY; without even the implied warranty of 32WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,9 +34,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34General Public License for more details. 34General Public License for more details.
35 35
36You should have received a copy of the GNU General Public License 36You should have received a copy of the GNU General Public License
37along with this program; see the file COPYING. If not, write to 37along with this program. If not, see http://www.gnu.org/licenses/."
38the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
39Boston, MA 02110-1301, USA."
40 38
41set DOLLAR "$" 39set DOLLAR "$"
42 40
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 28aa2840349..2edeaf17894 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,43 @@
3 * language/misc-lang.el (windows-1256): New coding system. 3 * language/misc-lang.el (windows-1256): New coding system.
4 (cp1256): New alias of windows-1256 (bug#5684). 4 (cp1256): New alias of windows-1256 (bug#5684).
5 5
62010-03-07 Andreas Schwab <schwab@linux-m68k.org>
7
8 * mail/rfc822.el (rfc822-addresses): Move catch clause down around
9 call to rfc822-bad-address. (Bug#5692)
10
112010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change)
12
13 * vc-git.el (vc-git-annotate-extract-revision-at-line): Use
14 vc-git-root as default direcotry for revision path (Bug#5657).
15
162010-03-06 Chong Yidong <cyd@stupidchicken.com>
17
18 * calculator.el (calculator): Don't bind split-window-keep-point
19 (Bug#5674).
20
212010-03-06 Stefan Monnier <monnier@iro.umontreal.ca>
22
23 * vc-git.el: Re-flow to fit into 80 columns.
24 (vc-git-after-dir-status-stage, vc-git-dir-status-goto-stage):
25 Remove spurious `quote' element in each case alternative.
26 (vc-git-show-log-entry): Use prog1.
27 (vc-git-after-dir-status-stage): Remove unused var `remaining'.
28
292010-03-06 Glenn Morris <rgm@gnu.org>
30
31 * cedet/semantic/grammar.el (semantic-grammar-header-template):
32 Update template copyright to GPLv3+.
33
342010-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
35
36 * man.el (Man-files-regexp): Tighten up the regexp (bug#5686).
37
382010-03-03 Chong Yidong <cyd@stupidchicken.com>
39
40 * macros.el (insert-kbd-macro): Look up keyboard macro using the
41 definition, not the name (Bug#5481).
42
62010-03-03 Štěpán Němec <stepnem@gmail.com> (tiny change) 432010-03-03 Štěpán Němec <stepnem@gmail.com> (tiny change)
7 44
8 * subr.el (momentary-string-display): Don't overwrite the MESSAGE 45 * subr.el (momentary-string-display): Don't overwrite the MESSAGE
@@ -27,19 +64,17 @@
27 64
282010-03-01 Alan Mackenzie <acm@muc.de> 652010-03-01 Alan Mackenzie <acm@muc.de>
29 66
30 * progmodes/cc-engine.el (c-remove-stale-state-cache): Correct 67 * progmodes/cc-engine.el (c-remove-stale-state-cache):
31 previous patch. 68 Correct previous patch.
32 69
332010-03-01 Kenichi Handa <handa@m17n.org> 702010-03-01 Kenichi Handa <handa@m17n.org>
34 71
35 * language/burmese.el (burmese-composable-pattern): Renamed from 72 * language/burmese.el (burmese-composable-pattern): Rename from
36 myanmar-composable-pattern. 73 myanmar-composable-pattern.
37 74
38 * international/characters.el (script-list): Change myanmar to 75 * international/characters.el (script-list):
39 burmese. 76 * international/fontset.el (script-representative-chars):
40 77 Change myanmar to burmese.
41 * international/fontset.el (script-representative-chars): Change
42 myanmar to burmese.
43 (otf-script-alist): Likewise. 78 (otf-script-alist): Likewise.
44 (setup-default-fontset): Likewise. Re-fix :otf spec. 79 (setup-default-fontset): Likewise. Re-fix :otf spec.
45 80
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 015fb4cd763..d1b9b517e5f 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -724,8 +724,7 @@ See the documentation for `calculator-mode' for more information."
724 (progn 724 (progn
725 (cond 725 (cond
726 ((not (get-buffer-window calculator-buffer)) 726 ((not (get-buffer-window calculator-buffer))
727 (let ((split-window-keep-point nil) 727 (let ((window-min-height 2))
728 (window-min-height 2))
729 ;; maybe leave two lines for our window because of the normal 728 ;; maybe leave two lines for our window because of the normal
730 ;; `raised' modeline in Emacs 21 729 ;; `raised' modeline in Emacs 21
731 (select-window 730 (select-window
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 2538026a1e3..8f5d1cd3e14 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -573,21 +573,19 @@ Typically a DEFINE expression should look like this:
573;; X-RCS: " vcid " 573;; X-RCS: " vcid "
574 574
575;; This file is not part of GNU Emacs. 575;; This file is not part of GNU Emacs.
576;; 576
577;; This program is free software; you can redistribute it and/or 577;; This program is free software; you can redistribute it and/or
578;; modify it under the terms of the GNU General Public License as 578;; modify it under the terms of the GNU General Public License as
579;; published by the Free Software Foundation; either version 2, or (at 579;; published by the Free Software Foundation, either version 3 of
580;; your option) any later version. 580;; the License, or (at your option) any later version.
581;; 581
582;; This software is distributed in the hope that it will be useful, 582;; This software is distributed in the hope that it will be useful,
583;; but WITHOUT ANY WARRANTY; without even the implied warranty of 583;; but WITHOUT ANY WARRANTY; without even the implied warranty of
584;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 584;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
585;; General Public License for more details. 585;; General Public License for more details.
586;; 586;;
587;; You should have received a copy of the GNU General Public License 587;; You should have received a copy of the GNU General Public License
588;; along with GNU Emacs; see the file COPYING. If not, write to the 588;; along with this program. If not, see <http://www.gnu.org/licenses/>.
589;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
590;; Boston, MA 02110-1301, USA.
591 589
592;;; Commentary: 590;;; Commentary:
593;; 591;;
diff --git a/lisp/info.el b/lisp/info.el
index 690fa4ff8e0..a1ce05d6292 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3062,6 +3062,8 @@ Give an empty topic name to go to the Index node itself."
3062 num (1- num))) 3062 num (1- num)))
3063 (Info-goto-node (nth 1 (car Info-index-alternatives))) 3063 (Info-goto-node (nth 1 (car Info-index-alternatives)))
3064 (if (> (nth 3 (car Info-index-alternatives)) 0) 3064 (if (> (nth 3 (car Info-index-alternatives)) 0)
3065 ;; Forward 2 lines less because `Info-find-node-2' initially
3066 ;; puts point to the 2nd line.
3065 (forward-line (- (nth 3 (car Info-index-alternatives)) 2)) 3067 (forward-line (- (nth 3 (car Info-index-alternatives)) 2))
3066 (forward-line 3) ; don't search in headers 3068 (forward-line 3) ; don't search in headers
3067 (let ((name (car (car Info-index-alternatives)))) 3069 (let ((name (car (car Info-index-alternatives))))
diff --git a/lisp/macros.el b/lisp/macros.el
index 4188a432fe5..fa45d8c6108 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -138,7 +138,8 @@ use this command, and then save the file."
138 (prin1 definition (current-buffer)))) 138 (prin1 definition (current-buffer))))
139 (insert ")\n") 139 (insert ")\n")
140 (if keys 140 (if keys
141 (let ((keys (where-is-internal macroname '(keymap)))) 141 (let ((keys (where-is-internal (symbol-function macroname)
142 '(keymap))))
142 (while keys 143 (while keys
143 (insert "(global-set-key ") 144 (insert "(global-set-key ")
144 (prin1 (car keys) (current-buffer)) 145 (prin1 (car keys) (current-buffer))
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index e1e6932a560..3048d56674b 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -296,26 +296,26 @@
296 ;; initial value to prevent rfc822-bad-address from 296 ;; initial value to prevent rfc822-bad-address from
297 ;; raising a wrong-type-argument error 297 ;; raising a wrong-type-argument error
298 (rfc822-address-start (point))) 298 (rfc822-address-start (point)))
299 (catch 'address ; this is for rfc822-bad-address 299 (rfc822-nuke-whitespace)
300 (rfc822-nuke-whitespace) 300 (while (not (eobp))
301 (while (not (eobp)) 301 (setq rfc822-address-start (point))
302 (setq rfc822-address-start (point)) 302 (setq tem
303 (setq tem 303 (cond ((rfc822-looking-at ?\,)
304 (cond ((rfc822-looking-at ?\,) 304 nil)
305 nil) 305 ((looking-at "[][\000-\037@;:\\.>)]")
306 ((looking-at "[][\000-\037@;:\\.>)]") 306 (forward-char)
307 (forward-char) 307 (catch 'address ; this is for rfc822-bad-address
308 (rfc822-bad-address 308 (rfc822-bad-address
309 (format "Strange character \\%c found" 309 (format "Strange character \\%c found"
310 (preceding-char)))) 310 (preceding-char)))))
311 (t 311 (t
312 (rfc822-addresses-1 t)))) 312 (rfc822-addresses-1 t))))
313 (cond ((null tem)) 313 (cond ((null tem))
314 ((stringp tem) 314 ((stringp tem)
315 (setq list (cons tem list))) 315 (setq list (cons tem list)))
316 (t 316 (t
317 (setq list (nconc (nreverse tem) list))))) 317 (setq list (nconc (nreverse tem) list)))))
318 (nreverse list)))) 318 (nreverse list)))
319 (and buf (kill-buffer buf)))))) 319 (and buf (kill-buffer buf))))))
320 320
321(provide 'rfc822) 321(provide 'rfc822)
diff --git a/lisp/man.el b/lisp/man.el
index d64846a2d4d..8eb5f73e245 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -283,7 +283,8 @@ This regular expression should start with a `^' character.")
283 "Regular expression for SYNOPSIS heading (or your equivalent). 283 "Regular expression for SYNOPSIS heading (or your equivalent).
284This regexp should not start with a `^' character.") 284This regexp should not start with a `^' character.")
285 285
286(defvar Man-files-regexp "FILES" 286(defvar Man-files-regexp "FILES\\>"
287 ;; Add \> so as not to match mount(8)'s FILESYSTEM INDEPENDENT MOUNT OPTIONS.
287 "Regular expression for FILES heading (or your equivalent). 288 "Regular expression for FILES heading (or your equivalent).
288This regexp should not start with a `^' character.") 289This regexp should not start with a `^' character.")
289 290
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 0d8e6307d6e..9362ad743ee 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -69,8 +69,8 @@
69;; * revert (file &optional contents-done) OK 69;; * revert (file &optional contents-done) OK
70;; - rollback (files) COULD BE SUPPORTED 70;; - rollback (files) COULD BE SUPPORTED
71;; - merge (file rev1 rev2) It would be possible to merge 71;; - merge (file rev1 rev2) It would be possible to merge
72;; changes into a single file, but when 72;; changes into a single file, but
73;; committing they wouldn't 73;; when committing they wouldn't
74;; be identified as a merge 74;; be identified as a merge
75;; by git, so it's probably 75;; by git, so it's probably
76;; not a good idea. 76;; not a good idea.
@@ -130,7 +130,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
130 130
131;;;###autoload (defun vc-git-registered (file) 131;;;###autoload (defun vc-git-registered (file)
132;;;###autoload "Return non-nil if FILE is registered with git." 132;;;###autoload "Return non-nil if FILE is registered with git."
133;;;###autoload (if (vc-find-root file ".git") ; short cut 133;;;###autoload (if (vc-find-root file ".git") ; Short cut.
134;;;###autoload (progn 134;;;###autoload (progn
135;;;###autoload (load "vc-git") 135;;;###autoload (load "vc-git")
136;;;###autoload (vc-git-registered file)))) 136;;;###autoload (vc-git-registered file))))
@@ -149,9 +149,11 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
149 (str (ignore-errors 149 (str (ignore-errors
150 (cd dir) 150 (cd dir)
151 (vc-git--out-ok "ls-files" "-c" "-z" "--" name) 151 (vc-git--out-ok "ls-files" "-c" "-z" "--" name)
152 ;; if result is empty, use ls-tree to check for deleted file 152 ;; If result is empty, use ls-tree to check for deleted
153 ;; file.
153 (when (eq (point-min) (point-max)) 154 (when (eq (point-min) (point-max))
154 (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEAD" "--" name)) 155 (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEAD"
156 "--" name))
155 (buffer-string)))) 157 (buffer-string))))
156 (and str 158 (and str
157 (> (length str) (length name)) 159 (> (length str) (length name))
@@ -173,7 +175,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
173 (if (not (vc-git-registered file)) 175 (if (not (vc-git-registered file))
174 'unregistered 176 'unregistered
175 (vc-git--call nil "add" "--refresh" "--" (file-relative-name file)) 177 (vc-git--call nil "add" "--refresh" "--" (file-relative-name file))
176 (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--"))) 178 (let ((diff (vc-git--run-command-string
179 file "diff-index" "-z" "HEAD" "--")))
177 (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0" 180 (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0"
178 diff)) 181 diff))
179 (vc-git--state-code (match-string 1 diff)) 182 (vc-git--state-code (match-string 1 diff))
@@ -206,11 +209,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
206 209
207(defstruct (vc-git-extra-fileinfo 210(defstruct (vc-git-extra-fileinfo
208 (:copier nil) 211 (:copier nil)
209 (:constructor vc-git-create-extra-fileinfo (old-perm new-perm &optional rename-state orig-name)) 212 (:constructor vc-git-create-extra-fileinfo
213 (old-perm new-perm &optional rename-state orig-name))
210 (:conc-name vc-git-extra-fileinfo->)) 214 (:conc-name vc-git-extra-fileinfo->))
211 old-perm new-perm ;; permission flags 215 old-perm new-perm ;; Permission flags.
212 rename-state ;; rename or copy state 216 rename-state ;; Rename or copy state.
213 orig-name) ;; original name for renames or copies 217 orig-name) ;; Original name for renames or copies.
214 218
215(defun vc-git-escape-file-name (name) 219(defun vc-git-escape-file-name (name)
216 "Escape a file name if necessary." 220 "Escape a file name if necessary."
@@ -232,23 +236,23 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
232 (let* ((old-type (lsh (or old-perm 0) -9)) 236 (let* ((old-type (lsh (or old-perm 0) -9))
233 (new-type (lsh (or new-perm 0) -9)) 237 (new-type (lsh (or new-perm 0) -9))
234 (str (case new-type 238 (str (case new-type
235 (?\100 ;; file 239 (?\100 ;; File.
236 (case old-type 240 (case old-type
237 (?\100 nil) 241 (?\100 nil)
238 (?\120 " (type change symlink -> file)") 242 (?\120 " (type change symlink -> file)")
239 (?\160 " (type change subproject -> file)"))) 243 (?\160 " (type change subproject -> file)")))
240 (?\120 ;; symlink 244 (?\120 ;; Symlink.
241 (case old-type 245 (case old-type
242 (?\100 " (type change file -> symlink)") 246 (?\100 " (type change file -> symlink)")
243 (?\160 " (type change subproject -> symlink)") 247 (?\160 " (type change subproject -> symlink)")
244 (t " (symlink)"))) 248 (t " (symlink)")))
245 (?\160 ;; subproject 249 (?\160 ;; Subproject.
246 (case old-type 250 (case old-type
247 (?\100 " (type change file -> subproject)") 251 (?\100 " (type change file -> subproject)")
248 (?\120 " (type change symlink -> subproject)") 252 (?\120 " (type change symlink -> subproject)")
249 (t " (subproject)"))) 253 (t " (subproject)")))
250 (?\110 nil) ;; directory (internal, not a real git state) 254 (?\110 nil) ;; Directory (internal, not a real git state).
251 (?\000 ;; deleted or unknown 255 (?\000 ;; Deleted or unknown.
252 (case old-type 256 (case old-type
253 (?\120 " (symlink)") 257 (?\120 " (symlink)")
254 (?\160 " (subproject)"))) 258 (?\160 " (subproject)")))
@@ -258,7 +262,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
258 (t "")))) 262 (t ""))))
259 263
260(defun vc-git-rename-as-string (state extra) 264(defun vc-git-rename-as-string (state extra)
261 "Return a string describing the copy or rename associated with INFO, or an empty string if none." 265 "Return a string describing the copy or rename associated with INFO,
266or an empty string if none."
262 (let ((rename-state (when extra 267 (let ((rename-state (when extra
263 (vc-git-extra-fileinfo->rename-state extra)))) 268 (vc-git-extra-fileinfo->rename-state extra))))
264 (if rename-state 269 (if rename-state
@@ -267,8 +272,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
267 (if (eq rename-state 'copy) "copied from " 272 (if (eq rename-state 'copy) "copied from "
268 (if (eq state 'added) "renamed from " 273 (if (eq state 'added) "renamed from "
269 "renamed to ")) 274 "renamed to "))
270 (vc-git-escape-file-name (vc-git-extra-fileinfo->orig-name extra)) 275 (vc-git-escape-file-name
271 ")") 'face 'font-lock-comment-face) 276 (vc-git-extra-fileinfo->orig-name extra))
277 ")")
278 'face 'font-lock-comment-face)
272 ""))) 279 "")))
273 280
274(defun vc-git-permissions-as-string (old-perm new-perm) 281(defun vc-git-permissions-as-string (old-perm new-perm)
@@ -302,7 +309,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
302 " " (vc-git-permissions-as-string old-perm new-perm) 309 " " (vc-git-permissions-as-string old-perm new-perm)
303 " " 310 " "
304 (propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info)) 311 (propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info))
305 'face (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face) 312 'face (if isdir 'font-lock-comment-delimiter-face
313 'font-lock-function-name-face)
306 'help-echo 314 'help-echo
307 (if isdir 315 (if isdir
308 "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" 316 "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu"
@@ -314,32 +322,39 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
314 322
315(defun vc-git-after-dir-status-stage (stage files update-function) 323(defun vc-git-after-dir-status-stage (stage files update-function)
316 "Process sentinel for the various dir-status stages." 324 "Process sentinel for the various dir-status stages."
317 (let (remaining next-stage result) 325 (let (next-stage result)
318 (goto-char (point-min)) 326 (goto-char (point-min))
319 (case stage 327 (case stage
320 ('update-index 328 (update-index
321 (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 329 (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added
322 (if files 'ls-files-up-to-date 'diff-index)))) 330 (if files 'ls-files-up-to-date 'diff-index))))
323 ('ls-files-added 331 (ls-files-added
324 (setq next-stage 'ls-files-unknown) 332 (setq next-stage 'ls-files-unknown)
325 (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) 333 (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
326 (let ((new-perm (string-to-number (match-string 1) 8)) 334 (let ((new-perm (string-to-number (match-string 1) 8))
327 (name (match-string 2))) 335 (name (match-string 2)))
328 (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) result)))) 336 (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm))
329 ('ls-files-up-to-date 337 result))))
338 (ls-files-up-to-date
330 (setq next-stage 'diff-index) 339 (setq next-stage 'diff-index)
331 (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) 340 (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
332 (let ((perm (string-to-number (match-string 1) 8)) 341 (let ((perm (string-to-number (match-string 1) 8))
333 (name (match-string 2))) 342 (name (match-string 2)))
334 (push (list name 'up-to-date (vc-git-create-extra-fileinfo perm perm)) result)))) 343 (push (list name 'up-to-date
335 ('ls-files-unknown 344 (vc-git-create-extra-fileinfo perm perm))
345 result))))
346 (ls-files-unknown
336 (when files (setq next-stage 'ls-files-ignored)) 347 (when files (setq next-stage 'ls-files-ignored))
337 (while (re-search-forward "\\([^\0]*?\\)\0" nil t 1) 348 (while (re-search-forward "\\([^\0]*?\\)\0" nil t 1)
338 (push (list (match-string 1) 'unregistered (vc-git-create-extra-fileinfo 0 0)) result))) 349 (push (list (match-string 1) 'unregistered
339 ('ls-files-ignored 350 (vc-git-create-extra-fileinfo 0 0))
351 result)))
352 (ls-files-ignored
340 (while (re-search-forward "\\([^\0]*?\\)\0" nil t 1) 353 (while (re-search-forward "\\([^\0]*?\\)\0" nil t 1)
341 (push (list (match-string 1) 'ignored (vc-git-create-extra-fileinfo 0 0)) result))) 354 (push (list (match-string 1) 'ignored
342 ('diff-index 355 (vc-git-create-extra-fileinfo 0 0))
356 result)))
357 (diff-index
343 (setq next-stage 'ls-files-unknown) 358 (setq next-stage 'ls-files-unknown)
344 (while (re-search-forward 359 (while (re-search-forward
345 ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0" 360 ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
@@ -349,41 +364,60 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
349 (state (or (match-string 4) (match-string 6))) 364 (state (or (match-string 4) (match-string 6)))
350 (name (or (match-string 5) (match-string 7))) 365 (name (or (match-string 5) (match-string 7)))
351 (new-name (match-string 8))) 366 (new-name (match-string 8)))
352 (if new-name ; copy or rename 367 (if new-name ; Copy or rename.
353 (if (eq ?C (string-to-char state)) 368 (if (eq ?C (string-to-char state))
354 (push (list new-name 'added (vc-git-create-extra-fileinfo old-perm new-perm 'copy name)) result) 369 (push (list new-name 'added
355 (push (list name 'removed (vc-git-create-extra-fileinfo 0 0 'rename new-name)) result) 370 (vc-git-create-extra-fileinfo old-perm new-perm
356 (push (list new-name 'added (vc-git-create-extra-fileinfo old-perm new-perm 'rename name)) result)) 371 'copy name))
357 (push (list name (vc-git--state-code state) (vc-git-create-extra-fileinfo old-perm new-perm)) result)))))) 372 result)
373 (push (list name 'removed
374 (vc-git-create-extra-fileinfo 0 0
375 'rename new-name))
376 result)
377 (push (list new-name 'added
378 (vc-git-create-extra-fileinfo old-perm new-perm
379 'rename name))
380 result))
381 (push (list name (vc-git--state-code state)
382 (vc-git-create-extra-fileinfo old-perm new-perm))
383 result))))))
358 (when result 384 (when result
359 (setq result (nreverse result)) 385 (setq result (nreverse result))
360 (when files 386 (when files
361 (dolist (entry result) (setq files (delete (car entry) files))) 387 (dolist (entry result) (setq files (delete (car entry) files)))
362 (unless files (setq next-stage nil)))) 388 (unless files (setq next-stage nil))))
363 (when (or result (not next-stage)) (funcall update-function result next-stage)) 389 (when (or result (not next-stage))
364 (when next-stage (vc-git-dir-status-goto-stage next-stage files update-function)))) 390 (funcall update-function result next-stage))
391 (when next-stage
392 (vc-git-dir-status-goto-stage next-stage files update-function))))
365 393
366(defun vc-git-dir-status-goto-stage (stage files update-function) 394(defun vc-git-dir-status-goto-stage (stage files update-function)
367 (erase-buffer) 395 (erase-buffer)
368 (case stage 396 (case stage
369 ('update-index 397 (update-index
370 (if files 398 (if files
371 (vc-git-command (current-buffer) 'async files "add" "--refresh" "--") 399 (vc-git-command (current-buffer) 'async files "add" "--refresh" "--")
372 (vc-git-command (current-buffer) 'async nil "update-index" "--refresh"))) 400 (vc-git-command (current-buffer) 'async nil
373 ('ls-files-added 401 "update-index" "--refresh")))
374 (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-c" "-s" "--")) 402 (ls-files-added
375 ('ls-files-up-to-date 403 (vc-git-command (current-buffer) 'async files
376 (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-c" "-s" "--")) 404 "ls-files" "-z" "-c" "-s" "--"))
377 ('ls-files-unknown 405 (ls-files-up-to-date
378 (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" 406 (vc-git-command (current-buffer) 'async files
379 "--directory" "--no-empty-directory" "--exclude-standard" "--")) 407 "ls-files" "-z" "-c" "-s" "--"))
380 ('ls-files-ignored 408 (ls-files-unknown
381 (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "-i" 409 (vc-git-command (current-buffer) 'async files
382 "--directory" "--no-empty-directory" "--exclude-standard" "--")) 410 "ls-files" "-z" "-o" "--directory"
383 ('diff-index 411 "--no-empty-directory" "--exclude-standard" "--"))
384 (vc-git-command (current-buffer) 'async files "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) 412 (ls-files-ignored
413 (vc-git-command (current-buffer) 'async files
414 "ls-files" "-z" "-o" "-i" "--directory"
415 "--no-empty-directory" "--exclude-standard" "--"))
416 (diff-index
417 (vc-git-command (current-buffer) 'async files
418 "diff-index" "--relative" "-z" "-M" "HEAD" "--")))
385 (vc-exec-after 419 (vc-exec-after
386 `(vc-git-after-dir-status-stage (quote ,stage) (quote ,files) (quote ,update-function)))) 420 `(vc-git-after-dir-status-stage ',stage ',files ',update-function)))
387 421
388(defun vc-git-dir-status (dir update-function) 422(defun vc-git-dir-status (dir update-function)
389 "Return a list of (FILE STATE EXTRA) entries for DIR." 423 "Return a list of (FILE STATE EXTRA) entries for DIR."
@@ -439,14 +473,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
439 (setq remote 473 (setq remote
440 (with-output-to-string 474 (with-output-to-string
441 (with-current-buffer standard-output 475 (with-current-buffer standard-output
442 (vc-git--out-ok "config" (concat "branch." branch ".remote"))))) 476 (vc-git--out-ok "config"
477 (concat "branch." branch ".remote")))))
443 (when (string-match "\\([^\n]+\\)" remote) 478 (when (string-match "\\([^\n]+\\)" remote)
444 (setq remote (match-string 1 remote))) 479 (setq remote (match-string 1 remote)))
445 (when remote 480 (when remote
446 (setq remote-url 481 (setq remote-url
447 (with-output-to-string 482 (with-output-to-string
448 (with-current-buffer standard-output 483 (with-current-buffer standard-output
449 (vc-git--out-ok "config" (concat "remote." remote ".url")))))) 484 (vc-git--out-ok "config"
485 (concat "remote." remote ".url"))))))
450 (when (string-match "\\([^\n]+\\)" remote-url) 486 (when (string-match "\\([^\n]+\\)" remote-url)
451 (setq remote-url (match-string 1 remote-url)))) 487 (setq remote-url (match-string 1 remote-url))))
452 (setq branch "not (detached HEAD)")) 488 (setq branch "not (detached HEAD)"))
@@ -550,8 +586,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
550 (append 586 (append
551 '("log" "--no-color") 587 '("log" "--no-color")
552 (when shortlog 588 (when shortlog
553 '("--graph" "--decorate" 589 '("--graph" "--decorate" "--date=short"
554 "--date=short" "--pretty=format:%d%h %ad %s" "--abbrev-commit")) 590 "--pretty=format:%d%h %ad %s" "--abbrev-commit"))
555 (when limit (list "-n" (format "%s" limit))) 591 (when limit (list "-n" (format "%s" limit)))
556 (when start-revision (list start-revision)) 592 (when start-revision (list start-revision))
557 '("--"))))))) 593 '("--")))))))
@@ -565,7 +601,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
565(defvar vc-short-log) 601(defvar vc-short-log)
566 602
567(define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View" 603(define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View"
568 (require 'add-log) ;; we need the faces add-log 604 (require 'add-log) ;; We need the faces add-log.
569 ;; Don't have file markers, so use impossible regexp. 605 ;; Don't have file markers, so use impossible regexp.
570 (set (make-local-variable 'log-view-file-re) "\\`a\\`") 606 (set (make-local-variable 'log-view-file-re) "\\`a\\`")
571 (set (make-local-variable 'log-view-per-file-logs) nil) 607 (set (make-local-variable 'log-view-per-file-logs) nil)
@@ -610,17 +646,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
610REVISION may have the form BRANCH, BRANCH~N, 646REVISION may have the form BRANCH, BRANCH~N,
611or BRANCH^ (where \"^\" can be repeated)." 647or BRANCH^ (where \"^\" can be repeated)."
612 (goto-char (point-min)) 648 (goto-char (point-min))
613 (let (found) 649 (prog1
614 (when revision 650 (when revision
615 (setq found 651 (search-forward
616 (search-forward (format "\ncommit %s" revision) nil t 652 (format "\ncommit %s" revision) nil t
617 (cond ((string-match "~\\([0-9]\\)$" revision) 653 (cond ((string-match "~\\([0-9]\\)\\'" revision)
618 (1+ (string-to-number (match-string 1 revision)))) 654 (1+ (string-to-number (match-string 1 revision))))
619 ((string-match "\\^+$" revision) 655 ((string-match "\\^+\\'" revision)
620 (1+ (length (match-string 0 revision)))) 656 (1+ (length (match-string 0 revision))))
621 (t nil))))) 657 (t nil))))
622 (beginning-of-line) 658 (beginning-of-line)))
623 found))
624 659
625(defun vc-git-diff (files &optional rev1 rev2 buffer) 660(defun vc-git-diff (files &optional rev1 rev2 buffer)
626 "Get a difference report using Git between two revisions of FILES." 661 "Get a difference report using Git between two revisions of FILES."
@@ -668,7 +703,8 @@ or BRANCH^ (where \"^\" can be repeated)."
668 (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?") 703 (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?")
669 (let ((revision (match-string-no-properties 1))) 704 (let ((revision (match-string-no-properties 1)))
670 (if (match-beginning 2) 705 (if (match-beginning 2)
671 (cons revision (expand-file-name (match-string-no-properties 3))) 706 (cons revision (expand-file-name (match-string-no-properties 3)
707 (vc-git-root default-directory)))
672 revision))))) 708 revision)))))
673 709
674;;; TAG SYSTEM 710;;; TAG SYSTEM
@@ -948,7 +984,8 @@ Returns nil if not possible."
948 (goto-char (point-min)) 984 (goto-char (point-min))
949 (= (forward-line 2) 1) 985 (= (forward-line 2) 1)
950 (bolp) 986 (bolp)
951 (buffer-substring-no-properties (point-min) (1- (point-max))))))) 987 (buffer-substring-no-properties (point-min)
988 (1- (point-max)))))))
952 (and name (not (string= name "undefined")) name)))) 989 (and name (not (string= name "undefined")) name))))
953 990
954(provide 'vc-git) 991(provide 'vc-git)
diff --git a/src/ChangeLog b/src/ChangeLog
index 761beb2be54..ce4fe1cd7b4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,21 @@
12010-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 Make it possible to C-g in a tight bytecode loop again (bug#5680).
4 * lisp.h (ELSE_PENDING_SIGNALS): New macro.
5 (QUIT): Use it to consolidate code and remove redundancy.
6 * bytecode.c (BYTE_CODE_QUIT): Use it as well.
7
8 * regex.c (regex_compile): Setup gl_state as well.
9
10 * syntax.c (skip_chars): Setup gl_state (bug#3823).
11 (in_classes): Use CONSP before XCAR/XCDR.
12
132010-03-03 Chong Yidong <cyd@stupidchicken.com>
14
15 * keymap.c (Fwhere_is_internal): Use Fequal to compare
16 definitions, so that keyboard macros are correctly handled
17 (Bug#5481).
18
12010-03-02 Eli Zaretskii <eliz@gnu.org> 192010-03-02 Eli Zaretskii <eliz@gnu.org>
2 20
3 * coding.c (decode_coding_emacs_mule): Fixup pointers to buffer 21 * coding.c (decode_coding_emacs_mule): Fixup pointers to buffer
diff --git a/src/bytecode.c b/src/bytecode.c
index 31df65fd303..e95614c72a9 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -393,6 +393,7 @@ unmark_byte_stack ()
393 Fsignal (Qquit, Qnil); \ 393 Fsignal (Qquit, Qnil); \
394 AFTER_POTENTIAL_GC (); \ 394 AFTER_POTENTIAL_GC (); \
395 } \ 395 } \
396 ELSE_PENDING_SIGNALS \
396 } while (0) 397 } while (0)
397 398
398 399
diff --git a/src/keymap.c b/src/keymap.c
index 98774d5d685..88e0687272f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1633,13 +1633,13 @@ like in the respective argument of `key-binding'. */)
1633 /* If a mouse click position is given, our variables are based on 1633 /* If a mouse click position is given, our variables are based on
1634 the buffer clicked on, not the current buffer. So we may have to 1634 the buffer clicked on, not the current buffer. So we may have to
1635 switch the buffer here. */ 1635 switch the buffer here. */
1636 1636
1637 if (CONSP (position)) 1637 if (CONSP (position))
1638 { 1638 {
1639 Lisp_Object window; 1639 Lisp_Object window;
1640 1640
1641 window = POSN_WINDOW (position); 1641 window = POSN_WINDOW (position);
1642 1642
1643 if (WINDOWP (window) 1643 if (WINDOWP (window)
1644 && BUFFERP (XWINDOW (window)->buffer) 1644 && BUFFERP (XWINDOW (window)->buffer)
1645 && XBUFFER (XWINDOW (window)->buffer) != current_buffer) 1645 && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
@@ -1651,14 +1651,14 @@ like in the respective argument of `key-binding'. */)
1651 would not be a problem here, but it is easier to keep 1651 would not be a problem here, but it is easier to keep
1652 things the same. 1652 things the same.
1653 */ 1653 */
1654 1654
1655 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 1655 record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
1656 1656
1657 set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); 1657 set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
1658 } 1658 }
1659 } 1659 }
1660 1660
1661 keymaps = Fcons (current_global_map, Qnil); 1661 keymaps = Fcons (current_global_map, Qnil);
1662 1662
1663 if (!NILP (olp)) 1663 if (!NILP (olp))
1664 { 1664 {
@@ -1685,8 +1685,8 @@ like in the respective argument of `key-binding'. */)
1685 /* Get the buffer local maps, possibly overriden by text or 1685 /* Get the buffer local maps, possibly overriden by text or
1686 overlay properties */ 1686 overlay properties */
1687 1687
1688 local_map = get_local_map (pt, current_buffer, Qlocal_map); 1688 local_map = get_local_map (pt, current_buffer, Qlocal_map);
1689 keymap = get_local_map (pt, current_buffer, Qkeymap); 1689 keymap = get_local_map (pt, current_buffer, Qkeymap);
1690 1690
1691 if (CONSP (position)) 1691 if (CONSP (position))
1692 { 1692 {
@@ -1694,7 +1694,7 @@ like in the respective argument of `key-binding'. */)
1694 1694
1695 /* For a mouse click, get the local text-property keymap 1695 /* For a mouse click, get the local text-property keymap
1696 of the place clicked on, rather than point. */ 1696 of the place clicked on, rather than point. */
1697 1697
1698 if (POSN_INBUFFER_P (position)) 1698 if (POSN_INBUFFER_P (position))
1699 { 1699 {
1700 Lisp_Object pos; 1700 Lisp_Object pos;
@@ -1705,7 +1705,7 @@ like in the respective argument of `key-binding'. */)
1705 { 1705 {
1706 local_map = get_local_map (XINT (pos), 1706 local_map = get_local_map (XINT (pos),
1707 current_buffer, Qlocal_map); 1707 current_buffer, Qlocal_map);
1708 1708
1709 keymap = get_local_map (XINT (pos), 1709 keymap = get_local_map (XINT (pos),
1710 current_buffer, Qkeymap); 1710 current_buffer, Qkeymap);
1711 } 1711 }
@@ -1716,12 +1716,12 @@ like in the respective argument of `key-binding'. */)
1716 string displayed via the `display' property, 1716 string displayed via the `display' property,
1717 consider `local-map' and `keymap' properties of 1717 consider `local-map' and `keymap' properties of
1718 that string. */ 1718 that string. */
1719 1719
1720 if (string = POSN_STRING (position), 1720 if (string = POSN_STRING (position),
1721 (CONSP (string) && STRINGP (XCAR (string)))) 1721 (CONSP (string) && STRINGP (XCAR (string))))
1722 { 1722 {
1723 Lisp_Object pos, map; 1723 Lisp_Object pos, map;
1724 1724
1725 pos = XCDR (string); 1725 pos = XCDR (string);
1726 string = XCAR (string); 1726 string = XCAR (string);
1727 if (INTEGERP (pos) 1727 if (INTEGERP (pos)
@@ -1737,7 +1737,7 @@ like in the respective argument of `key-binding'. */)
1737 keymap = map; 1737 keymap = map;
1738 } 1738 }
1739 } 1739 }
1740 1740
1741 } 1741 }
1742 1742
1743 if (!NILP (local_map)) 1743 if (!NILP (local_map))
@@ -2890,7 +2890,7 @@ remapped command in the returned list. */)
2890 CONSP (sequences))) 2890 CONSP (sequences)))
2891 { 2891 {
2892 Lisp_Object sequence, function; 2892 Lisp_Object sequence, function;
2893 2893
2894 sequence = XCAR (sequences); 2894 sequence = XCAR (sequences);
2895 sequences = XCDR (sequences); 2895 sequences = XCDR (sequences);
2896 2896
@@ -2903,8 +2903,8 @@ remapped command in the returned list. */)
2903 2903
2904 Either nil or number as value from Flookup_key 2904 Either nil or number as value from Flookup_key
2905 means undefined. */ 2905 means undefined. */
2906 if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped), 2906 if (NILP (Fequal (shadow_lookup (keymaps, sequence, Qnil, remapped),
2907 definition)) 2907 definition)))
2908 continue; 2908 continue;
2909 2909
2910 /* If the current sequence is a command remapping with 2910 /* If the current sequence is a command remapping with
@@ -2933,12 +2933,12 @@ remapped command in the returned list. */)
2933 Faset (sequence, make_number (ASIZE (sequence) - 1), 2933 Faset (sequence, make_number (ASIZE (sequence) - 1),
2934 build_string ("(any string)")); 2934 build_string ("(any string)"));
2935 } 2935 }
2936 2936
2937 /* It is a true unshadowed match. Record it, unless it's already 2937 /* It is a true unshadowed match. Record it, unless it's already
2938 been seen (as could happen when inheriting keymaps). */ 2938 been seen (as could happen when inheriting keymaps). */
2939 if (NILP (Fmember (sequence, found))) 2939 if (NILP (Fmember (sequence, found)))
2940 found = Fcons (sequence, found); 2940 found = Fcons (sequence, found);
2941 2941
2942 /* If firstonly is Qnon_ascii, then we can return the first 2942 /* If firstonly is Qnon_ascii, then we can return the first
2943 binding we find. If firstonly is not Qnon_ascii but not 2943 binding we find. If firstonly is not Qnon_ascii but not
2944 nil, then we should return the first ascii-only binding 2944 nil, then we should return the first ascii-only binding
diff --git a/src/lisp.h b/src/lisp.h
index 7032a3f48f4..7f5d5df66c6 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1933,22 +1933,12 @@ extern char *stack_bottom;
1933#ifdef SYNC_INPUT 1933#ifdef SYNC_INPUT
1934extern void process_pending_signals P_ ((void)); 1934extern void process_pending_signals P_ ((void));
1935extern int pending_signals; 1935extern int pending_signals;
1936 1936#define ELSE_PENDING_SIGNALS \
1937#define QUIT \ 1937 else if (pending_signals) \
1938 do { \ 1938 process_pending_signals ();
1939 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
1940 { \
1941 Lisp_Object flag = Vquit_flag; \
1942 Vquit_flag = Qnil; \
1943 if (EQ (Vthrow_on_input, flag)) \
1944 Fthrow (Vthrow_on_input, Qt); \
1945 Fsignal (Qquit, Qnil); \
1946 } \
1947 else if (pending_signals) \
1948 process_pending_signals (); \
1949 } while (0)
1950
1951#else /* not SYNC_INPUT */ 1939#else /* not SYNC_INPUT */
1940#define ELSE_PENDING_SIGNALS
1941#endif /* not SYNC_INPUT */
1952 1942
1953#define QUIT \ 1943#define QUIT \
1954 do { \ 1944 do { \
@@ -1960,10 +1950,9 @@ extern int pending_signals;
1960 Fthrow (Vthrow_on_input, Qt); \ 1950 Fthrow (Vthrow_on_input, Qt); \
1961 Fsignal (Qquit, Qnil); \ 1951 Fsignal (Qquit, Qnil); \
1962 } \ 1952 } \
1953 ELSE_PENDING_SIGNALS \
1963 } while (0) 1954 } while (0)
1964 1955
1965#endif /* not SYNC_INPUT */
1966
1967 1956
1968/* Nonzero if ought to quit now. */ 1957/* Nonzero if ought to quit now. */
1969 1958
diff --git a/src/regex.c b/src/regex.c
index bb921a5b519..f242446796d 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -3065,6 +3065,13 @@ regex_compile (pattern, size, syntax, bufp)
3065 don't need to handle them for multibyte. 3065 don't need to handle them for multibyte.
3066 They are distinguished by a negative wctype. */ 3066 They are distinguished by a negative wctype. */
3067 3067
3068 /* Setup the gl_state object to its buffer-defined
3069 value. This hardcodes the buffer-global
3070 syntax-table for ASCII chars, while the other chars
3071 will obey syntax-table properties. It's not ideal,
3072 but it's the way it's been done until now. */
3073 SETUP_SYNTAX_TABLE (BEGV, 0);
3074
3068 for (ch = 0; ch < 256; ++ch) 3075 for (ch = 0; ch < 256; ++ch)
3069 { 3076 {
3070 c = RE_CHAR_TO_MULTIBYTE (ch); 3077 c = RE_CHAR_TO_MULTIBYTE (ch);
diff --git a/src/syntax.c b/src/syntax.c
index 01b4cfb8892..47b4caf5ade 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1747,6 +1747,12 @@ skip_chars (forwardp, string, lim, handle_iso_classes)
1747 } 1747 }
1748 1748
1749 immediate_quit = 1; 1749 immediate_quit = 1;
1750 /* This code may look up syntax tables using macros that rely on the
1751 gl_state object. To make sure this object is not out of date,
1752 let's initialize it manually.
1753 We ignore syntax-table text-properties for now, since that's
1754 what we've done in the past. */
1755 SETUP_SYNTAX_TABLE (BEGV, 0);
1750 if (forwardp) 1756 if (forwardp)
1751 { 1757 {
1752 if (multibyte) 1758 if (multibyte)
@@ -2072,7 +2078,7 @@ in_classes (c, iso_classes)
2072{ 2078{
2073 int fits_class = 0; 2079 int fits_class = 0;
2074 2080
2075 while (! NILP (iso_classes)) 2081 while (CONSP (iso_classes))
2076 { 2082 {
2077 Lisp_Object elt; 2083 Lisp_Object elt;
2078 elt = XCAR (iso_classes); 2084 elt = XCAR (iso_classes);
diff --git a/test/cedet/ede-tests.el b/test/cedet/ede-tests.el
index df18b8fd277..2dc5dbf8ac8 100644
--- a/test/cedet/ede-tests.el
+++ b/test/cedet/ede-tests.el
@@ -1,3 +1,30 @@
1;;; ede-tests.el --- Some tests for the Emacs Development Environment
2
3;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
4
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; Extracted from ede-locate.el in the CEDET distribution.
25
26;;; Code:
27
1;;; From ede-locate: 28;;; From ede-locate:
2 29
3(require 'ede/locate) 30(require 'ede/locate)
@@ -58,3 +85,4 @@ The search is done with the current EDE root."
58 ) 85 )
59 86
60;; arch-tag: 79fae12e-652f-4544-a20e-b24d87b4917d 87;; arch-tag: 79fae12e-652f-4544-a20e-b24d87b4917d
88;;; ede-test.el ends here
diff --git a/test/cedet/srecode-tests.el b/test/cedet/srecode-tests.el
index f48041144a4..7997ff415e6 100644
--- a/test/cedet/srecode-tests.el
+++ b/test/cedet/srecode-tests.el
@@ -1,3 +1,31 @@
1;;; srecode-tests.el --- Some tests for CEDET's srecode
2
3;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
4
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; Extracted from srecode-fields.el and srecode-document.el in the
25;; CEDET distribution.
26
27;;; Code:
28
1;;; From srecode-fields: 29;;; From srecode-fields:
2 30
3(require 'srecode/fields) 31(require 'srecode/fields)
@@ -266,3 +294,4 @@ Dump out the extracted dictionary."
266 (srecode-dump extract)))))) 294 (srecode-dump extract))))))
267 295
268;; arch-tag: 7a467849-b415-4bdc-ba2a-284ace156a65 296;; arch-tag: 7a467849-b415-4bdc-ba2a-284ace156a65
297;;; srecode-tests.el ends here