emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3404a87 2/2: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 3404a87 2/2: Merge from origin/emacs-26
Date: Fri, 22 Dec 2017 13:23:30 -0500 (EST)

branch: master
commit 3404a87f29b28b449a2e6188f075df2f761caac5
Merge: 5ee4f2f 34fcfc5
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    34fcfc5 (origin/emacs-26, emacs-26) * lisp/emacs-lisp/inline.el (defi...
    f7a62c2 Fix doc string of 'footnote-style-alist'
    c3b6742 Improve documentation of selecting windows
    861d110 Improve documentation of records
    22b3075 * etc/NEWS: Mention the removal of pinentry.el.  (Bug#27445)
    689526b Fix interactive spec of 'semantic-ia-show-variants'
    90ca37f Fix documentation of 'mouse-drag-and-drop-region' and friends
    d60faf3 Improve detection of speller version in ispell.el
    a0e3b06 Document 'mouse-drag-and-drop-region' options and mention the...
    164e84c Fix uses of 'nil' and 'non-nil' in manuals and a few more min...
    798f07f Document that mode commands should be idempotent.
    ad2a47c ; * src/xdisp.c (extend_face_to_end_of_line): Fix last change.
    88ddf53 Fontify a CPP construct correctly when a comment follows with...
    de7de9c Prevent infloop in redisplay on TTY frames
    293720e Fix loss of documentation face in certain CC Mode doc comment...
    
    # Conflicts:
    #   etc/NEWS
    #   lisp/mail/footnote.el
---
 doc/emacs/building.texi     |  9 ++++----
 doc/emacs/frames.texi       | 43 +++++++++++++++++++++++-------------
 doc/emacs/search.texi       | 11 +++++-----
 doc/lispref/Makefile.in     |  1 +
 doc/lispref/compile.texi    |  2 +-
 doc/lispref/files.texi      |  3 ++-
 doc/lispref/functions.texi  |  4 ++--
 doc/lispref/keymaps.texi    |  5 +++--
 doc/lispref/lists.texi      |  7 +++---
 doc/lispref/modes.texi      |  9 ++++++++
 doc/lispref/records.texi    |  9 +++++++-
 doc/lispref/windows.texi    | 23 +++++++++++++-------
 etc/NEWS.26                 | 35 ++++++++++++++++++++++++------
 lisp/cedet/semantic/ia.el   |  2 +-
 lisp/emacs-lisp/inline.el   |  4 ++++
 lisp/mail/footnote.el       |  4 +---
 lisp/progmodes/cc-defs.el   | 53 ---------------------------------------------
 lisp/progmodes/cc-engine.el | 27 +++++++----------------
 lisp/progmodes/cc-fonts.el  | 13 ++++++++---
 lisp/progmodes/cc-langs.el  |  4 ++--
 lisp/progmodes/cc-mode.el   | 26 +++++-----------------
 lisp/textmodes/ispell.el    | 30 ++++++++++++++-----------
 src/xdisp.c                 |  8 +++++--
 23 files changed, 167 insertions(+), 165 deletions(-)

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index e108a4e..f342aef 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -394,10 +394,11 @@ match will be highlighted, instead of the entire source 
line.
   The @command{grep} commands will offer to save buffers before
 running.  This is controlled by the @code{grep-save-buffers} variable.
 The possible values are either @code{nil} (don't save), @code{ask}
-(ask before saving), a function which will be used as a predicate (and
-is called with the file name as the parameter and should return
-non-nil if the buffer is to be saved), and any other address@hidden
-value means that all buffers should be saved without asking.
+(ask before saving), or a function which will be used as a predicate
+(and is called with the file name as the parameter and should return
address@hidden if the buffer is to be saved).  Any other
address@hidden value means that all buffers should be saved without
+asking.
 
 @findex grep-find
 @findex find-grep
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index c94d690..0c99407 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -243,9 +243,9 @@ location of point.  Double-clicking on the end of a 
parenthetical
 grouping or end string-delimiter keeps point at the end of the region
 by default, so the beginning of the region will not be visible if it
 is above the top of the window; setting the user option
address@hidden to non-nil changes this
-to move point to the beginning of the region, scrolling the display
-backward if necessary.
address@hidden to address@hidden changes
+this to move point to the beginning of the region, scrolling the
+display backward if necessary.
 
 @item Double-Drag-mouse-1
 Select the text you drag across, in the form of whole words.
@@ -1094,18 +1094,6 @@ file on a Dired buffer moves or copies the file 
(according to the
 conventions of the application it came from) into the directory
 displayed in that buffer.
 
address@hidden mouse-drag-and-drop-region
-  Emacs can also optionally drag the region of text by mouse into
-another portion of this or another buffer.  To enable that, customize
-the variable @code{mouse-drag-and-drop-region} to a non-nil value.
-Normally, the text is moved, i.e. cut and pasted, when the destination
-is the same buffer as the origin; dropping the region on another
-buffer copies the text instead.  If the value of this variable names a
-modifier key, such as @samp{shift} or @samp{control} or @samp{alt},
-then pressing that modifier key when dropping the text will copy it
-instead of cutting it, even if you drop on the same buffer as the one
-from which the text came.
-
 @vindex dnd-open-file-other-window
   Dropping a file normally visits it in the window you drop it on.  If
 you prefer to visit the file in a new window in such cases, customize
@@ -1114,6 +1102,31 @@ the variable @code{dnd-open-file-other-window}.
   The XDND and Motif drag and drop protocols, and the old KDE 1.x
 protocol, are currently supported.
 
address@hidden mouse-drag-and-drop-region
+  Emacs can also optionally drag the region with the mouse into
+another portion of this or another buffer.  To enable that, customize
+the variable @code{mouse-drag-and-drop-region} to a address@hidden
+value.  Normally, the text is moved, i.e. cut and pasted, when the
+destination is the same buffer as the origin; dropping the region on
+another buffer copies the text instead.  If the value of this variable
+names a modifier key, such as @samp{shift}, @samp{control} or
address@hidden, then pressing that modifier key when dropping the text
+will copy it instead of cutting it, even if you drop on the same
+buffer as the one from which the text came.
+
address@hidden mouse-drag-and-drop-region-cut-when-buffers-differ
address@hidden mouse-drag-and-drop-region-show-tooltip
address@hidden mouse-drag-and-drop-region-show-cursor
+In order to cut text even when source and destination buffers differ,
+set the option
address@hidden to a
address@hidden value.  By default, on a graphic display the selected
+text is shown in a tooltip and point moves together with the mouse
+cursor during dragging.  To suppress such behavior, set the options
address@hidden and/or
address@hidden to @code{nil}.
+
+
 @node Menu Bars
 @section Menu Bars
 @cindex Menu Bar mode
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 7b33473..c485368 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1746,12 +1746,13 @@ prompt, you can reuse search strings from previous 
incremental
 searches.  The text that matched is highlighted using the @code{match}
 face.  A numeric argument @var{n} specifies that @var{n} lines of
 context are to be displayed before and after each matching line.
+
 The default number of context lines is specified by the variable
address@hidden
-When @code{list-matching-lines-jump-to-current-line} is non-nil,
-the current line is shown highlighted with face
address@hidden and the point is set
-at the first match after such line.
address@hidden  When
address@hidden is address@hidden the
+current line is shown highlighted with face
address@hidden and the point is set at
+the first match after such line.
 
 You can also run @kbd{M-s o} when an incremental search is active;
 this uses the current search string.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 9fa5901..50d6d16 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -118,6 +118,7 @@ srcs = \
   $(srcdir)/package.texi \
   $(srcdir)/positions.texi \
   $(srcdir)/processes.texi \
+  $(srcdir)/records.texi \
   $(srcdir)/searching.texi \
   $(srcdir)/sequences.texi \
   $(srcdir)/streams.texi \
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 57ff060..9123e93 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -94,7 +94,7 @@ the @code{byte-compile} function.  You can compile a whole 
file with
 recorded in a buffer called @file{*Compile-Log*}, which uses
 Compilation mode.  @xref{Compilation Mode,,,emacs, The GNU Emacs
 Manual}.  However, if the variable @code{byte-compile-debug} is
-non-nil, error message will be signaled as Lisp errors instead
address@hidden, error messages will be signaled as Lisp errors instead
 (@pxref{Errors}).
 
 @cindex macro compilation
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index b257c32..f7eafca 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2282,7 +2282,8 @@ because this is not portable.  Always use
 @code{file-name-as-directory}.
 
   To avoid the issues mentioned above, or if the @var{dirname} value
-might be nil (for example, from an element of @code{load-path}), use:
+might be @code{nil} (for example, from an element of @code{load-path}),
+use:
 
 @example
 (expand-file-name @var{relfile} @var{dirname})
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index d84f09d..3f99390 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1753,8 +1753,8 @@ code) obey the advice and other calls (from C code) do 
not.
 @defmac define-advice symbol (where lambda-list &optional name depth) &rest 
body
 This macro defines a piece of advice and adds it to the function named
 @var{symbol}.  The advice is an anonymous function if @var{name} is
-nil or a function named @code{symbol@@name}.  See @code{advice-add}
-for explanation of other arguments.
address@hidden or a function named @code{symbol@@name}.  See
address@hidden for explanation of other arguments.
 @end defmac
 
 @defun advice-add symbol where function &optional props
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 73f5572..71b054e 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -988,8 +988,9 @@ function is called with no arguments, prior to running each 
command,
 while @var{keymap} is active; it should return address@hidden if
 @var{keymap} should stay active.
 
-The optional argument @var{on-exit}, if non-nil, specifies a function
-that is called, with no arguments, after @var{keymap} is deactivated.
+The optional argument @var{on-exit}, if address@hidden, specifies a
+function that is called, with no arguments, after @var{keymap} is
+deactivated.
 
 This function works by adding and removing @var{keymap} from the
 variable @code{overriding-terminal-local-map}, which takes precedence
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 0c99380..230ea4b 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1514,9 +1514,10 @@ of property lists and association lists.
 @defun assoc key alist &optional testfn
 This function returns the first association for @var{key} in
 @var{alist}, comparing @var{key} against the alist elements using
address@hidden if non-nil, or @code{equal} if nil (@pxref{Equality
-Predicates}).  It returns @code{nil} if no association in @var{alist}
-has a @sc{car} equal to @var{key}.  For example:
address@hidden if it is address@hidden and @code{equal} otherwise
+(@pxref{Equality Predicates}).  It returns @code{nil} if no
+association in @var{alist} has a @sc{car} equal to @var{key}.  For
+example:
 
 @smallexample
 (setq trees '((pine . cones) (oak . acorns) (maple . seeds)))
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index bd94aea..1a601ba 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -314,6 +314,11 @@ Data}, for other possible forms).  The name of the mode 
appears
 in the mode line.
 
 @item
+Calling the major mode command twice in direct succession should not
+fail and should do the same thing as calling the command only once.
+In other words, the major mode command should be idempotent.
+
address@hidden
 @cindex functions in modes
 Since all global names are in the same name space, all the global
 variables, constants, and functions that are part of the mode should
@@ -1412,6 +1417,10 @@ a minor mode in a mode hook is a little uglier:
 @noindent
 However, this is not very commonly done.
 
+  Enabling or disabling a minor mode twice in direct succession should
+not fail and should do the same thing as enabling or disabling it only
+once.  In other words, the minor mode command should be idempotent.
+
 @item
 Add an element to @code{minor-mode-alist} for each minor mode
 (@pxref{Definition of minor-mode-alist}), if you want to indicate the
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi
index 7cc36f1..cae0f31 100644
--- a/doc/lispref/records.texi
+++ b/doc/lispref/records.texi
@@ -5,7 +5,7 @@
 @c See the file elisp.texi for copying conditions.
 @node Records
 @chapter Records
address@hidden record
address@hidden records
 
   The purpose of records is to allow programmers to create objects
 with new types that are not built into Emacs.  They are used as the
@@ -28,6 +28,13 @@ type descriptor, the symbol naming its type will be returned;
 list specifying the contents.  The first list element must be the
 record type.  The following elements are the record slots.
 
+  To avoid conflicts with other type names, Lisp programs that define
+new types of records should normally use the naming conventions of the
+package where these record types are introduced for the names of the
+types.  Note that the names of the types which could possibly conflict
+might not be known at the time the package defining a record type is
+loaded; they could be loaded at some future point in time.
+
   A record is considered a constant for evaluation: the result of
 evaluating it is the same record.  This does not evaluate or even
 examine the slots.  @xref{Self-Evaluating Forms}.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 08ed092..d73b410 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -125,11 +125,13 @@ including for the case where @var{object} is a deleted 
window.
 as @dfn{selected within the frame}.  For the selected frame, that
 window is called the @dfn{selected window}---the one in which most
 editing takes place, and in which the cursor for selected windows
-appears (@pxref{Cursor Parameters}).  The selected window's buffer is
-usually also the current buffer, except when @code{set-buffer} has
-been used (@pxref{Current Buffer}).  As for non-selected frames, the
-window selected within the frame becomes the selected window if the
-frame is ever selected.  @xref{Selecting Windows}.
+appears (@pxref{Cursor Parameters}).  Keyboard input that inserts or
+deletes text is also normally directed to this window.   The selected
+window's buffer is usually also the current buffer, except when
address@hidden has been used (@pxref{Current Buffer}).  As for
+non-selected frames, the window selected within the frame becomes the
+selected window if the frame is ever selected.  @xref{Selecting
+Windows}.
 
 @defun selected-window
 This function returns the selected window (which is always a live
@@ -1726,7 +1728,7 @@ windows.
 
 @defun select-window window &optional norecord
 This function makes @var{window} the selected window and the window
-selected within its frame (@pxref{Basic Windows}) and selects that
+selected within its frame (@pxref{Basic Windows}), and selects that
 frame.  It also makes @var{window}'s buffer (@pxref{Buffers and
 Windows}) current and sets that buffer's value of @code{point} to the
 value of @code{window-point} (@pxref{Window Point}) in @var{window}.
