aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3dbf4ebcd5..3a28e52a4d 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-10 Dani Moncayo <[email protected]>
+
+ * killing.texi (Deletion): Doc fix (Bug#12748).
+
2012-12-06 Paul Eggert <[email protected]>
* doclicense.texi, gpl.texi: Update to latest version from FSF.
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index a8d08bd660..fcd881a6bd 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
(even if there were none before). With a numeric argument @var{n}, it
leaves @var{n} spaces before point if @var{n} is positive; if @var{n}
is negative, it deletes newlines in addition to spaces and tabs,
-leaving a single space before point.
+leaving @var{-n} spaces before point.
@kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
after the current line. If the current line is blank, it deletes all
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7238d958d8..05716cd77b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-10 Stefan Monnier <[email protected]>
+
+ * control.texi (Pattern maching case statement): New node.
+
+ * customize.texi (Variable Definitions): Mention the default :group
+ for defcustoms (bug#13093).
+
2012-12-09 Glenn Morris <[email protected]>
* customize.texi (Variable Definitions): Mention eval-defun
@@ -27,7 +34,7 @@
* display.texi (Defining Faces):
* sequences.texi (Char-Tables): Fix xref.
- * keymaps.texi (Key Sequences): kbd is now a function.
+ * keymaps.texi (Key Sequences): `kbd' is now a function.
* commands.texi (Using Interactive): Fix index entry.
@@ -47,16 +54,14 @@
(Windows and Frames): Fix example. Move description of
window-in-direction here.
(Recombining Windows): Fix example.
- (Buffers and Windows): Fix description of
- replace-buffer-in-windows.
+ (Buffers and Windows): Fix description of replace-buffer-in-windows.
(Switching Buffers): Reword.
(Display Action Functions): Minor adjustments.
(Choosing Window Options): Minor fixes.
(Window History): Minor rewording.
(Dedicated Windows): Correct and reword part describing how
dedicatedness affects functions removing buffers or windows.
- * buffers.texi (The Buffer List): Fix description of
- bury-buffer.
+ * buffers.texi (The Buffer List): Fix description of bury-buffer.
2012-11-24 Chong Yidong <[email protected]>
@@ -115,8 +120,8 @@
* windows.texi (Choosing Window): Rewrite description of
display-buffer-alist (Bug#12167).
- (Display Action Functions): Mention inhibit-switch-frame. Fix
- description of display-buffer-below-selected. Reorder actions.
+ (Display Action Functions): Mention inhibit-switch-frame.
+ Fix description of display-buffer-below-selected. Reorder actions.
Add example (Bug#12848).
2012-11-16 Glenn Morris <[email protected]>
@@ -215,11 +220,11 @@
switch-to-buffer-preserve-window-point.
(Display Action Functions): Document window-height and
window-width alist entries.
- (Display Action Functions): Document
- display-buffer-below-selected and
+ (Display Action Functions):
+ Document display-buffer-below-selected and
display-buffer-in-previous-window.
- (Quitting Windows): Document quit-restore-window. Rewrite
- section.
+ (Quitting Windows): Document quit-restore-window.
+ Rewrite section.
(Window Configurations): In window-state-get mention that
argument window must be valid.
(Window Parameters): Document quit-restore window parameter
@@ -319,8 +324,8 @@
* minibuf.texi (Text from Minibuffer): Document read-regexp
changes.
- * nonascii.texi (Selecting a Representation): Document
- set-buffer-multibyte changes.
+ * nonascii.texi (Selecting a Representation):
+ Document set-buffer-multibyte changes.
* keymaps.texi (Toolkit Differences): Node deleted.
(Easy Menu): New node.
@@ -1092,8 +1097,8 @@
2012-04-12 Jari Aalto <[email protected]>
- * processes.texi (Synchronous Processes): Mention
- `default-directory' (bug#7515).
+ * processes.texi (Synchronous Processes):
+ Mention `default-directory' (bug#7515).
2012-04-09 Chong Yidong <[email protected]>
@@ -1116,8 +1121,8 @@
* minibuf.texi (Programmed Completion): Remove obsolete variable
completion-annotate-function.
- (Completion Variables): Rename from Completion Styles. Document
- completion-extra-properties. Document completion-styles-alist
+ (Completion Variables): Rename from Completion Styles.
+ Document completion-extra-properties. Document completion-styles-alist
change.
(Reading File Names): minibuffer-local-filename-must-match-map is
not used anymore.
@@ -1252,8 +1257,8 @@
Minor clarifications.
(Defining Faces): Copyedits. Update face example.
(Attribute Functions): Mark set-face-foreground etc as commands.
- (Face Remapping): Mention text-scale-adjust. Clarify
- face-remapping-alist and related docs.
+ (Face Remapping): Mention text-scale-adjust.
+ Clarify face-remapping-alist and related docs.
(Face Functions): Don't document make-face or copy-face.
2012-03-20 Chong Yidong <[email protected]>
@@ -1594,8 +1599,8 @@
(Syntax Properties): Document syntax-propertize-function and
syntax-propertize-extend-region-functions.
(Motion via Parsing): Clarify scan-lists. Fix indentation.
- (Parser State): Update for the new "c" comment style. Fix
- description of item 7 (comment style).
+ (Parser State): Update for the new "c" comment style.
+ Fix description of item 7 (comment style).
* modes.texi (Minor Modes): Update how mode commands should treat
arguments now.
@@ -1673,9 +1678,9 @@
* debugging.texi (Debugging): Copyedits. Describe testcover, ERT.
(Error Debugging): Note that debug-ignored-errors overrides list
- values of debug-on-error too. Add xref to Signaling Errors. Note
- that debug-on-signal is not customizable. Mention
- condition-case-unless-debug.
+ values of debug-on-error too. Add xref to Signaling Errors.
+ Note that debug-on-signal is not customizable.
+ Mention condition-case-unless-debug.
(Compilation Errors): Node deleted.
* compile.texi (Compiler Errors): Move a paragraph here from
@@ -1791,15 +1796,15 @@
2012-02-04 Chong Yidong <[email protected]>
* functions.texi (What Is a Function): Add closures. Mention
- "return value" terminology. Add xref for command-execute. Remove
- unused "keystroke command" terminology.
+ "return value" terminology. Add xref for command-execute.
+ Remove unused "keystroke command" terminology.
(Lambda Expressions): Give a different example than in the
following subsection. Add xref to Anonymous Functions.
(Function Documentation): Remove gratuitous markup.
(Function Names): Move introductory text to `What Is a Function'.
(Defining Functions): Fix defun argument spec.
- (Anonymous Functions): Document lambda macro explicitly. Mention
- effects on lexical binding.
+ (Anonymous Functions): Document lambda macro explicitly.
+ Mention effects on lexical binding.
(Function Cells): Downplay direct usage of fset.
(Closures): New node.
(Inline Functions): Remove "open-code" terminology.
@@ -1930,8 +1935,8 @@
* variables.texi (Variables, Local Variables, Void Variables):
Edit to make the descriptions less specific to dynamic binding.
(Local Variables): Default max-specpdl-size is now 1300.
- (Defining Variables): Edits for lexical scoping. Delete
- information about starting docstrings with *. De-document
+ (Defining Variables): Edits for lexical scoping.
+ Delete information about starting docstrings with *. De-document
user-variable-p.
(Tips for Defining): Remove an unimportant discussion of quitting
in the middle of a load.
@@ -2019,8 +2024,8 @@
2012-01-06 Chong Yidong <[email protected]>
- * variables.texi (Directory Local Variables): Document
- hack-dir-local-variables-non-file-buffer.
+ * variables.texi (Directory Local Variables):
+ Document hack-dir-local-variables-non-file-buffer.
2012-01-06 Glenn Morris <[email protected]>
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 489e5cc5b2..00b0a75a3e 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -285,6 +285,110 @@ For example:
@end group
@end example
+@menu
+* Pattern maching case statement::
+@end menu
+
+@node Pattern maching case statement
+@subsection Pattern maching case statement
+@cindex pcase
+@cindex pattern matching
+
+To compare a particular value against various possible cases, the macro
+@code{pcase} can come handy. It takes the following form:
+
+@example
+(pcase @var{exp} @var{branch}1 @var{branch}2 @var{branch}3 @dots{})
+@end example
+
+where each @var{branch} takes the form @code{(@var{upattern}
+@var{body-forms}@dots{})}.
+
+It will first evaluate @var{exp} and then compare the value against each
+@var{upattern} to see which @var{branch} to use, after which it will run the
+corresponding @var{body-forms}. A common use case is to distinguish
+between a few different constant values:
+
+@example
+(pcase (get-return-code x)
+ (`success (message "Done!"))
+ (`would-block (message "Sorry, can't do it now"))
+ (`read-only (message "The shmliblick is read-only"))
+ (`access-denied (message "You do not have the needed rights"))
+ (code (message "Unknown return code %S" code)))
+@end example
+
+In the last clause, @code{code} is a variable that gets bound to the value that
+was returned by @code{(get-return-code x)}.
+
+To give a more complex example, a simple interpreter for a little
+expression language could look like:
+
+@example
+(defun evaluate (exp env)
+ (pcase exp
+ (`(add ,x ,y) (+ (evaluate x env) (evaluate y env)))
+ (`(call ,fun ,arg) (funcall (evaluate fun) (evaluate arg env)))
+ (`(fn ,arg ,body) (lambda (val)
+ (evaluate body (cons (cons arg val) env))))
+ ((pred numberp) exp)
+ ((pred symbolp) (cdr (assq exp env)))
+ (_ (error "Unknown expression %S" exp))))
+@end example
+
+Where @code{`(add ,x ,y)} is a pattern that checks that @code{exp} is a three
+element list starting with the symbol @code{add}, then extracts the second and
+third elements and binds them to the variables @code{x} and @code{y}.
+@code{(pred numberp)} is a pattern that simply checks that @code{exp}
+is a number, and @code{_} is the catch-all pattern that matches anything.
+
+There are two kinds of patterns involved in @code{pcase}, called
+@emph{U-patterns} and @emph{Q-patterns}. The @var{upattern} mentioned above
+are U-patterns and can take the following forms:
+
+@table @code
+@item `@var{qpattern}
+This is one of the most common form of patterns. The intention is to mimic the
+backquote macro: this pattern matches those values that could have been built
+by such a backquote expression. Since we're pattern matching rather than
+building a value, the unquote does not indicate where to plug an expression,
+but instead it lets one specify a U-pattern that should match the value at
+that location.
+
+More specifically, a Q-pattern can take the following forms:
+@table @code
+@item (@var{qpattern1} . @var{qpattern2})
+This pattern matches any cons cell whose @code{car} matches @var{QPATTERN1} and
+whose @code{cdr} matches @var{PATTERN2}.
+@item @var{atom}
+This pattern matches any atom @code{equal} to @var{atom}.
+@item ,@var{upattern}
+This pattern matches any object that matches the @var{upattern}.
+@end table
+
+@item @var{symbol}
+A mere symbol in a U-pattern matches anything, and additionally let-binds this
+symbol to the value that it matched, so that you can later refer to it, either
+in the @var{body-forms} or also later in the pattern.
+@item _
+This so-called @emph{don't care} pattern matches anything, like the previous
+one, but unless symbol patterns it does not bind any variable.
+@item (pred @var{pred})
+This pattern matches if the function @var{pred} returns non-@code{nil} when
+called with the object being matched.
+@item (or @var{upattern1} @var{upattern2}@dots{})
+This pattern matches as soon as one of the argument patterns succeeds.
+All argument patterns should let-bind the same variables.
+@item (and @var{upattern1} @var{upattern2}@dots{})
+This pattern matches only if all the argument patterns succeed.
+@item (guard @var{exp})
+This pattern ignores the object being examined and simply succeeds if @var{exp}
+evaluates to non-@code{nil} and fails otherwise. It is typically used inside
+an @code{and} pattern. For example, @code{(and x (guard (< x 10)))}
+is a pattern which matches any number smaller than 10 and let-binds it to
+the variable @code{x}.
+@end table
+
@node Combining Conditions
@section Constructs for Combining Conditions
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index c8d09760b5..56e091eabf 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -303,7 +303,9 @@ evaluate at any time.
The argument @var{doc} specifies the documentation string for the
variable.
-Every @code{defcustom} should specify @code{:group} at least once.
+If a @code{defcustom} does not specify any @code{:group}, the last group
+defined with @code{defgroup} in the same file will be used. This way, most
+@code{defcustom} do not need an explicit @code{:group}.
When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp
mode (@code{eval-defun}), a special feature of @code{eval-defun}
diff --git a/etc/NEWS b/etc/NEWS
index acfc18bb9e..c7622b09b6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -840,6 +840,10 @@ that substring is inserted literally even if the LITERAL arg is
non-nil, instead of causing an error to be signaled.
+++
+** `select-window' now always makes the window's buffer current.
+It does so even if the window was selected before.
+
++++
** Docstrings starting with `*' no longer indicate user options.
Only variables defined using `defcustom' are considered user options.
The function `user-variable-p' is now an obsolete alias for
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9e633f976..787bfb7563 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,31 @@
+2012-12-10 Dani Moncayo <[email protected]>
+
+ * simple.el (just-one-space): Doc fix.
+
+2012-12-10 Eli Zaretskii <[email protected]>
+
+ * textmodes/texinfo.el (texinfo-enable-quote-envs): Add
+ "smallexample".
+
+2012-12-10 Le Wang <[email protected]>
+
+ * hilit-chg.el (hilit-chg-set-face-on-change): Don't burp in
+ narrowed buffer (bug#12361).
+
+2012-12-10 Juanma Barranquero <[email protected]>
+
+ * vc/vc-hooks.el (vc-state): Doc fix.
+
+2012-12-10 Glenn Morris <[email protected]>
+
+ * mail/rmail.el (rmail-maybe-display-summary):
+ Preserve buffer, in case select-window changes it. (Bug#13066)
+
+2012-12-10 Stefan Monnier <[email protected]>
+
+ * emacs-lisp/cl.el, emacs-lisp/cl-lib.el: Move cl-unload-function and
+ cl-load-hook where they belong.
+
2012-12-10 Stefan Monnier <[email protected]>
* emacs-lisp/cl-lib.el (cl-declaim): Paren typo.
@@ -4379,7 +4407,7 @@
* calendar/cal-tex.el (cal-tex-weekly-common):
Restore leading blank page.
-2012-08-22 Le Wang <[email protected]> (tiny change)
+2012-08-22 Le Wang <[email protected]>
* misc.el (forward-to-word, backward-to-word): Activate or extend
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 55f6ac94c2..9175dd7d60 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.
This variable is not used at present, but it is defined in hopes that
a future Emacs interpreter will be able to use it.")
-(defun cl-unload-function ()
- "Stop unloading of the Common Lisp extensions."
- (message "Cannot unload the feature `cl'")
- ;; Stop standard unloading!
- t)
-
;;; Generalized variables.
;; These macros are defined here so that they
;; can safely be used in init files.
@@ -746,8 +740,6 @@ If ALIST is non-nil, the new pairs are prepended to it."
(provide 'cl-lib)
-(run-hooks 'cl-load-hook)
-
;; Local variables:
;; byte-compile-dynamic: t
;; End:
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 40d12358b1..7241b3c598 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -83,6 +83,12 @@
;; (delete-region (1- (point)) (point)))
;; (save-buffer)))))
+(defun cl-unload-function ()
+ "Stop unloading of the Common Lisp extensions."
+ (message "Cannot unload the feature `cl'")
+ ;; Stop standard unloading!
+ t)
+
;;; Aliases to cl-lib's features.
(dolist (var '(
@@ -735,4 +741,7 @@ You can replace this macro with `gv-letplace'."
(list accessor temp))))
(provide 'cl)
+
+(run-hooks 'cl-load-hook)
+
;;; cl.el ends here
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 0970ece944..7b5e2b5430 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."
highlight-changes-visible-mode)
(hilit-chg-fixup beg end))
(highlight-save-buffer-state
- (if (and (= beg end) (> leng-before 0))
- ;; deletion
- (progn
- ;; The eolp and bolp tests are a kludge! But they prevent
- ;; rather nasty looking displays when deleting text at the end
- ;; of line, such as normal corrections as one is typing and
- ;; immediately makes a correction, and when deleting first
- ;; character of a line.
- ;; (if (= leng-before 1)
- ;; (if (eolp)
- ;; (setq beg-decr 0 end-incr 0)
- ;; (if (bolp)
- ;; (setq beg-decr 0))))
- ;; (setq beg (max (- beg beg-decr) (point-min)))
- (setq end (min (+ end end-incr) (point-max)))
- (setq type 'hilit-chg-delete))
- ;; Not a deletion.
- ;; Most of the time the following is not necessary, but
- ;; if the current text was marked as a deletion then
- ;; the old overlay is still in effect, so if we add some
- ;; text then remove the deletion marking, but set it to
- ;; changed otherwise its highlighting disappears.
- (if (eq (get-text-property end 'hilit-chg) 'hilit-chg-delete)
- (progn
- (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg)
- (if highlight-changes-visible-mode
- (hilit-chg-fixup beg (+ end 1))))))
- (unless no-property-change
- (put-text-property beg end 'hilit-chg type))
- (if (or highlight-changes-visible-mode no-property-change)
- (hilit-chg-make-ov type beg end)))))))
+ (if (and (= beg end) (> leng-before 0))
+ ;; deletion
+ (progn
+ ;; The eolp and bolp tests are a kludge! But they prevent
+ ;; rather nasty looking displays when deleting text at the end
+ ;; of line, such as normal corrections as one is typing and
+ ;; immediately makes a correction, and when deleting first
+ ;; character of a line.
+ ;; (if (= leng-before 1)
+ ;; (if (eolp)
+ ;; (setq beg-decr 0 end-incr 0)
+ ;; (if (bolp)
+ ;; (setq beg-decr 0))))
+ ;; (setq beg (max (- beg beg-decr) (point-min)))
+ (setq end (min (+ end end-incr) (point-max)))
+ (setq type 'hilit-chg-delete))
+ ;; Not a deletion.
+ ;; Most of the time the following is not necessary, but
+ ;; if the current text was marked as a deletion then
+ ;; the old overlay is still in effect. So if the user adds some
+ ;; text where she earlier deleted text, we have to remove the
+ ;; deletion marking, and replace it explicitly with a `changed'
+ ;; marking, otherwise its highlighting would disappear.
+ (if (eq (get-text-property end 'hilit-chg) 'hilit-chg-delete)
+ (save-restriction
+ (widen)
+ (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg)
+ (if highlight-changes-visible-mode
+ (hilit-chg-fixup beg (+ end 1))))))
+ (unless no-property-change
+ (put-text-property beg end 'hilit-chg type))
+ (if (or highlight-changes-visible-mode no-property-change)
+ (hilit-chg-make-ov type beg end)))))))
(defun hilit-chg-update ()
"Update a buffer's highlight changes when visibility changed."
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index eec96f4c0b..9c48788553 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."
;; Put the summary buffer back on the screen, if user wants that.
(defun rmail-maybe-display-summary ()
(let ((selected (selected-window))
+ (buffer (current-buffer))
window)
;; If requested, make sure the summary is displayed.
(and rmail-summary-buffer (buffer-name rmail-summary-buffer)
@@ -4246,7 +4247,8 @@ This has an effect only if a summary buffer exists."
(progn
(select-window window)
(enlarge-window (- rmail-summary-window-size (window-height))))
- (select-window selected)))))
+ (select-window selected)
+ (set-buffer buffer)))))
;;;; *** Rmail Local Fontification ***
diff --git a/lisp/simple.el b/lisp/simple.el
index 51e676faff..78b7657958 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -744,7 +744,7 @@ If BACKWARD-ONLY is non-nil, only delete them before point."
(defun just-one-space (&optional n)
"Delete all spaces and tabs around point, leaving one space (or N spaces).
-If N is negative, delete newlines as well."
+If N is negative, delete newlines as well, leaving -N spaces."
(interactive "*p")
(unless n (setq n 1))
(let ((orig-pos (point))
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 253b56f09b..263d875a5f 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -678,7 +678,8 @@ Puts point on a blank line between them."
(not (match-end 1)))))
(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>")
-(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>"))
+(defvar texinfo-enable-quote-envs
+ '("example\\>" "smallexample\\>" "lisp\\>"))
(defun texinfo-insert-quote (&optional arg)
"Insert the appropriate quote mark for Texinfo.
Usually inserts the value of `texinfo-open-quote' (normally ``) or
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 40a1f3db98..a5eb2932af 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -438,8 +438,8 @@ For registered files, the possible values are:
(defun vc-state (file &optional backend)
"Return the version control state of FILE.
-If FILE is not registered, this function always returns nil.
-For registered files, the value returned is one of:
+A return of nil from this function means we have no information on the
+status of this file. Otherwise, the value returned is one of:
'up-to-date The working file is unmodified with respect to the
latest version on the current branch, and not locked.
@@ -491,10 +491,8 @@ For registered files, the value returned is one of:
that any file with vc-state nil might be ignorable
without VC knowing it.
- 'unregistered The file is not under version control.
+ 'unregistered The file is not under version control."
-A return of nil from this function means we have no information on the
-status of this file."
;; Note: in Emacs 22 and older, return of nil meant the file was
;; unregistered. This is potentially a source of
;; backward-compatibility bugs.
diff --git a/src/ChangeLog b/src/ChangeLog
index dd51eb9ed3..e7fc8179e0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,31 @@
+2012-12-10 Jan Djärv <[email protected]>
+
+ * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
+
+2012-12-10 Fabrice Popineau <[email protected]>
+
+ * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
+ DWORD_PTR, for compatibility with 64-bit builds.
+
+ * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
+ (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
+ (system_process_attributes): Use SIZE_T rather than DWORD, for
+ compatibility with 64-bit builds.
+
+2012-12-10 Christopher Schmidt <[email protected]>
+
+ * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
+
+2012-12-10 Eli Zaretskii <[email protected]>
+
+ * indent.c (Fvertical_motion): If a display string will be
+ displayed on the left or the right margin, don't consider it as a
+ factor in cursor positioning. (Bug#13108)
+
+2012-12-10 Martin Rudalics <[email protected]>
+
+ * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
+
2012-12-10 Paul Eggert <[email protected]>
* fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
diff --git a/src/editfns.c b/src/editfns.c
index 7d179c8566..eb909f7369 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. */)
DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings,
6, 6, 0,
doc: /* Compare two substrings of two buffers; return result as number.
-the value is -N if first string is less after N-1 chars,
-+N if first string is greater after N-1 chars, or 0 if strings match.
-Each substring is represented as three arguments: BUFFER, START and END.
-That makes six args in all, three for each substring.
+Return -N if first string is less after N-1 chars, +N if first string is
+greater after N-1 chars, or 0 if strings match. Each substring is
+represented as three arguments: BUFFER, START and END. That makes six
+args in all, three for each substring.
The value of `case-fold-search' in the current buffer
determines whether case is significant or ignored. */)
diff --git a/src/indent.c b/src/indent.c
index a3abf88fee..327526eae2 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2025,7 +2025,11 @@ whether or not it is currently displayed in some window. */)
const char *s = SSDATA (it.string);
const char *e = s + SBYTES (it.string);
- disp_string_at_start_p = it.string_from_display_prop_p;
+ /* If it.area is anything but TEXT_AREA, we need not bother
+ about the display string, as it doesn't affect cursor
+ positioning. */
+ disp_string_at_start_p =
+ it.string_from_display_prop_p && it.area == TEXT_AREA;
while (s < e)
{
if (*s++ == '\n')
diff --git a/src/lread.c b/src/lread.c
index 6647382a25..2f385797ca 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4525,12 +4525,16 @@ The default is nil, which means use the function `read'. */);
Vload_read_function = Qnil;
DEFVAR_LISP ("load-source-file-function", Vload_source_file_function,
- doc: /* Function called in `load' for loading an Emacs Lisp source file.
-This function is for doing code conversion before reading the source file.
-If nil, loading is done without any code conversion.
-Arguments are FULLNAME, FILE, NOERROR, NOMESSAGE, where
- FULLNAME is the full name of FILE.
-See `load' for the meaning of the remaining arguments. */);
+ doc: /* Function called in `load' to load an Emacs Lisp source file.
+The value should be a function for doing code conversion before
+reading a source file. It can also be nil, in which case loading is
+done without any code conversion.
+
+If the value is a function, it is called with four arguments,
+FULLNAME, FILE, NOERROR, NOMESSAGE. FULLNAME is the absolute name of
+the file to load, FILE is the non-absolute name (for messages etc.),
+and NOERROR and NOMESSAGE are the corresponding arguments passed to
+`load'. The function should return t if the file was loaded. */);
Vload_source_file_function = Qnil;
DEFVAR_BOOL ("load-force-doc-strings", load_force_doc_strings,
diff --git a/src/nsterm.m b/src/nsterm.m
index 55a106b7e0..80dc0ba6fc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4575,7 +4575,7 @@ not_in_argv (NSString *arg)
if (waiting)
{
SELECT_TYPE fds;
-
+ FD_ZERO (&fds);
FD_SET (selfds[0], &fds);
result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
if (result > 0 && read (selfds[0], &c, 1) == 1 && c == 'g')
diff --git a/src/w32.c b/src/w32.c
index b6bb653369..e163a3a1ee 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -101,17 +101,17 @@ typedef struct _MEMORY_STATUS_EX {
_WIN32_WINNT than what we use. w32api supplied with MinGW 3.15
defines it in psapi.h */
typedef struct _PROCESS_MEMORY_COUNTERS_EX {
- DWORD cb;
- DWORD PageFaultCount;
- DWORD PeakWorkingSetSize;
- DWORD WorkingSetSize;
- DWORD QuotaPeakPagedPoolUsage;
- DWORD QuotaPagedPoolUsage;
- DWORD QuotaPeakNonPagedPoolUsage;
- DWORD QuotaNonPagedPoolUsage;
- DWORD PagefileUsage;
- DWORD PeakPagefileUsage;
- DWORD PrivateUsage;
+ DWORD cb;
+ DWORD PageFaultCount;
+ SIZE_T PeakWorkingSetSize;
+ SIZE_T WorkingSetSize;
+ SIZE_T QuotaPeakPagedPoolUsage;
+ SIZE_T QuotaPagedPoolUsage;
+ SIZE_T QuotaPeakNonPagedPoolUsage;
+ SIZE_T QuotaNonPagedPoolUsage;
+ SIZE_T PagefileUsage;
+ SIZE_T PeakPagefileUsage;
+ SIZE_T PrivateUsage;
} PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX;
#endif
@@ -351,8 +351,8 @@ typedef BOOL (WINAPI * GetProcessMemoryInfo_Proc) (
DWORD cb);
typedef BOOL (WINAPI * GetProcessWorkingSetSize_Proc) (
HANDLE hProcess,
- DWORD * lpMinimumWorkingSetSize,
- DWORD * lpMaximumWorkingSetSize);
+ PSIZE_T lpMinimumWorkingSetSize,
+ PSIZE_T lpMaximumWorkingSetSize);
typedef BOOL (WINAPI * GlobalMemoryStatus_Proc) (
LPMEMORYSTATUS lpBuffer);
typedef BOOL (WINAPI * GlobalMemoryStatusEx_Proc) (
@@ -4685,8 +4685,8 @@ get_process_memory_info (HANDLE h_proc,
static BOOL WINAPI
get_process_working_set_size (HANDLE h_proc,
- DWORD *minrss,
- DWORD *maxrss)
+ PSIZE_T minrss,
+ PSIZE_T maxrss)
{
static GetProcessWorkingSetSize_Proc
s_pfn_Get_Process_Working_Set_Size = NULL;
@@ -4931,7 +4931,7 @@ system_process_attributes (Lisp_Object pid)
unsigned egid;
PROCESS_MEMORY_COUNTERS mem;
PROCESS_MEMORY_COUNTERS_EX mem_ex;
- DWORD minrss, maxrss;
+ SIZE_T minrss, maxrss;
MEMORYSTATUS memst;
MEMORY_STATUS_EX memstex;
double totphys = 0.0;
@@ -5159,7 +5159,7 @@ system_process_attributes (Lisp_Object pid)
&& get_process_memory_info (h_proc, (PROCESS_MEMORY_COUNTERS *)&mem_ex,
sizeof (mem_ex)))
{
- DWORD rss = mem_ex.WorkingSetSize / 1024;
+ SIZE_T rss = mem_ex.WorkingSetSize / 1024;
attrs = Fcons (Fcons (Qmajflt,
make_fixnum_or_float (mem_ex.PageFaultCount)),
@@ -5174,7 +5174,7 @@ system_process_attributes (Lisp_Object pid)
else if (h_proc
&& get_process_memory_info (h_proc, &mem, sizeof (mem)))
{
- DWORD rss = mem_ex.WorkingSetSize / 1024;
+ SIZE_T rss = mem_ex.WorkingSetSize / 1024;
attrs = Fcons (Fcons (Qmajflt,
make_fixnum_or_float (mem.PageFaultCount)),
diff --git a/src/w32fns.c b/src/w32fns.c
index 1a181079c8..1b8483479a 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7036,7 +7036,7 @@ cache_system_info (void)
/* Cache page size, allocation unit, processor type, etc. */
GetSystemInfo (&sysinfo_cache);
- syspage_mask = sysinfo_cache.dwPageSize - 1;
+ syspage_mask = (DWORD_PTR)sysinfo_cache.dwPageSize - 1;
/* Cache os info. */
osinfo_cache.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);