aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-12-09 18:00:42 -0800
committerGlenn Morris2012-12-09 18:00:42 -0800
commit265c2fbf11cb8bf9b805df63ecb9508631f08e35 (patch)
tree808684294d7ec600f5300e0a5d5f868740096f7b
parent5f460827dd14fbfae26ac8451cedd4446817d1ec (diff)
parentf433306af510e86a614e9f9f082b6d2d5f56a968 (diff)
downloademacs-265c2fbf11cb8bf9b805df63ecb9508631f08e35.tar.gz
emacs-265c2fbf11cb8bf9b805df63ecb9508631f08e35.zip
Merge from emacs-24; up to 2012-11-26T19:56:14Z!monnier@iro.umontreal.ca
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/killing.texi2
-rw-r--r--doc/lispref/ChangeLog69
-rw-r--r--doc/lispref/control.texi104
-rw-r--r--doc/lispref/customize.texi4
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog30
-rw-r--r--lisp/emacs-lisp/cl-lib.el8
-rw-r--r--lisp/emacs-lisp/cl.el9
-rw-r--r--lisp/hilit-chg.el64
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/textmodes/texinfo.el3
-rw-r--r--lisp/vc/vc-hooks.el8
-rw-r--r--src/ChangeLog28
-rw-r--r--src/editfns.c8
-rw-r--r--src/indent.c6
-rw-r--r--src/lread.c16
-rw-r--r--src/nsterm.m2
-rw-r--r--src/w32.c36
-rw-r--r--src/w32fns.c2
21 files changed, 300 insertions, 113 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 3dbf4ebcd5d..3a28e52a4d1 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12012-12-10 Dani Moncayo <dmoncayo@gmail.com>
2
3 * killing.texi (Deletion): Doc fix (Bug#12748).
4
12012-12-06 Paul Eggert <eggert@cs.ucla.edu> 52012-12-06 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 * doclicense.texi, gpl.texi: Update to latest version from FSF. 7 * doclicense.texi, gpl.texi: Update to latest version from FSF.
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index a8d08bd6602..fcd881a6bdc 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -123,7 +123,7 @@ point, regardless of the number of spaces that existed previously
123(even if there were none before). With a numeric argument @var{n}, it 123(even if there were none before). With a numeric argument @var{n}, it
124leaves @var{n} spaces before point if @var{n} is positive; if @var{n} 124leaves @var{n} spaces before point if @var{n} is positive; if @var{n}
125is negative, it deletes newlines in addition to spaces and tabs, 125is negative, it deletes newlines in addition to spaces and tabs,
126leaving a single space before point. 126leaving @var{-n} spaces before point.
127 127
128 @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines 128 @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
129after the current line. If the current line is blank, it deletes all 129after the current line. If the current line is blank, it deletes all
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7238d958d8a..05716cd77b3 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12012-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * control.texi (Pattern maching case statement): New node.
4
5 * customize.texi (Variable Definitions): Mention the default :group
6 for defcustoms (bug#13093).
7
12012-12-09 Glenn Morris <rgm@gnu.org> 82012-12-09 Glenn Morris <rgm@gnu.org>
2 9
3 * customize.texi (Variable Definitions): Mention eval-defun 10 * customize.texi (Variable Definitions): Mention eval-defun
@@ -27,7 +34,7 @@
27 * display.texi (Defining Faces): 34 * display.texi (Defining Faces):
28 * sequences.texi (Char-Tables): Fix xref. 35 * sequences.texi (Char-Tables): Fix xref.
29 36
30 * keymaps.texi (Key Sequences): kbd is now a function. 37 * keymaps.texi (Key Sequences): `kbd' is now a function.
31 38
32 * commands.texi (Using Interactive): Fix index entry. 39 * commands.texi (Using Interactive): Fix index entry.
33 40
@@ -47,16 +54,14 @@
47 (Windows and Frames): Fix example. Move description of 54 (Windows and Frames): Fix example. Move description of
48 window-in-direction here. 55 window-in-direction here.
49 (Recombining Windows): Fix example. 56 (Recombining Windows): Fix example.
50 (Buffers and Windows): Fix description of 57 (Buffers and Windows): Fix description of replace-buffer-in-windows.
51 replace-buffer-in-windows.
52 (Switching Buffers): Reword. 58 (Switching Buffers): Reword.
53 (Display Action Functions): Minor adjustments. 59 (Display Action Functions): Minor adjustments.
54 (Choosing Window Options): Minor fixes. 60 (Choosing Window Options): Minor fixes.
55 (Window History): Minor rewording. 61 (Window History): Minor rewording.
56 (Dedicated Windows): Correct and reword part describing how 62 (Dedicated Windows): Correct and reword part describing how
57 dedicatedness affects functions removing buffers or windows. 63 dedicatedness affects functions removing buffers or windows.
58 * buffers.texi (The Buffer List): Fix description of 64 * buffers.texi (The Buffer List): Fix description of bury-buffer.
59 bury-buffer.
60 65
612012-11-24 Chong Yidong <cyd@gnu.org> 662012-11-24 Chong Yidong <cyd@gnu.org>
62 67
@@ -115,8 +120,8 @@
115 120
116 * windows.texi (Choosing Window): Rewrite description of 121 * windows.texi (Choosing Window): Rewrite description of
117 display-buffer-alist (Bug#12167). 122 display-buffer-alist (Bug#12167).
118 (Display Action Functions): Mention inhibit-switch-frame. Fix 123 (Display Action Functions): Mention inhibit-switch-frame.
119 description of display-buffer-below-selected. Reorder actions. 124 Fix description of display-buffer-below-selected. Reorder actions.
120 Add example (Bug#12848). 125 Add example (Bug#12848).
121 126
1222012-11-16 Glenn Morris <rgm@gnu.org> 1272012-11-16 Glenn Morris <rgm@gnu.org>
@@ -215,11 +220,11 @@
215 switch-to-buffer-preserve-window-point. 220 switch-to-buffer-preserve-window-point.
216 (Display Action Functions): Document window-height and 221 (Display Action Functions): Document window-height and
217 window-width alist entries. 222 window-width alist entries.
218 (Display Action Functions): Document 223 (Display Action Functions):
219 display-buffer-below-selected and 224 Document display-buffer-below-selected and
220 display-buffer-in-previous-window. 225 display-buffer-in-previous-window.
221 (Quitting Windows): Document quit-restore-window. Rewrite 226 (Quitting Windows): Document quit-restore-window.
222 section. 227 Rewrite section.
223 (Window Configurations): In window-state-get mention that 228 (Window Configurations): In window-state-get mention that
224 argument window must be valid. 229 argument window must be valid.
225 (Window Parameters): Document quit-restore window parameter 230 (Window Parameters): Document quit-restore window parameter
@@ -319,8 +324,8 @@
319 * minibuf.texi (Text from Minibuffer): Document read-regexp 324 * minibuf.texi (Text from Minibuffer): Document read-regexp
320 changes. 325 changes.
321 326
322 * nonascii.texi (Selecting a Representation): Document 327 * nonascii.texi (Selecting a Representation):
323 set-buffer-multibyte changes. 328 Document set-buffer-multibyte changes.
324 329
325 * keymaps.texi (Toolkit Differences): Node deleted. 330 * keymaps.texi (Toolkit Differences): Node deleted.
326 (Easy Menu): New node. 331 (Easy Menu): New node.
@@ -1092,8 +1097,8 @@
1092 1097
10932012-04-12 Jari Aalto <jari.aalto@cante.net> 10982012-04-12 Jari Aalto <jari.aalto@cante.net>
1094 1099
1095 * processes.texi (Synchronous Processes): Mention 1100 * processes.texi (Synchronous Processes):
1096 `default-directory' (bug#7515). 1101 Mention `default-directory' (bug#7515).
1097 1102
10982012-04-09 Chong Yidong <cyd@gnu.org> 11032012-04-09 Chong Yidong <cyd@gnu.org>
1099 1104
@@ -1116,8 +1121,8 @@
1116 1121
1117 * minibuf.texi (Programmed Completion): Remove obsolete variable 1122 * minibuf.texi (Programmed Completion): Remove obsolete variable
1118 completion-annotate-function. 1123 completion-annotate-function.
1119 (Completion Variables): Rename from Completion Styles. Document 1124 (Completion Variables): Rename from Completion Styles.
1120 completion-extra-properties. Document completion-styles-alist 1125 Document completion-extra-properties. Document completion-styles-alist
1121 change. 1126 change.
1122 (Reading File Names): minibuffer-local-filename-must-match-map is 1127 (Reading File Names): minibuffer-local-filename-must-match-map is
1123 not used anymore. 1128 not used anymore.
@@ -1252,8 +1257,8 @@
1252 Minor clarifications. 1257 Minor clarifications.
1253 (Defining Faces): Copyedits. Update face example. 1258 (Defining Faces): Copyedits. Update face example.
1254 (Attribute Functions): Mark set-face-foreground etc as commands. 1259 (Attribute Functions): Mark set-face-foreground etc as commands.
1255 (Face Remapping): Mention text-scale-adjust. Clarify 1260 (Face Remapping): Mention text-scale-adjust.
1256 face-remapping-alist and related docs. 1261 Clarify face-remapping-alist and related docs.
1257 (Face Functions): Don't document make-face or copy-face. 1262 (Face Functions): Don't document make-face or copy-face.
1258 1263
12592012-03-20 Chong Yidong <cyd@gnu.org> 12642012-03-20 Chong Yidong <cyd@gnu.org>
@@ -1594,8 +1599,8 @@
1594 (Syntax Properties): Document syntax-propertize-function and 1599 (Syntax Properties): Document syntax-propertize-function and
1595 syntax-propertize-extend-region-functions. 1600 syntax-propertize-extend-region-functions.
1596 (Motion via Parsing): Clarify scan-lists. Fix indentation. 1601 (Motion via Parsing): Clarify scan-lists. Fix indentation.
1597 (Parser State): Update for the new "c" comment style. Fix 1602 (Parser State): Update for the new "c" comment style.
1598 description of item 7 (comment style). 1603 Fix description of item 7 (comment style).
1599 1604
1600 * modes.texi (Minor Modes): Update how mode commands should treat 1605 * modes.texi (Minor Modes): Update how mode commands should treat
1601 arguments now. 1606 arguments now.
@@ -1673,9 +1678,9 @@
1673 1678
1674 * debugging.texi (Debugging): Copyedits. Describe testcover, ERT. 1679 * debugging.texi (Debugging): Copyedits. Describe testcover, ERT.
1675 (Error Debugging): Note that debug-ignored-errors overrides list 1680 (Error Debugging): Note that debug-ignored-errors overrides list
1676 values of debug-on-error too. Add xref to Signaling Errors. Note 1681 values of debug-on-error too. Add xref to Signaling Errors.
1677 that debug-on-signal is not customizable. Mention 1682 Note that debug-on-signal is not customizable.
1678 condition-case-unless-debug. 1683 Mention condition-case-unless-debug.
1679 (Compilation Errors): Node deleted. 1684 (Compilation Errors): Node deleted.
1680 1685
1681 * compile.texi (Compiler Errors): Move a paragraph here from 1686 * compile.texi (Compiler Errors): Move a paragraph here from
@@ -1791,15 +1796,15 @@
17912012-02-04 Chong Yidong <cyd@gnu.org> 17962012-02-04 Chong Yidong <cyd@gnu.org>
1792 1797
1793 * functions.texi (What Is a Function): Add closures. Mention 1798 * functions.texi (What Is a Function): Add closures. Mention
1794 "return value" terminology. Add xref for command-execute. Remove 1799 "return value" terminology. Add xref for command-execute.
1795 unused "keystroke command" terminology. 1800 Remove unused "keystroke command" terminology.
1796 (Lambda Expressions): Give a different example than in the 1801 (Lambda Expressions): Give a different example than in the
1797 following subsection. Add xref to Anonymous Functions. 1802 following subsection. Add xref to Anonymous Functions.
1798 (Function Documentation): Remove gratuitous markup. 1803 (Function Documentation): Remove gratuitous markup.
1799 (Function Names): Move introductory text to `What Is a Function'. 1804 (Function Names): Move introductory text to `What Is a Function'.
1800 (Defining Functions): Fix defun argument spec. 1805 (Defining Functions): Fix defun argument spec.
1801 (Anonymous Functions): Document lambda macro explicitly. Mention 1806 (Anonymous Functions): Document lambda macro explicitly.
1802 effects on lexical binding. 1807 Mention effects on lexical binding.
1803 (Function Cells): Downplay direct usage of fset. 1808 (Function Cells): Downplay direct usage of fset.
1804 (Closures): New node. 1809 (Closures): New node.
1805 (Inline Functions): Remove "open-code" terminology. 1810 (Inline Functions): Remove "open-code" terminology.
@@ -1930,8 +1935,8 @@
1930 * variables.texi (Variables, Local Variables, Void Variables): 1935 * variables.texi (Variables, Local Variables, Void Variables):
1931 Edit to make the descriptions less specific to dynamic binding. 1936 Edit to make the descriptions less specific to dynamic binding.
1932 (Local Variables): Default max-specpdl-size is now 1300. 1937 (Local Variables): Default max-specpdl-size is now 1300.
1933 (Defining Variables): Edits for lexical scoping. Delete 1938 (Defining Variables): Edits for lexical scoping.
1934 information about starting docstrings with *. De-document 1939 Delete information about starting docstrings with *. De-document
1935 user-variable-p. 1940 user-variable-p.
1936 (Tips for Defining): Remove an unimportant discussion of quitting 1941 (Tips for Defining): Remove an unimportant discussion of quitting
1937 in the middle of a load. 1942 in the middle of a load.
@@ -2019,8 +2024,8 @@
2019 2024
20202012-01-06 Chong Yidong <cyd@gnu.org> 20252012-01-06 Chong Yidong <cyd@gnu.org>
2021 2026
2022 * variables.texi (Directory Local Variables): Document 2027 * variables.texi (Directory Local Variables):
2023 hack-dir-local-variables-non-file-buffer. 2028 Document hack-dir-local-variables-non-file-buffer.
2024 2029
20252012-01-06 Glenn Morris <rgm@gnu.org> 20302012-01-06 Glenn Morris <rgm@gnu.org>
2026 2031
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 489e5cc5b22..00b0a75a3e2 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -285,6 +285,110 @@ For example:
285@end group 285@end group
286@end example 286@end example
287 287
288@menu
289* Pattern maching case statement::
290@end menu
291
292@node Pattern maching case statement
293@subsection Pattern maching case statement
294@cindex pcase
295@cindex pattern matching
296
297To compare a particular value against various possible cases, the macro
298@code{pcase} can come handy. It takes the following form:
299
300@example
301(pcase @var{exp} @var{branch}1 @var{branch}2 @var{branch}3 @dots{})
302@end example
303
304where each @var{branch} takes the form @code{(@var{upattern}
305@var{body-forms}@dots{})}.
306
307It will first evaluate @var{exp} and then compare the value against each
308@var{upattern} to see which @var{branch} to use, after which it will run the
309corresponding @var{body-forms}. A common use case is to distinguish
310between a few different constant values:
311
312@example
313(pcase (get-return-code x)
314 (`success (message "Done!"))
315 (`would-block (message "Sorry, can't do it now"))
316 (`read-only (message "The shmliblick is read-only"))
317 (`access-denied (message "You do not have the needed rights"))
318 (code (message "Unknown return code %S" code)))
319@end example
320
321In the last clause, @code{code} is a variable that gets bound to the value that
322was returned by @code{(get-return-code x)}.
323
324To give a more complex example, a simple interpreter for a little
325expression language could look like:
326
327@example
328(defun evaluate (exp env)
329 (pcase exp
330 (`(add ,x ,y) (+ (evaluate x env) (evaluate y env)))
331 (`(call ,fun ,arg) (funcall (evaluate fun) (evaluate arg env)))
332 (`(fn ,arg ,body) (lambda (val)
333 (evaluate body (cons (cons arg val) env))))
334 ((pred numberp) exp)
335 ((pred symbolp) (cdr (assq exp env)))
336 (_ (error "Unknown expression %S" exp))))
337@end example
338
339Where @code{`(add ,x ,y)} is a pattern that checks that @code{exp} is a three
340element list starting with the symbol @code{add}, then extracts the second and
341third elements and binds them to the variables @code{x} and @code{y}.
342@code{(pred numberp)} is a pattern that simply checks that @code{exp}
343is a number, and @code{_} is the catch-all pattern that matches anything.
344
345There are two kinds of patterns involved in @code{pcase}, called
346@emph{U-patterns} and @emph{Q-patterns}. The @var{upattern} mentioned above
347are U-patterns and can take the following forms:
348
349@table @code
350@item `@var{qpattern}
351This is one of the most common form of patterns. The intention is to mimic the
352backquote macro: this pattern matches those values that could have been built
353by such a backquote expression. Since we're pattern matching rather than
354building a value, the unquote does not indicate where to plug an expression,
355but instead it lets one specify a U-pattern that should match the value at
356that location.
357
358More specifically, a Q-pattern can take the following forms:
359@table @code
360@item (@var{qpattern1} . @var{qpattern2})
361This pattern matches any cons cell whose @code{car} matches @var{QPATTERN1} and
362whose @code{cdr} matches @var{PATTERN2}.
363@item @var{atom}
364This pattern matches any atom @code{equal} to @var{atom}.
365@item ,@var{upattern}
366This pattern matches any object that matches the @var{upattern}.
367@end table
368
369@item @var{symbol}
370A mere symbol in a U-pattern matches anything, and additionally let-binds this
371symbol to the value that it matched, so that you can later refer to it, either
372in the @var{body-forms} or also later in the pattern.
373@item _
374This so-called @emph{don't care} pattern matches anything, like the previous
375one, but unless symbol patterns it does not bind any variable.
376@item (pred @var{pred})
377This pattern matches if the function @var{pred} returns non-@code{nil} when
378called with the object being matched.
379@item (or @var{upattern1} @var{upattern2}@dots{})
380This pattern matches as soon as one of the argument patterns succeeds.
381All argument patterns should let-bind the same variables.
382@item (and @var{upattern1} @var{upattern2}@dots{})
383This pattern matches only if all the argument patterns succeed.
384@item (guard @var{exp})
385This pattern ignores the object being examined and simply succeeds if @var{exp}
386evaluates to non-@code{nil} and fails otherwise. It is typically used inside
387an @code{and} pattern. For example, @code{(and x (guard (< x 10)))}
388is a pattern which matches any number smaller than 10 and let-binds it to
389the variable @code{x}.
390@end table
391
288@node Combining Conditions 392@node Combining Conditions
289@section Constructs for Combining Conditions 393@section Constructs for Combining Conditions
290 394
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index c8d09760b53..56e091eabf2 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -303,7 +303,9 @@ evaluate at any time.
303The argument @var{doc} specifies the documentation string for the 303The argument @var{doc} specifies the documentation string for the
304variable. 304variable.
305 305
306Every @code{defcustom} should specify @code{:group} at least once. 306If a @code{defcustom} does not specify any @code{:group}, the last group
307defined with @code{defgroup} in the same file will be used. This way, most
308@code{defcustom} do not need an explicit @code{:group}.
307 309
308When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp 310When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp
309mode (@code{eval-defun}), a special feature of @code{eval-defun} 311mode (@code{eval-defun}), a special feature of @code{eval-defun}
diff --git a/etc/NEWS b/etc/NEWS
index acfc18bb9e0..c7622b09b6b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -840,6 +840,10 @@ that substring is inserted literally even if the LITERAL arg is
840non-nil, instead of causing an error to be signaled. 840non-nil, instead of causing an error to be signaled.
841 841
842+++ 842+++
843** `select-window' now always makes the window's buffer current.
844It does so even if the window was selected before.
845
846+++
843** Docstrings starting with `*' no longer indicate user options. 847** Docstrings starting with `*' no longer indicate user options.
844Only variables defined using `defcustom' are considered user options. 848Only variables defined using `defcustom' are considered user options.
845The function `user-variable-p' is now an obsolete alias for 849The function `user-variable-p' is now an obsolete alias for
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9e633f976d..787bfb7563b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,31 @@
12012-12-10 Dani Moncayo <dmoncayo@gmail.com>
2
3 * simple.el (just-one-space): Doc fix.
4
52012-12-10 Eli Zaretskii <eliz@gnu.org>
6
7 * textmodes/texinfo.el (texinfo-enable-quote-envs): Add
8 "smallexample".
9
102012-12-10 Le Wang <l26wang@gmail.com>
11
12 * hilit-chg.el (hilit-chg-set-face-on-change): Don't burp in
13 narrowed buffer (bug#12361).
14
152012-12-10 Juanma Barranquero <lekktu@gmail.com>
16
17 * vc/vc-hooks.el (vc-state): Doc fix.
18
192012-12-10 Glenn Morris <rgm@gnu.org>
20
21 * mail/rmail.el (rmail-maybe-display-summary):
22 Preserve buffer, in case select-window changes it. (Bug#13066)
23
242012-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
25
26 * emacs-lisp/cl.el, emacs-lisp/cl-lib.el: Move cl-unload-function and
27 cl-load-hook where they belong.
28
12012-12-10 Stefan Monnier <monnier@iro.umontreal.ca> 292012-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 30
3 * emacs-lisp/cl-lib.el (cl-declaim): Paren typo. 31 * emacs-lisp/cl-lib.el (cl-declaim): Paren typo.
@@ -4379,7 +4407,7 @@
4379 * calendar/cal-tex.el (cal-tex-weekly-common): 4407 * calendar/cal-tex.el (cal-tex-weekly-common):
4380 Restore leading blank page. 4408 Restore leading blank page.
4381 4409
43822012-08-22 Le Wang <l26wang@gmail.com> (tiny change) 44102012-08-22 Le Wang <l26wang@gmail.com>
4383 4411
4384 * misc.el (forward-to-word, backward-to-word): Activate or extend 4412 * misc.el (forward-to-word, backward-to-word): Activate or extend
4385 the region under `shift-select-mode'. (Bug#12231) 4413 the region under `shift-select-mode'. (Bug#12231)
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 55f6ac94c2b..9175dd7d608 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -113,12 +113,6 @@ printer proceeds to the next function on the list.
113This variable is not used at present, but it is defined in hopes that 113This variable is not used at present, but it is defined in hopes that
114a future Emacs interpreter will be able to use it.") 114a future Emacs interpreter will be able to use it.")
115 115
116(defun cl-unload-function ()
117 "Stop unloading of the Common Lisp extensions."
118 (message "Cannot unload the feature `cl'")
119 ;; Stop standard unloading!
120 t)
121
122;;; Generalized variables. 116;;; Generalized variables.
123;; These macros are defined here so that they 117;; These macros are defined here so that they
124;; can safely be used in init files. 118;; can safely be used in init files.
@@ -746,8 +740,6 @@ If ALIST is non-nil, the new pairs are prepended to it."
746 740
747(provide 'cl-lib) 741(provide 'cl-lib)
748 742
749(run-hooks 'cl-load-hook)
750
751;; Local variables: 743;; Local variables:
752;; byte-compile-dynamic: t 744;; byte-compile-dynamic: t
753;; End: 745;; End:
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 40d12358b17..7241b3c5984 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -83,6 +83,12 @@
83;; (delete-region (1- (point)) (point))) 83;; (delete-region (1- (point)) (point)))
84;; (save-buffer))))) 84;; (save-buffer)))))
85 85
86(defun cl-unload-function ()
87 "Stop unloading of the Common Lisp extensions."
88 (message "Cannot unload the feature `cl'")
89 ;; Stop standard unloading!
90 t)
91
86;;; Aliases to cl-lib's features. 92;;; Aliases to cl-lib's features.
87 93
88(dolist (var '( 94(dolist (var '(
@@ -735,4 +741,7 @@ You can replace this macro with `gv-letplace'."
735 (list accessor temp)))) 741 (list accessor temp))))
736 742
737(provide 'cl) 743(provide 'cl)
744
745(run-hooks 'cl-load-hook)
746
738;;; cl.el ends here 747;;; cl.el ends here
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 0970ece9446..7b5e2b54300 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -569,37 +569,39 @@ This allows you to manually remove highlighting from uninteresting changes."
569 highlight-changes-visible-mode) 569 highlight-changes-visible-mode)
570 (hilit-chg-fixup beg end)) 570 (hilit-chg-fixup beg end))
571 (highlight-save-buffer-state 571 (highlight-save-buffer-state
572 (if (and (= beg end) (> leng-before 0)) 572 (if (and (= beg end) (> leng-before 0))
573 ;; deletion 573 ;; deletion
574 (progn 574 (progn
575 ;; The eolp and bolp tests are a kludge! But they prevent 575 ;; The eolp and bolp tests are a kludge! But they prevent
576 ;; rather nasty looking displays when deleting text at the end 576 ;; rather nasty looking displays when deleting text at the end
577 ;; of line, such as normal corrections as one is typing and 577 ;; of line, such as normal corrections as one is typing and
578 ;; immediately makes a correction, and when deleting first 578 ;; immediately makes a correction, and when deleting first
579 ;; character of a line. 579 ;; character of a line.
580 ;; (if (= leng-before 1) 580 ;; (if (= leng-before 1)
581 ;; (if (eolp) 581 ;; (if (eolp)
582 ;; (setq beg-decr 0 end-incr 0) 582 ;; (setq beg-decr 0 end-incr 0)
583 ;; (if (bolp) 583 ;; (if (bolp)
584 ;; (setq beg-decr 0)))) 584 ;; (setq beg-decr 0))))
585 ;; (setq beg (max (- beg beg-decr) (point-min))) 585 ;; (setq beg (max (- beg beg-decr) (point-min)))
586 (setq end (min (+ end end-incr) (point-max))) 586 (setq end (min (+ end end-incr) (point-max)))
587 (setq type 'hilit-chg-delete)) 587 (setq type 'hilit-chg-delete))
588 ;; Not a deletion. 588 ;; Not a deletion.
589 ;; Most of the time the following is not necessary, but 589 ;; Most of the time the following is not necessary, but
590 ;; if the current text was marked as a deletion then 590 ;; if the current text was marked as a deletion then
591 ;; the old overlay is still in effect, so if we add some 591 ;; the old overlay is still in effect. So if the user adds some
592 ;; text then remove the deletion marking, but set it to 592 ;; text where she earlier deleted text, we have to remove the
593 ;; changed otherwise its highlighting disappears. 593 ;; deletion marking, and replace it explicitly with a `changed'
594 (if (eq (get-text-property end 'hilit-chg) 'hilit-chg-delete) 594 ;; marking, otherwise its highlighting would disappear.
595 (progn 595 (if (eq (get-text-property end 'hilit-chg) 'hilit-chg-delete)
596 (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg) 596 (save-restriction
597 (if highlight-changes-visible-mode 597 (widen)
598 (hilit-chg-fixup beg (+ end 1)))))) 598 (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg)
599 (unless no-property-change 599 (if highlight-changes-visible-mode
600 (put-text-property beg end 'hilit-chg type)) 600 (hilit-chg-fixup beg (+ end 1))))))
601 (if (or highlight-changes-visible-mode no-property-change) 601 (unless no-property-change
602 (hilit-chg-make-ov type beg end))))))) 602 (put-text-property beg end 'hilit-chg type))
603 (if (or highlight-changes-visible-mode no-property-change)
604 (hilit-chg-make-ov type beg end)))))))
603 605
604(defun hilit-chg-update () 606(defun hilit-chg-update ()
605 "Update a buffer's highlight changes when visibility changed." 607 "Update a buffer's highlight changes when visibility changed."
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index eec96f4c0b6..9c48788553b 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4225,6 +4225,7 @@ This has an effect only if a summary buffer exists."
4225;; Put the summary buffer back on the screen, if user wants that. 4225;; Put the summary buffer back on the screen, if user wants that.
4226(defun rmail-maybe-display-summary () 4226(defun rmail-maybe-display-summary ()
4227 (let ((selected (selected-window)) 4227 (let ((selected (selected-window))
4228 (buffer (current-buffer))
4228 window) 4229 window)
4229 ;; If requested, make sure the summary is displayed. 4230 ;; If requested, make sure the summary is displayed.
4230 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) 4231 (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
@@ -4246,7 +4247,8 @@ This has an effect only if a summary buffer exists."
4246 (progn 4247 (progn
4247 (select-window window) 4248 (select-window window)
4248 (enlarge-window (- rmail-summary-window-size (window-height)))) 4249 (enlarge-window (- rmail-summary-window-size (window-height))))
4249 (select-window selected))))) 4250 (select-window selected)
4251 (set-buffer buffer)))))
4250 4252
4251;;;; *** Rmail Local Fontification *** 4253;;;; *** Rmail Local Fontification ***
4252 4254
diff --git a/lisp/simple.el b/lisp/simple.el
index 51e676faffa..78b76579584 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -744,7 +744,7 @@ If BACKWARD-ONLY is non-nil, only delete them before point."
744 744
745(defun just-one-space (&optional n) 745(defun just-one-space (&optional n)
746 "Delete all spaces and tabs around point, leaving one space (or N spaces). 746 "Delete all spaces and tabs around point, leaving one space (or N spaces).
747If N is negative, delete newlines as well." 747If N is negative, delete newlines as well, leaving -N spaces."
748 (interactive "*p") 748 (interactive "*p")
749 (unless n (setq n 1)) 749 (unless n (setq n 1))
750 (let ((orig-pos (point)) 750 (let ((orig-pos (point))
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 253b56f09b1..263d875a5f0 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -678,7 +678,8 @@ Puts point on a blank line between them."
678 (not (match-end 1))))) 678 (not (match-end 1)))))
679 679
680(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>") 680(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>")
681(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>")) 681(defvar texinfo-enable-quote-envs
682 '("example\\>" "smallexample\\>" "lisp\\>"))
682(defun texinfo-insert-quote (&optional arg) 683(defun texinfo-insert-quote (&optional arg)
683 "Insert the appropriate quote mark for Texinfo. 684 "Insert the appropriate quote mark for Texinfo.
684Usually inserts the value of `texinfo-open-quote' (normally ``) or 685Usually inserts the value of `texinfo-open-quote' (normally ``) or
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 40a1f3db982..a5eb2932af8 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -438,8 +438,8 @@ For registered files, the possible values are:
438(defun vc-state (file &optional backend) 438(defun vc-state (file &optional backend)
439 "Return the version control state of FILE. 439 "Return the version control state of FILE.
440 440
441If FILE is not registered, this function always returns nil. 441A return of nil from this function means we have no information on the
442For registered files, the value returned is one of: 442status of this file. Otherwise, the value returned is one of:
443 443
444 'up-to-date The working file is unmodified with respect to the 444 'up-to-date The working file is unmodified with respect to the
445 latest version on the current branch, and not locked. 445 latest version on the current branch, and not locked.
@@ -491,10 +491,8 @@ For registered files, the value returned is one of:
491 that any file with vc-state nil might be ignorable 491 that any file with vc-state nil might be ignorable
492 without VC knowing it. 492 without VC knowing it.
493 493
494 'unregistered The file is not under version control. 494 'unregistered The file is not under version control."
495 495
496A return of nil from this function means we have no information on the
497status of this file."
498 ;; Note: in Emacs 22 and older, return of nil meant the file was 496 ;; Note: in Emacs 22 and older, return of nil meant the file was
499 ;; unregistered. This is potentially a source of 497 ;; unregistered. This is potentially a source of
500 ;; backward-compatibility bugs. 498 ;; backward-compatibility bugs.
diff --git a/src/ChangeLog b/src/ChangeLog
index dd51eb9ed3b..e7fc8179e07 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,31 @@
12012-12-10 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
4
52012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
6
7 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
8 DWORD_PTR, for compatibility with 64-bit builds.
9
10 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
11 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
12 (system_process_attributes): Use SIZE_T rather than DWORD, for
13 compatibility with 64-bit builds.
14
152012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
16
17 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
18
192012-12-10 Eli Zaretskii <eliz@gnu.org>
20
21 * indent.c (Fvertical_motion): If a display string will be
22 displayed on the left or the right margin, don't consider it as a
23 factor in cursor positioning. (Bug#13108)
24
252012-12-10 Martin Rudalics <rudalics@gmx.at>
26
27 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
28
12012-12-10 Paul Eggert <eggert@cs.ucla.edu> 292012-12-10 Paul Eggert <eggert@cs.ucla.edu>
2 30
3 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int, 31 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
diff --git a/src/editfns.c b/src/editfns.c
index 7d179c8566a..eb909f73697 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2635,10 +2635,10 @@ They default to the values of (point-min) and (point-max) in BUFFER. */)
2635DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, 2635DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings,
2636 6, 6, 0, 2636 6, 6, 0,
2637 doc: /* Compare two substrings of two buffers; return result as number. 2637 doc: /* Compare two substrings of two buffers; return result as number.
2638the value is -N if first string is less after N-1 chars, 2638Return -N if first string is less after N-1 chars, +N if first string is
2639+N if first string is greater after N-1 chars, or 0 if strings match. 2639greater after N-1 chars, or 0 if strings match. Each substring is
2640Each substring is represented as three arguments: BUFFER, START and END. 2640represented as three arguments: BUFFER, START and END. That makes six
2641That makes six args in all, three for each substring. 2641args in all, three for each substring.
2642 2642
2643The value of `case-fold-search' in the current buffer 2643The value of `case-fold-search' in the current buffer
2644determines whether case is significant or ignored. */) 2644determines whether case is significant or ignored. */)
diff --git a/src/indent.c b/src/indent.c
index a3abf88feeb..327526eae2d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2025,7 +2025,11 @@ whether or not it is currently displayed in some window. */)
2025 const char *s = SSDATA (it.string); 2025 const char *s = SSDATA (it.string);
2026 const char *e = s + SBYTES (it.string); 2026 const char *e = s + SBYTES (it.string);
2027 2027
2028 disp_string_at_start_p = it.string_from_display_prop_p; 2028 /* If it.area is anything but TEXT_AREA, we need not bother
2029 about the display string, as it doesn't affect cursor
2030 positioning. */
2031 disp_string_at_start_p =
2032 it.string_from_display_prop_p && it.area == TEXT_AREA;
2029 while (s < e) 2033 while (s < e)
2030 { 2034 {
2031 if (*s++ == '\n') 2035 if (*s++ == '\n')
diff --git a/src/lread.c b/src/lread.c
index 6647382a254..2f385797ca0 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4525,12 +4525,16 @@ The default is nil, which means use the function `read'. */);
4525 Vload_read_function = Qnil; 4525 Vload_read_function = Qnil;
4526 4526
4527 DEFVAR_LISP ("load-source-file-function", Vload_source_file_function, 4527 DEFVAR_LISP ("load-source-file-function", Vload_source_file_function,
4528 doc: /* Function called in `load' for loading an Emacs Lisp source file. 4528 doc: /* Function called in `load' to load an Emacs Lisp source file.
4529This function is for doing code conversion before reading the source file. 4529The value should be a function for doing code conversion before
4530If nil, loading is done without any code conversion. 4530reading a source file. It can also be nil, in which case loading is
4531Arguments are FULLNAME, FILE, NOERROR, NOMESSAGE, where 4531done without any code conversion.
4532 FULLNAME is the full name of FILE. 4532
4533See `load' for the meaning of the remaining arguments. */); 4533If the value is a function, it is called with four arguments,
4534FULLNAME, FILE, NOERROR, NOMESSAGE. FULLNAME is the absolute name of
4535the file to load, FILE is the non-absolute name (for messages etc.),
4536and NOERROR and NOMESSAGE are the corresponding arguments passed to
4537`load'. The function should return t if the file was loaded. */);
4534 Vload_source_file_function = Qnil; 4538 Vload_source_file_function = Qnil;
4535 4539
4536 DEFVAR_BOOL ("load-force-doc-strings", load_force_doc_strings, 4540 DEFVAR_BOOL ("load-force-doc-strings", load_force_doc_strings,
diff --git a/src/nsterm.m b/src/nsterm.m
index 55a106b7e03..80dc0ba6fc3 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4575,7 +4575,7 @@ not_in_argv (NSString *arg)
4575 if (waiting) 4575 if (waiting)
4576 { 4576 {
4577 SELECT_TYPE fds; 4577 SELECT_TYPE fds;
4578 4578 FD_ZERO (&fds);
4579 FD_SET (selfds[0], &fds); 4579 FD_SET (selfds[0], &fds);
4580 result = select (selfds[0]+1, &fds, NULL, NULL, NULL); 4580 result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
4581 if (result > 0 && read (selfds[0], &c, 1) == 1 && c == 'g') 4581 if (result > 0 && read (selfds[0], &c, 1) == 1 && c == 'g')
diff --git a/src/w32.c b/src/w32.c
index b6bb653369d..e163a3a1ee3 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -101,17 +101,17 @@ typedef struct _MEMORY_STATUS_EX {
101 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15 101 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15
102 defines it in psapi.h */ 102 defines it in psapi.h */
103typedef struct _PROCESS_MEMORY_COUNTERS_EX { 103typedef struct _PROCESS_MEMORY_COUNTERS_EX {
104 DWORD cb; 104 DWORD cb;
105 DWORD PageFaultCount; 105 DWORD PageFaultCount;
106 DWORD PeakWorkingSetSize; 106 SIZE_T PeakWorkingSetSize;
107 DWORD WorkingSetSize; 107 SIZE_T WorkingSetSize;
108 DWORD QuotaPeakPagedPoolUsage; 108 SIZE_T QuotaPeakPagedPoolUsage;
109 DWORD QuotaPagedPoolUsage; 109 SIZE_T QuotaPagedPoolUsage;
110 DWORD QuotaPeakNonPagedPoolUsage; 110 SIZE_T QuotaPeakNonPagedPoolUsage;
111 DWORD QuotaNonPagedPoolUsage; 111 SIZE_T QuotaNonPagedPoolUsage;
112 DWORD PagefileUsage; 112 SIZE_T PagefileUsage;
113 DWORD PeakPagefileUsage; 113 SIZE_T PeakPagefileUsage;
114 DWORD PrivateUsage; 114 SIZE_T PrivateUsage;
115} PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX; 115} PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX;
116#endif 116#endif
117 117
@@ -351,8 +351,8 @@ typedef BOOL (WINAPI * GetProcessMemoryInfo_Proc) (
351 DWORD cb); 351 DWORD cb);
352typedef BOOL (WINAPI * GetProcessWorkingSetSize_Proc) ( 352typedef BOOL (WINAPI * GetProcessWorkingSetSize_Proc) (
353 HANDLE hProcess, 353 HANDLE hProcess,
354 DWORD * lpMinimumWorkingSetSize, 354 PSIZE_T lpMinimumWorkingSetSize,
355 DWORD * lpMaximumWorkingSetSize); 355 PSIZE_T lpMaximumWorkingSetSize);
356typedef BOOL (WINAPI * GlobalMemoryStatus_Proc) ( 356typedef BOOL (WINAPI * GlobalMemoryStatus_Proc) (
357 LPMEMORYSTATUS lpBuffer); 357 LPMEMORYSTATUS lpBuffer);
358typedef BOOL (WINAPI * GlobalMemoryStatusEx_Proc) ( 358typedef BOOL (WINAPI * GlobalMemoryStatusEx_Proc) (
@@ -4685,8 +4685,8 @@ get_process_memory_info (HANDLE h_proc,
4685 4685
4686static BOOL WINAPI 4686static BOOL WINAPI
4687get_process_working_set_size (HANDLE h_proc, 4687get_process_working_set_size (HANDLE h_proc,
4688 DWORD *minrss, 4688 PSIZE_T minrss,
4689 DWORD *maxrss) 4689 PSIZE_T maxrss)
4690{ 4690{
4691 static GetProcessWorkingSetSize_Proc 4691 static GetProcessWorkingSetSize_Proc
4692 s_pfn_Get_Process_Working_Set_Size = NULL; 4692 s_pfn_Get_Process_Working_Set_Size = NULL;
@@ -4931,7 +4931,7 @@ system_process_attributes (Lisp_Object pid)
4931 unsigned egid; 4931 unsigned egid;
4932 PROCESS_MEMORY_COUNTERS mem; 4932 PROCESS_MEMORY_COUNTERS mem;
4933 PROCESS_MEMORY_COUNTERS_EX mem_ex; 4933 PROCESS_MEMORY_COUNTERS_EX mem_ex;
4934 DWORD minrss, maxrss; 4934 SIZE_T minrss, maxrss;
4935 MEMORYSTATUS memst; 4935 MEMORYSTATUS memst;
4936 MEMORY_STATUS_EX memstex; 4936 MEMORY_STATUS_EX memstex;
4937 double totphys = 0.0; 4937 double totphys = 0.0;
@@ -5159,7 +5159,7 @@ system_process_attributes (Lisp_Object pid)
5159 && get_process_memory_info (h_proc, (PROCESS_MEMORY_COUNTERS *)&mem_ex, 5159 && get_process_memory_info (h_proc, (PROCESS_MEMORY_COUNTERS *)&mem_ex,
5160 sizeof (mem_ex))) 5160 sizeof (mem_ex)))
5161 { 5161 {
5162 DWORD rss = mem_ex.WorkingSetSize / 1024; 5162 SIZE_T rss = mem_ex.WorkingSetSize / 1024;
5163 5163
5164 attrs = Fcons (Fcons (Qmajflt, 5164 attrs = Fcons (Fcons (Qmajflt,
5165 make_fixnum_or_float (mem_ex.PageFaultCount)), 5165 make_fixnum_or_float (mem_ex.PageFaultCount)),
@@ -5174,7 +5174,7 @@ system_process_attributes (Lisp_Object pid)
5174 else if (h_proc 5174 else if (h_proc
5175 && get_process_memory_info (h_proc, &mem, sizeof (mem))) 5175 && get_process_memory_info (h_proc, &mem, sizeof (mem)))
5176 { 5176 {
5177 DWORD rss = mem_ex.WorkingSetSize / 1024; 5177 SIZE_T rss = mem_ex.WorkingSetSize / 1024;
5178 5178
5179 attrs = Fcons (Fcons (Qmajflt, 5179 attrs = Fcons (Fcons (Qmajflt,
5180 make_fixnum_or_float (mem.PageFaultCount)), 5180 make_fixnum_or_float (mem.PageFaultCount)),
diff --git a/src/w32fns.c b/src/w32fns.c
index 1a181079c82..1b8483479a1 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7036,7 +7036,7 @@ cache_system_info (void)
7036 7036
7037 /* Cache page size, allocation unit, processor type, etc. */ 7037 /* Cache page size, allocation unit, processor type, etc. */
7038 GetSystemInfo (&sysinfo_cache); 7038 GetSystemInfo (&sysinfo_cache);
7039 syspage_mask = sysinfo_cache.dwPageSize - 1; 7039 syspage_mask = (DWORD_PTR)sysinfo_cache.dwPageSize - 1;
7040 7040
7041 /* Cache os info. */ 7041 /* Cache os info. */
7042 osinfo_cache.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); 7042 osinfo_cache.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);