@@ -1743,6 +1745,11 @@ next time.  If @var{norecord} is address@hidden, such 
updates are
 usually not performed.  If, however, @var{norecord} equals the special
 symbol @code{mark-for-redisplay}, the additional actions mentioned above
 are omitted but @var{window} will be nevertheless updated.
+
+Note that sometimes selecting a window is not enough to show it, or
+make its frame the top-most frame on display: you may also need to
+raise the frame or make sure input focus is directed to that frame.
address@hidden Focus}.
 @end defun
 
 @cindex select window hook
@@ -3059,7 +3066,7 @@ This function handles @var{window} and its buffer after 
quitting.  The
 optional argument @var{window} must be a live window and defaults to
 the selected one. The function's behavior is determined by the four
 elements of the @code{quit-restore} window parameter (@pxref{Window
-Parameters}), which is set to nil afterwards.
+Parameters}), which is set to @code{nil} afterwards.
 
 The window is deleted entirely if: 1) the first element of the
 @code{quit-restore} parameter is one of 'window or 'frame, 2) the
@@ -3126,7 +3133,7 @@ possible to set it manually, using the following code for 
displaying
 @end group
 @end example
 
-Setting the window history to nil ensures that a future call to
+Setting the window history to @code{nil} ensures that a future call to
 @code{quit-window} can delete the window altogether.
 
 @end defun
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index d751add..692c28a 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -256,15 +256,19 @@ whether the output buffer of an asynchronous command is 
shown
 immediately, or only when there is output.
 
 +++
