mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Merge from origin/emacs-26
71be806; * etc/DEBUG: Minor clarification.4403f89Update the Emacs FAQ40b3317* etc/DEBUG: Minor copyedits.850ff18Clarify wording of NS drag n drop documentation343d70b1Improve kill-related documentation (bug#31209)0b43224* lisp/simple.el (region-extract-function): Don't hide the 'n...d6e2c59Fix pre- and post-command-hook errors in term.el6cf83131e* doc/lispref/display.texi (Glyphless Chars): Fix grammar.88d178cFix macOS drag n drop event documentation
This commit is contained in:
commit
62032f699a
8 changed files with 145 additions and 68 deletions
|
|
@ -99,6 +99,10 @@ significant changes and new features in the upcoming release, then
|
|||
describe the "benefits" from losing those features. Be funny, use
|
||||
humor. The text written for the previous releases can serve as an example.
|
||||
|
||||
The Emacs FAQ (doc/misc/efaq.texi) also has a "What's new" section;
|
||||
for major releases a new section should be added listing the
|
||||
significant changes.
|
||||
|
||||
Check cross-references between the manuals (e.g. from emacs to elisp)
|
||||
are correct. You can use something like the following in the info
|
||||
directory in the Emacs build tree:
|
||||
|
|
|
|||
|
|
@ -107,30 +107,16 @@ Nextstep port. For example, they affect things such as the modifier
|
|||
keys and the fullscreen behavior. To see all such options, use
|
||||
@kbd{M-x customize-group @key{RET} ns @key{RET}}.
|
||||
|
||||
@subsection Font and Color Panels
|
||||
@subsection Font Panel
|
||||
|
||||
@findex ns-popup-font-panel
|
||||
The standard Mac / GNUstep font and color panels are accessible via
|
||||
Lisp commands. The Font Panel may be accessed with @kbd{M-x
|
||||
ns-popup-font-panel}. It will set the default font in the frame most
|
||||
The standard Mac / GNUstep font panel is accessible with @kbd{M-x
|
||||
ns-popup-font-panel} and will set the default font in the frame most
|
||||
recently used or clicked on.
|
||||
|
||||
@c To make the setting permanent, use @samp{Save Options} in the
|
||||
@c Options menu, or run @code{menu-bar-options-save}.
|
||||
|
||||
@findex ns-popup-color-panel
|
||||
You can bring up a color panel with @kbd{M-x ns-popup-color-panel} and
|
||||
drag the color you want over the Emacs face you want to change. Normal
|
||||
dragging will alter the foreground color. Shift dragging will alter the
|
||||
background color. To discard the settings, create a new frame and
|
||||
close the altered one.
|
||||
|
||||
@c To make the changes permanent select the "Save Options"
|
||||
@c item in the "Options" menu, or run @code{menu-bar-options-save}.
|
||||
|
||||
Useful in this context is the listing of all faces obtained by
|
||||
@kbd{M-x list-faces-display}.
|
||||
|
||||
@cindex Core Text, on macOS
|
||||
@cindex font backend, on macOS
|
||||
In macOS, Emacs uses a Core Text based font backend
|
||||
|
|
@ -180,21 +166,12 @@ particular file, but also a particular line or sequence of lines in
|
|||
the file. Emacs handles this by visiting that file and highlighting
|
||||
the requested line (@code{ns-open-file-select-line}).
|
||||
|
||||
@item ns-drag-file
|
||||
This event occurs when a user drags files from another application
|
||||
into an Emacs frame. The default behavior is to insert the contents
|
||||
of all the dragged files into the current buffer
|
||||
(@code{ns-insert-files}). The list of dragged files is stored in the
|
||||
variable @code{ns-input-file}.
|
||||
|
||||
@item ns-drag-color
|
||||
This event occurs when a user drags a color from the color well (or
|
||||
some other source) into an Emacs frame. The default behavior is to
|
||||
alter the foreground color of the area the color was dragged onto
|
||||
(@code{ns-set-foreground-at-mouse}). If this event is issued with a
|
||||
@key{Shift} modifier, Emacs changes the background color instead
|
||||
(@code{ns-set-background-at-mouse}). The name of the dragged color is
|
||||
stored in the variable @code{ns-input-color}.
|
||||
@item ns-drag-n-drop
|
||||
This event occurs when a user drags an object from another application
|
||||
into an Emacs frame. The default behavior is to open a file in the
|
||||
window under the mouse, or to insert text at point of the window under
|
||||
the mouse. It may sometimes be necessary to use the @key{META} key in
|
||||
conjunction with dragging to force text insertion.
|
||||
|
||||
@item ns-change-font
|
||||
This event occurs when the user selects a font in a Nextstep font
|
||||
|
|
|
|||
|
|
@ -7235,8 +7235,8 @@ Characters of Unicode General Category [Cf], such as @samp{U+200E}
|
|||
images, such as @samp{U+00AD} (Soft Hyphen).
|
||||
|
||||
@item no-font
|
||||
Characters for there is no suitable font, or which cannot be encoded
|
||||
by the terminal's coding system.
|
||||
Characters for which there is no suitable font, or which cannot be
|
||||
encoded by the terminal's coding system.
|
||||
@end table
|
||||
|
||||
@c FIXME: this can also be 'acronym', but that's not currently
|
||||
|
|
|
|||
|
|
@ -1143,7 +1143,7 @@ If @var{n} is zero, indicating a request for the latest kill,
|
|||
@code{current-kill} calls the value of
|
||||
@code{interprogram-paste-function} (documented below) before
|
||||
consulting the kill ring. If that value is a function and calling it
|
||||
returns a string or a list of several string, @code{current-kill}
|
||||
returns a string or a list of several strings, @code{current-kill}
|
||||
pushes the strings onto the kill ring and returns the first string.
|
||||
It also sets the yanking pointer to point to the kill-ring entry of
|
||||
the first string returned by @code{interprogram-paste-function},
|
||||
|
|
@ -1156,8 +1156,10 @@ move the yanking pointer.
|
|||
@defun kill-new string &optional replace
|
||||
This function pushes the text @var{string} onto the kill ring and
|
||||
makes the yanking pointer point to it. It discards the oldest entry
|
||||
if appropriate. It also invokes the value of
|
||||
@code{interprogram-cut-function} (see below).
|
||||
if appropriate. It also invokes the values of
|
||||
@code{interprogram-paste-function} (subject to
|
||||
the user option @code{save-interprogram-paste-before-kill})
|
||||
and @code{interprogram-cut-function} (see below).
|
||||
|
||||
If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the
|
||||
first element of the kill ring with @var{string}, rather than pushing
|
||||
|
|
@ -1169,8 +1171,10 @@ This function appends the text @var{string} to the first entry in the
|
|||
kill ring and makes the yanking pointer point to the combined entry.
|
||||
Normally @var{string} goes at the end of the entry, but if
|
||||
@var{before-p} is non-@code{nil}, it goes at the beginning. This
|
||||
function also invokes the value of @code{interprogram-cut-function}
|
||||
(see below).
|
||||
function calls @code{kill-new} as a subroutine, thus causing the
|
||||
values of @code{interprogram-cut-function} and possibly
|
||||
@code{interprogram-paste-function} (see below) to be invoked by
|
||||
extension.
|
||||
@end defun
|
||||
|
||||
@defvar interprogram-paste-function
|
||||
|
|
|
|||
|
|
@ -930,6 +930,7 @@ status of its latest version.
|
|||
@menu
|
||||
* Origin of the term Emacs::
|
||||
* Latest version of Emacs::
|
||||
* New in Emacs 26::
|
||||
* New in Emacs 25::
|
||||
* New in Emacs 24::
|
||||
* New in Emacs 23::
|
||||
|
|
@ -979,7 +980,7 @@ conventions}).
|
|||
Emacs @value{EMACSVER} is the current version as of this writing. A version
|
||||
number with two components (e.g., @samp{24.5}) indicates a released
|
||||
version; three components indicate a development
|
||||
version (e.g., @samp{26.0.50} is what will eventually become @samp{26.1}).
|
||||
version (e.g., @samp{27.0.50} is what will eventually become @samp{27.1}).
|
||||
|
||||
Emacs is under active development, hosted at
|
||||
@uref{https://savannah.gnu.org/projects/emacs/, Savannah}.
|
||||
|
|
@ -998,6 +999,80 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). As of Emacs 22,
|
|||
you can give this command a prefix argument to read about which features
|
||||
were new in older versions.
|
||||
|
||||
@node New in Emacs 26
|
||||
@section What is different about Emacs 26?
|
||||
@cindex Differences between Emacs 25 and Emacs 26
|
||||
@cindex Emacs 26, new features in
|
||||
|
||||
@itemize
|
||||
@cindex threads
|
||||
@item
|
||||
Emacs now provides a limited form of concurrency with Lisp threads.
|
||||
|
||||
@cindex systemd support
|
||||
@item
|
||||
Emacs now supports @code{systemd}. The new command-line option
|
||||
@option{--fg-daemon} is part of this support, it causes Emacs to run
|
||||
in the foreground instead of forking, as under @option{--daemon}.
|
||||
|
||||
@item
|
||||
Emacs now supports 24-bit true color on text terminals which provide
|
||||
that feature. @xref{Colors on a TTY}.
|
||||
|
||||
@cindex double-buffering
|
||||
@item
|
||||
Emacs on X now supports double-buffering, which eliminates display
|
||||
flickering in most situations.
|
||||
|
||||
@item
|
||||
You can now scroll the Emacs display horizontally using the mouse or
|
||||
touchpad.
|
||||
|
||||
@cindex line number display
|
||||
@item
|
||||
Emacs display now includes an optional feature for display of line
|
||||
numbers via the @code{display-line-numbers-mode} command. This
|
||||
feature is much faster than the equivalent display offered by packages
|
||||
such as @code{linum}, and also provides many optional features like
|
||||
relative line numbers.
|
||||
|
||||
@cindex horizontal scrolling of current line
|
||||
@item
|
||||
The automatic horizontal scrolling of the window display when lines
|
||||
are truncated can now optionally be enabled only for the current line,
|
||||
the line where Emacs shows the cursor. Under this mode, all the other
|
||||
window lines are not scrolled to show characters outside of the
|
||||
viewport.
|
||||
|
||||
@item
|
||||
Letter-case conversions now honor special cases in Turkish and Greek
|
||||
scripts.
|
||||
|
||||
@cindex Enchant support
|
||||
@item
|
||||
Support for Enchant is now part of the Emacs spell-checking commands.
|
||||
|
||||
@item
|
||||
Tramp now supports Google Drive filesystems.
|
||||
|
||||
@item
|
||||
Emacs can now be built while omitting the details of the machine on
|
||||
which it was built, thus making it easier to produce reproducible
|
||||
builds.
|
||||
|
||||
@item
|
||||
Security vulnerability related to Enriched Text mode is removed.
|
||||
Enriched mode previously allowed saving @code{display} properties as
|
||||
part of text; those properties support evaluating arbitrary Lisp code,
|
||||
which opens a vulnerability for Emacs users receiving Enriched Text
|
||||
from external sources. Execution of arbitrary Lisp forms in
|
||||
@code{display} properties decoded by Enriched Text mode is now
|
||||
disabled by default.
|
||||
@end itemize
|
||||
|
||||
Consult the Emacs @file{NEWS} file (@kbd{C-h n}) for the full list of
|
||||
changes in Emacs 26.
|
||||
|
||||
@node New in Emacs 25
|
||||
@section What is different about Emacs 25?
|
||||
@cindex Differences between Emacs 24 and Emacs 25
|
||||
|
|
|
|||
23
etc/DEBUG
23
etc/DEBUG
|
|
@ -43,6 +43,11 @@ created in the 'src' directory.
|
|||
|
||||
*** Configuring GDB
|
||||
|
||||
To start GDB to debug Emacs, you can simply type "gdb ./emacs RET" at
|
||||
the shell prompt (assuming you do that from the directory of the Emacs
|
||||
executable, usually the 'src' sub-directory of the Emacs tree).
|
||||
However, we recommend starting GDB from Emacs, see below.
|
||||
|
||||
When you debug Emacs with GDB, you should start GDB in the directory
|
||||
where the Emacs executable was made (the 'src' directory in the Emacs
|
||||
source tree). That directory has a .gdbinit file that defines various
|
||||
|
|
@ -52,16 +57,19 @@ Emacs Redisplay problems".)
|
|||
|
||||
Starting the debugger from Emacs, via the "M-x gdb" command (described
|
||||
below), when the current buffer visits one of the Emacs C source files
|
||||
will automatically start GDB in the 'src' directory.
|
||||
will automatically start GDB in the 'src' directory. If you invoke
|
||||
"M-x gdb" from a buffer whose default directory is different, such as
|
||||
from the "*scratch*" buffer, you can change the default directory with
|
||||
the "M-x cd" command before starting the debugger.
|
||||
|
||||
Some GDB versions by default do not automatically load .gdbinit files
|
||||
in the directory where you invoke GDB. With those versions of GDB,
|
||||
you will see a warning when GDB starts, like this:
|
||||
Recent GDB versions by default do not automatically load .gdbinit
|
||||
files in the directory where you invoke GDB. With those versions of
|
||||
GDB, you will see a warning when GDB starts, like this:
|
||||
|
||||
warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
|
||||
|
||||
The simplest way to fix this is to add the following line to your
|
||||
~/.gdbinit file:
|
||||
~/.gdbinit file (creating such a file if it doesn't already exist):
|
||||
|
||||
add-auto-load-safe-path /path/to/emacs/src/.gdbinit
|
||||
|
||||
|
|
@ -133,9 +141,12 @@ to the debugger".
|
|||
|
||||
You are now ready to start your debugging session.
|
||||
|
||||
*** Running Emacs from GDB
|
||||
|
||||
If you are starting a new Emacs session, type "run", followed by any
|
||||
command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and
|
||||
press RET.
|
||||
press RET. If you ran GDB outside of Emacs, type "run" followed by
|
||||
the command-line arguments at the GDB prompt instead.
|
||||
|
||||
If you attached the debugger to a running Emacs, type "continue" into
|
||||
the *gud-emacs* buffer and press RET.
|
||||
|
|
|
|||
|
|
@ -1067,14 +1067,14 @@ instead of deleted."
|
|||
(t
|
||||
(filter-buffer-substring (region-beginning) (region-end) method)))))
|
||||
"Function to get the region's content.
|
||||
Called with one argument METHOD.
|
||||
If METHOD is `delete-only', then delete the region; the return value
|
||||
is undefined. If METHOD is nil, then return the content as a string.
|
||||
If METHOD is `bounds', then return the boundaries of the region
|
||||
as a list of cons cells of the form (START . END).
|
||||
If METHOD is anything else, delete the region and return its content
|
||||
as a string, after filtering it with `filter-buffer-substring', which
|
||||
is called with METHOD as its 3rd argument.")
|
||||
Called with one argument METHOD which can be:
|
||||
- nil: return the content as a string.
|
||||
- `delete-only': delete the region; the return value is undefined.
|
||||
- `bounds': return the boundaries of the region as a list of cons
|
||||
cells of the form (START . END).
|
||||
- anything else: delete the region and return its content
|
||||
as a string, after filtering it with `filter-buffer-substring', which
|
||||
is called with METHOD as its 3rd argument.")
|
||||
|
||||
(defvar region-insert-function
|
||||
(lambda (lines)
|
||||
|
|
@ -4355,12 +4355,11 @@ ring directly.")
|
|||
"The tail of the kill ring whose car is the last thing yanked.")
|
||||
|
||||
(defcustom save-interprogram-paste-before-kill nil
|
||||
"Save clipboard strings into kill ring before replacing them.
|
||||
When one selects something in another program to paste it into Emacs,
|
||||
but kills something in Emacs before actually pasting it,
|
||||
this selection is gone unless this variable is non-nil,
|
||||
in which case the other program's selection is saved in the `kill-ring'
|
||||
before the Emacs kill and one can still paste it using \\[yank] \\[yank-pop]."
|
||||
"Save existing clipboard text into kill ring before replacing it.
|
||||
A non-nil value ensures that Emacs kill operations do not
|
||||
irrevocably overwrite existing clipboard text by saving it to the
|
||||
`kill-ring' prior to the kill. Such text can subsequently be
|
||||
retrieved via \\[yank] \\[yank-pop]]."
|
||||
:type 'boolean
|
||||
:group 'killing
|
||||
:version "23.2")
|
||||
|
|
@ -4380,7 +4379,7 @@ Optional second argument REPLACE non-nil means that STRING will replace
|
|||
the front of the kill ring, rather than being added to the list.
|
||||
|
||||
When `save-interprogram-paste-before-kill' and `interprogram-paste-function'
|
||||
are non-nil, saves the interprogram paste string(s) into `kill-ring' before
|
||||
are non-nil, save the interprogram paste string(s) into `kill-ring' before
|
||||
STRING.
|
||||
|
||||
When the yank handler has a non-nil PARAM element, the original STRING
|
||||
|
|
@ -4416,20 +4415,24 @@ argument should still be a \"useful\" string for such uses."
|
|||
(if interprogram-cut-function
|
||||
(funcall interprogram-cut-function string)))
|
||||
|
||||
;; It has been argued that this should work similar to `self-insert-command'
|
||||
;; which merges insertions in undo-list in groups of 20 (hard-coded in cmds.c).
|
||||
;; It has been argued that this should work like `self-insert-command'
|
||||
;; which merges insertions in `buffer-undo-list' in groups of 20
|
||||
;; (hard-coded in `undo-auto-amalgamate').
|
||||
(defcustom kill-append-merge-undo nil
|
||||
"Whether appending to kill ring also makes \\[undo] restore both pieces of text simultaneously."
|
||||
"Amalgamate appending kills with the last kill for undo.
|
||||
When non-nil, appending or prepending text to the last kill makes
|
||||
\\[undo] restore both pieces of text simultaneously."
|
||||
:type 'boolean
|
||||
:group 'killing
|
||||
:version "25.1")
|
||||
|
||||
(defun kill-append (string before-p)
|
||||
"Append STRING to the end of the latest kill in the kill ring.
|
||||
If BEFORE-P is non-nil, prepend STRING to the kill.
|
||||
Also removes the last undo boundary in the current buffer,
|
||||
depending on `kill-append-merge-undo'.
|
||||
If `interprogram-cut-function' is set, pass the resulting kill to it."
|
||||
If BEFORE-P is non-nil, prepend STRING to the kill instead.
|
||||
If `interprogram-cut-function' is non-nil, call it with the
|
||||
resulting kill.
|
||||
If `kill-append-merge-undo' is non-nil, remove the last undo
|
||||
boundary in the current buffer."
|
||||
(let* ((cur (car kill-ring)))
|
||||
(kill-new (if before-p (concat string cur) (concat cur string))
|
||||
(or (= (length cur) 0)
|
||||
|
|
|
|||
|
|
@ -1456,6 +1456,9 @@ The main purpose is to get rid of the local keymap."
|
|||
(let ((buffer-read-only nil)
|
||||
(omax (point-max))
|
||||
(opoint (point)))
|
||||
;; Remove hooks to avoid errors due to dead process.
|
||||
(remove-hook 'pre-command-hook #'term-set-goto-process-mark t)
|
||||
(remove-hook 'post-command-hook #'term-goto-process-mark-maybe t)
|
||||
;; Record where we put the message, so we can ignore it
|
||||
;; later on.
|
||||
(goto-char omax)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue