mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
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 windows861d110
Improve documentation of records22b3075
* 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 friendsd60faf3
Improve detection of speller version in ispell.ela0e3b06
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 frames293720e
Fix loss of documentation face in certain CC Mode doc comment... # Conflicts: # etc/NEWS # lisp/mail/footnote.el
This commit is contained in:
commit
3404a87f29
@ -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 non-@code{nil}
|
||||
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
|
||||
non-@code{nil} if the buffer is to be saved). Any other
|
||||
non-@code{nil} value means that all buffers should be saved without
|
||||
asking.
|
||||
|
||||
@findex grep-find
|
||||
@findex find-grep
|
||||
|
@ -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
|
||||
@code{mouse-select-region-move-to-beginning} to non-nil changes this
|
||||
to move point to the beginning of the region, scrolling the display
|
||||
backward if necessary.
|
||||
@code{mouse-select-region-move-to-beginning} to non-@code{nil} 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.
|
||||
|
||||
@vindex 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.
|
||||
|
||||
@vindex 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 non-@code{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}, @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 mouse-drag-and-drop-region-cut-when-buffers-differ
|
||||
@vindex mouse-drag-and-drop-region-show-tooltip
|
||||
@vindex mouse-drag-and-drop-region-show-cursor
|
||||
In order to cut text even when source and destination buffers differ,
|
||||
set the option
|
||||
@code{mouse-drag-and-drop-region-cut-when-buffers-differ} to a
|
||||
non-@code{nil} 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
|
||||
@code{mouse-drag-and-drop-region-show-tooltip} and/or
|
||||
@code{mouse-drag-and-drop-region-show-cursor} to @code{nil}.
|
||||
|
||||
|
||||
@node Menu Bars
|
||||
@section Menu Bars
|
||||
@cindex Menu Bar mode
|
||||
|
@ -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
|
||||
@code{list-matching-lines-default-context-lines}.
|
||||
When @code{list-matching-lines-jump-to-current-line} is non-nil,
|
||||
the current line is shown highlighted with face
|
||||
@code{list-matching-lines-current-line-face} and the point is set
|
||||
at the first match after such line.
|
||||
@code{list-matching-lines-default-context-lines}. When
|
||||
@code{list-matching-lines-jump-to-current-line} is non-@code{nil} the
|
||||
current line is shown highlighted with face
|
||||
@code{list-matching-lines-current-line-face} 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.
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
non-@code{nil}, error messages will be signaled as Lisp errors instead
|
||||
(@pxref{Errors}).
|
||||
|
||||
@cindex macro compilation
|
||||
|
@ -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})
|
||||
|
@ -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.
|
||||
@code{nil} or a function named @code{symbol@@name}. See
|
||||
@code{advice-add} for explanation of other arguments.
|
||||
@end defmac
|
||||
|
||||
@defun advice-add symbol where function &optional props
|
||||
|
@ -988,8 +988,9 @@ function is called with no arguments, prior to running each command,
|
||||
while @var{keymap} is active; it should return non-@code{nil} 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 non-@code{nil}, 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
|
||||
|
@ -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
|
||||
@var{testfn} 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:
|
||||
@var{testfn} if it is non-@code{nil} 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)))
|
||||
|
@ -313,6 +313,11 @@ The major mode command should set the variable @code{mode-name} to the
|
||||
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.
|
||||
|
||||
@item
|
||||
@cindex functions in modes
|
||||
Since all global names are in the same name space, all the global
|
||||
@ -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
|
||||
|
@ -5,7 +5,7 @@
|
||||
@c See the file elisp.texi for copying conditions.
|
||||
@node Records
|
||||
@chapter Records
|
||||
@cindex record
|
||||
@cindex 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}.
|
||||
|
@ -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
|
||||
@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}.
|
||||
|
||||
@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 non-@code{nil}, 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.
|
||||
@xref{Input 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
|
||||
|
35
etc/NEWS.26
35
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.
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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))))
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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
|
||||
|
@ -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., "#//"
|
||||
)))))
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user