-** The new user option 'mouse-select-region-move-to-beginning'
-controls the position of point when double-clicking mouse-1 on the end
-of a parenthetical grouping or string-delimiter: the default value nil
-keeps point at the end of the region, setting it to non-nil moves
-point to the beginning of the region.
+** New user option 'mouse-select-region-move-to-beginning'.
+This option controls the position of point when double-clicking
+mouse-1 on the end of a parenthetical grouping or string-delimiter:
+the default value nil keeps point at the end of the region, setting it
+to non-nil moves point to the beginning of the region.
 
 +++
-** The new user option 'mouse-drag-and-drop-region' allows to drag the
-entire region of text to another place or another buffer.
+** New user option 'mouse-drag-and-drop-region'.
+This option allows to drag the entire region of text to another place
+or another buffer.  Its behavior is customizable via the new options
+'mouse-drag-and-drop-region-cut-when-buffers-differ',
+'mouse-drag-and-drop-region-show-tooltip', and
+'mouse-drag-and-drop-region-show-cursor'.
 
 +++
 ** The new user option 'confirm-kill-processes' allows the user to
@@ -1485,6 +1489,19 @@ passing '&optional' multiple times:
 Previously, Emacs would just ignore the extra keyword, or give
 incorrect results in certain cases.
 
+---
+** The pinentry.el library has been removed.
+That package (and the corresponding change in GnuPG and pinentry)
+was intended to provide a way to input passphrase through Emacs with
+GnuPG 2.0.  However, the change to support that was only implemented
+in GnuPG >= 2.1 and didn't get backported to GnuPG 2.0.  And with
+GnuPG 2.1 and later, pinentry.el is not needed at all.  So the
+library was useless, and we removed it.  GnuPG 2.0 is no longer
+supported by the upstream project.
+
+To adapt to the change, you may need to set 'epa-pinentry-mode' to the
+symbol 'loopback'.
+
 
 * Lisp Changes in Emacs 26.1
 
@@ -1567,6 +1584,10 @@ functions 'make-record', 'record', and 'recordp'.  
Records are now
 used internally to represent cl-defstruct and defclass instances, for
 example.
 
+If your program defines new record types, you should use
+package-naming conventions for naming those types.  This is so any
+potential conflicts with other types are avoided.
+
 +++
 ** 'save-some-buffers' now uses 'save-some-buffers-default-predicate'
 to decide which buffers to ask about, if the PRED argument is nil.
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 625c3ae..7ca29bd 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -252,7 +252,7 @@ Completion options are calculated with 
`semantic-analyze-possible-completions'."
 ;;;###autoload
 (defun semantic-ia-show-variants (point)
   "Display a list of all variants for the symbol under POINT."
-  (interactive "P")
+  (interactive "d")
   (let* ((ctxt (semantic-analyze-current-context point))
         (comp nil))
 
diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el
index ff27158..b9f63c9 100644
--- a/lisp/emacs-lisp/inline.el
+++ b/lisp/emacs-lisp/inline.el
@@ -124,6 +124,10 @@ After VARS is handled, BODY is evaluated in the new 
environment."
 
 ;;;###autoload
 (defmacro define-inline (name args &rest body)
+  "Define an inline function NAME with arguments ARGS and body in BODY.
+
+This is like `defmacro', but has several advantages.
+See Info node `(elisp)Defining Functions' for more details."
   ;; FIXME: How can this work with CL arglists?
   (declare (indent defun) (debug defun) (doc-string 3))
   (let ((doc (if (stringp (car-safe body)) (list (pop body))))
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index d82f741..0c39f62 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -366,9 +366,7 @@ Proceeds from `י' to `כ', from `צ' to `ק'. After `ת', rolls 
over to `א'."
   "Styles of footnote tags available.
 By default, Arabic numbers, English letters, Roman Numerals,
 Latin and Unicode superscript characters, and Hebrew numerals
-are available.
-See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more
-exciting styles.")
+are available.")
 
 (defcustom footnote-style 'numeric
   "Default style used for footnoting.
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 973d97c..e837ce1 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1414,59 +1414,6 @@ with value CHAR in the region [FROM to)."
 
 ;;;;;;;;;;;;;;;
 
-(defconst c-cpp-delimiter '(14)) ; generic comment syntax
-;; This is the value of the `category' text property placed on every #
-;; which introduces a CPP construct and every EOL (or EOB, or character
-;; preceding //, etc.) which terminates it.  We can instantly "comment
-;; out" all CPP constructs by giving `c-cpp-delimiter' a syntax-table
-;; property '(14) (generic comment delimiter).
-(defmacro c-set-cpp-delimiters (beg end)
-  ;; This macro does a hidden buffer change.
-  `(progn
-     (c-put-char-property ,beg 'category 'c-cpp-delimiter)
-     (if (< ,end (point-max))
-        (c-put-char-property ,end 'category 'c-cpp-delimiter))))
-(defmacro c-clear-cpp-delimiters (beg end)
-  ;; This macro does a hidden buffer change.
-  `(progn
-     (c-clear-char-property ,beg 'category)
-     (if (< ,end (point-max))
-        (c-clear-char-property ,end 'category))))
-
-(defsubst c-comment-out-cpps ()
-  ;; Render all preprocessor constructs syntactically commented out.
-  (put 'c-cpp-delimiter 'syntax-table c-cpp-delimiter))
-(defsubst c-uncomment-out-cpps ()
-  ;; Restore the syntactic visibility of preprocessor constructs.
-  (put 'c-cpp-delimiter 'syntax-table nil))
-
-(defmacro c-with-cpps-commented-out (&rest forms)
-  ;; Execute FORMS... whilst the syntactic effect of all characters in
-  ;; all CPP regions is suppressed.  In particular, this is to suppress
-  ;; the syntactic significance of parens/braces/brackets to functions
-  ;; such as `scan-lists' and `parse-partial-sexp'.
-  `(unwind-protect
-       (c-save-buffer-state ()
-          (c-comment-out-cpps)
-          ,@forms)
-     (c-save-buffer-state ()
-       (c-uncomment-out-cpps))))
-
-(defmacro c-with-all-but-one-cpps-commented-out (beg end &rest forms)
-  ;; Execute FORMS... whilst the syntactic effect of all characters in
-  ;; every CPP region APART FROM THE ONE BETWEEN BEG and END is
-  ;; suppressed.
-  `(unwind-protect
-       (c-save-buffer-state ()
-        (save-restriction
-          (widen)
-          (c-clear-cpp-delimiters ,beg ,end))
-        ,`(c-with-cpps-commented-out ,@forms))
-     (c-save-buffer-state ()
-       (save-restriction
-        (widen)
-        (c-set-cpp-delimiters ,beg ,end)))))
-
 (defmacro c-self-bind-state-cache (&rest forms)
   ;; Bind the state cache to itself and execute the FORMS.  Return the result
   ;; of the last FORM executed.  It is assumed that no buffer changes will
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 12ec8f7..7b9baee 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -238,8 +238,8 @@
 ;; `c-macro-cache'.
 (defvar c-macro-cache-no-comment nil)
 (make-variable-buffer-local 'c-macro-cache-no-comment)
-;; Either nil, or the last character of the macro currently represented by
-;; `c-macro-cache' which isn't in a comment. */
+;; Either nil, or the position of a comment which is open at the end of the
+;; macro represented by `c-macro-cache'.
 
 (defun c-invalidate-macro-cache (beg _end)
   ;; Called from a before-change function.  If the change region is before or
@@ -382,8 +382,9 @@ comment at the start of cc-engine.el for more info."
     (point)))
 
 (defun c-no-comment-end-of-macro ()
-  ;; Go to the end of a CPP directive, or a pos just before which isn't in a
-  ;; comment.  For this purpose, open strings are ignored.
+  ;; Go to the start of the comment which is open at the end of the current
+  ;; CPP directive, or to the end of that directive.  For this purpose, open
+  ;; strings are ignored.
   ;;
   ;; This function must only be called from the beginning of a CPP construct.
   ;;
@@ -401,7 +402,7 @@ comment at the start of cc-engine.el for more info."
        (setq s (parse-partial-sexp here there)))
       (when (and (nth 4 s)
                 (not (eq (nth 7 s) 'syntax-table))) ; no pseudo comments.
-       (goto-char (1- (nth 8 s))))
+       (goto-char (nth 8 s)))
       (setq c-macro-cache-no-comment (point)))
     (point)))
 
@@ -3862,14 +3863,7 @@ comment at the start of cc-engine.el for more info."
   (if (eval-when-compile (memq 'category-properties c-emacs-features))
       ;; Emacs
       (c-with-<->-as-parens-suppressed
-       (if (and c-state-old-cpp-beg
-               (< c-state-old-cpp-beg here))
-          (c-with-all-but-one-cpps-commented-out
-           c-state-old-cpp-beg
-           c-state-old-cpp-end
-           (c-invalidate-state-cache-1 here))
-        (c-with-cpps-commented-out
-         (c-invalidate-state-cache-1 here))))
+       (c-invalidate-state-cache-1 here))
     ;; XEmacs
     (c-invalidate-state-cache-1 here)))
 
@@ -3902,12 +3896,7 @@ comment at the start of cc-engine.el for more info."
        (if (eval-when-compile (memq 'category-properties c-emacs-features))
            ;; Emacs
            (c-with-<->-as-parens-suppressed
-            (if (and here-cpp-beg (> here-cpp-end here-cpp-beg))
-                (c-with-all-but-one-cpps-commented-out
-                 here-cpp-beg here-cpp-end
-                 (c-parse-state-1))
-              (c-with-cpps-commented-out
-               (c-parse-state-1))))
+            (c-parse-state-1))
          ;; XEmacs
          (c-parse-state-1))
       (setq c-state-old-cpp-beg
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 7b99c2f..83038e0 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -2670,8 +2670,8 @@ need for `pike-font-lock-extra-types'.")
   ;; This function might do hidden buffer changes.
 
   (let (comment-beg region-beg)
-    (if (eq (get-text-property (point) 'face)
-           'font-lock-comment-face)
+    (if (memq (get-text-property (point) 'face)
+             '(font-lock-comment-face font-lock-comment-delimiter-face))
        ;; Handle the case when the fontified region starts inside a
        ;; comment.
        (let ((start (c-literal-start)))
@@ -2691,8 +2691,15 @@ need for `pike-font-lock-extra-types'.")
                     (or (not (c-got-face-at comment-beg
                                             c-literal-faces))
                         (and (/= comment-beg (point-min))
+                             ;; Cheap check which is unreliable (the previous
+                             ;; character could be the end of a previous
+                             ;; comment).
                              (c-got-face-at (1- comment-beg)
-                                            c-literal-faces))))
+                                            c-literal-faces)
+                             ;; Expensive reliable check.
+                             (save-excursion
+                               (goto-char comment-beg)
+                               (c-in-literal)))))
              (setq comment-beg nil))
            (setq region-beg comment-beg))
 
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 169b61c..12a1587 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -518,13 +518,13 @@ parameters \(point-min) and \(point-max).")
   (c objc) '(c-depropertize-new-text
             c-parse-quotes-after-change
             c-extend-font-lock-region-for-macros
-            c-neutralize-syntax-in-and-mark-CPP
+            c-neutralize-syntax-in-CPP
             c-change-expand-fl-region)
   c++ '(c-depropertize-new-text
        c-parse-quotes-after-change
        c-extend-font-lock-region-for-macros
        c-after-change-re-mark-raw-strings
-       c-neutralize-syntax-in-and-mark-CPP
+       c-neutralize-syntax-in-CPP
        c-restore-<>-properties
        c-change-expand-fl-region)
   java '(c-depropertize-new-text
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 22dea03..4073a5a 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1016,15 +1016,10 @@ Note that the style variables are always made local to 
the buffer."
              t)
             (t nil)))))))
 
-(defun c-neutralize-syntax-in-and-mark-CPP (_begg _endd _old-len)
-  ;; (i) "Neutralize" every preprocessor line wholly or partially in the
-  ;; changed region.  "Restore" lines which were CPP lines before the change
-  ;; and are no longer so.
-  ;;
-  ;; (ii) Mark each CPP construct by placing a `category' property value
-  ;; `c-cpp-delimiter' at its start and end.  The marked characters are the
-  ;; opening # and usually the terminating EOL, but sometimes the character
-  ;; before a comment delimiter.
+(defun c-neutralize-syntax-in-CPP (_begg _endd _old-len)
+  ;; "Neutralize" every preprocessor line wholly or partially in the changed
+  ;; region.  "Restore" lines which were CPP lines before the change and are
+  ;; no longer so.
   ;;
   ;; That is, set syntax-table properties on characters that would otherwise
   ;; interact syntactically with those outside the CPP line(s).
@@ -1044,12 +1039,7 @@ Note that the style variables are always made local to 
the buffer."
   (c-save-buffer-state (limits)
     ;; Clear 'syntax-table properties "punctuation":
     ;; (c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table 
'(1))
-
-    ;; CPP "comment" markers:
-    (if (eval-when-compile (memq 'category-properties c-emacs-features));Emacs.
-       (c-clear-char-property-with-value
-        c-new-BEG c-new-END 'category 'c-cpp-delimiter))
-    ;; FIXME!!!  What about the "<" and ">" category properties?  2009-11-16
+    ;; The above is now done in `c-depropertize-CPP'.
 
     ;; Add needed properties to each CPP construct in the region.
     (goto-char c-new-BEG)
@@ -1076,11 +1066,7 @@ Note that the style variables are always made local to 
the buffer."
          (goto-char (match-beginning 1))
          (setq mbeg (point))
          (if (> (c-no-comment-end-of-macro) mbeg)
-             (progn
-               (c-neutralize-CPP-line mbeg (point)) ; "punctuation" properties
-               (if (eval-when-compile
-                      (memq 'category-properties c-emacs-features)) ;Emacs.
-                   (c-set-cpp-delimiters mbeg (point)))) ; "comment" markers
+             (c-neutralize-CPP-line mbeg (point)) ; "punctuation" properties
            (forward-line))           ; no infinite loop with, e.g., "#//"
          )))))
 
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 6a16962..25f62e3 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -712,10 +712,10 @@ Otherwise returns the library directory name, if that is 
defined."
          (error "%s exited with %s %s" ispell-program-name
                 (if (stringp status) "signal" "code") status))
 
-      ;; Get relevant version strings. Only xx.yy.... format works well
+      ;; Get relevant version strings.
       (let (case-fold-search)
        (setq ispell-program-version
-             (and (search-forward-regexp "\\([0-9]+\\.[0-9\\.]+\\)" nil t)
+             (and (search-forward-regexp "\\([0-9]+\\.[0-9.]+\\)" nil t)
                   (match-string 1)))
 
        ;; Make sure these variables are (re-)initialized to the default value
@@ -725,19 +725,23 @@ Otherwise returns the library directory name, if that is 
defined."
 
        (goto-char (point-min))
        (or (setq ispell-really-aspell
-                 (and (search-forward-regexp
-                       "(but really Aspell \\([0-9]+\\.[0-9\\.-]+\\)?)" nil t)
-                      (match-string 1)))
+                 (and
+                   (search-forward-regexp
+                    "(but really Aspell \\([0-9]+\\.[0-9.]+\\([-._+ 
]?[a-zA-Z0-9]+\\)?\\)?)"
+                    nil t)
+                  (match-string 1)))
            (setq ispell-really-hunspell
-                 (and (search-forward-regexp
-                       "(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)"
-                        nil t)
-                      (match-string 1)))
+                 (and
+                   (search-forward-regexp
+                   "(but really Hunspell \\([0-9]+\\.[0-9.]+\\([-._+ 
]?[a-zA-Z0-9]+\\)?\\)?)"
+                    nil t)
+                  (match-string 1)))
             (setq ispell-really-enchant
-                 (and (search-forward-regexp
-                       "(but really Enchant \\([0-9]+\\.[0-9\\.-]+\\)?)"
-                        nil t)
-                      (match-string 1)))))
+                 (and
+                   (search-forward-regexp
+                   "(but really Enchant \\([0-9]+\\.[0-9.]+\\([-._+ 
]?[a-zA-Z0-9]+\\)?\\)?)"
+                    nil t)
+                  (match-string 1)))))
 
       (let* ((aspell8-minver   "0.60")
              (ispell-minver    "3.1.12")
diff --git a/src/xdisp.c b/src/xdisp.c
index efc47b3..7d13338 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20274,12 +20274,14 @@ extend_face_to_end_of_line (struct it *it)
          it->area = LEFT_MARGIN_AREA;
          it->face_id = default_face->id;
          while (it->glyph_row->used[LEFT_MARGIN_AREA]
-                < WINDOW_LEFT_MARGIN_WIDTH (it->w))
+                < WINDOW_LEFT_MARGIN_WIDTH (it->w)
+                && g < it->glyph_row->glyphs[TEXT_AREA])
            {
              PRODUCE_GLYPHS (it);
              /* term.c:produce_glyphs advances it->current_x only for
                 TEXT_AREA.  */
              it->current_x += it->pixel_width;
+             g++;
            }
 
          it->current_x = saved_x;
@@ -20313,10 +20315,12 @@ extend_face_to_end_of_line (struct it *it)
          it->area = RIGHT_MARGIN_AREA;
          it->face_id = default_face->id;
          while (it->glyph_row->used[RIGHT_MARGIN_AREA]
-                < WINDOW_RIGHT_MARGIN_WIDTH (it->w))
+                < WINDOW_RIGHT_MARGIN_WIDTH (it->w)
+                && g < it->glyph_row->glyphs[LAST_AREA])
            {
              PRODUCE_GLYPHS (it);
              it->current_x += it->pixel_width;
+             g++;
            }
 
          it->area = TEXT_AREA;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]