diff options
| author | Glenn Morris | 2018-05-01 07:50:48 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-05-01 07:50:48 -0700 |
| commit | 62032f699a4969ffacd9b8ea9dccd3ce6b10051f (patch) | |
| tree | 357983c747ff7af985339027113adbc942f0edcd | |
| parent | b3b4697ff8b9093cef2cc3842dab731f37c9e2e1 (diff) | |
| parent | 71be806d01c4e135f067bc842a9d684e594b4f35 (diff) | |
| download | emacs-62032f699a4969ffacd9b8ea9dccd3ce6b10051f.tar.gz emacs-62032f699a4969ffacd9b8ea9dccd3ce6b10051f.zip | |
Merge from origin/emacs-26
71be806 ; * etc/DEBUG: Minor clarification.
4403f89 Update the Emacs FAQ
40b3317 * etc/DEBUG: Minor copyedits.
850ff18 Clarify wording of NS drag n drop documentation
343d70b1 Improve kill-related documentation (bug#31209)
0b43224 * lisp/simple.el (region-extract-function): Don't hide the 'n...
d6e2c59 Fix pre- and post-command-hook errors in term.el
6cf83131e * doc/lispref/display.texi (Glyphless Chars): Fix grammar.
88d178c Fix macOS drag n drop event documentation
| -rw-r--r-- | admin/release-process | 4 | ||||
| -rw-r--r-- | doc/emacs/macos.texi | 41 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 14 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 77 | ||||
| -rw-r--r-- | etc/DEBUG | 23 | ||||
| -rw-r--r-- | lisp/simple.el | 47 | ||||
| -rw-r--r-- | lisp/term.el | 3 |
8 files changed, 145 insertions, 68 deletions
diff --git a/admin/release-process b/admin/release-process index 3bb72b9735c..71ada82356c 100644 --- a/admin/release-process +++ b/admin/release-process | |||
| @@ -99,6 +99,10 @@ significant changes and new features in the upcoming release, then | |||
| 99 | describe the "benefits" from losing those features. Be funny, use | 99 | describe the "benefits" from losing those features. Be funny, use |
| 100 | humor. The text written for the previous releases can serve as an example. | 100 | humor. The text written for the previous releases can serve as an example. |
| 101 | 101 | ||
| 102 | The Emacs FAQ (doc/misc/efaq.texi) also has a "What's new" section; | ||
| 103 | for major releases a new section should be added listing the | ||
| 104 | significant changes. | ||
| 105 | |||
| 102 | Check cross-references between the manuals (e.g. from emacs to elisp) | 106 | Check cross-references between the manuals (e.g. from emacs to elisp) |
| 103 | are correct. You can use something like the following in the info | 107 | are correct. You can use something like the following in the info |
| 104 | directory in the Emacs build tree: | 108 | directory in the Emacs build tree: |
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index ef2e9448902..cfb63fe1d8c 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi | |||
| @@ -107,30 +107,16 @@ Nextstep port. For example, they affect things such as the modifier | |||
| 107 | keys and the fullscreen behavior. To see all such options, use | 107 | keys and the fullscreen behavior. To see all such options, use |
| 108 | @kbd{M-x customize-group @key{RET} ns @key{RET}}. | 108 | @kbd{M-x customize-group @key{RET} ns @key{RET}}. |
| 109 | 109 | ||
| 110 | @subsection Font and Color Panels | 110 | @subsection Font Panel |
| 111 | 111 | ||
| 112 | @findex ns-popup-font-panel | 112 | @findex ns-popup-font-panel |
| 113 | The standard Mac / GNUstep font and color panels are accessible via | 113 | The standard Mac / GNUstep font panel is accessible with @kbd{M-x |
| 114 | Lisp commands. The Font Panel may be accessed with @kbd{M-x | 114 | ns-popup-font-panel} and will set the default font in the frame most |
| 115 | ns-popup-font-panel}. It will set the default font in the frame most | ||
| 116 | recently used or clicked on. | 115 | recently used or clicked on. |
| 117 | 116 | ||
| 118 | @c To make the setting permanent, use @samp{Save Options} in the | 117 | @c To make the setting permanent, use @samp{Save Options} in the |
| 119 | @c Options menu, or run @code{menu-bar-options-save}. | 118 | @c Options menu, or run @code{menu-bar-options-save}. |
| 120 | 119 | ||
| 121 | @findex ns-popup-color-panel | ||
| 122 | You can bring up a color panel with @kbd{M-x ns-popup-color-panel} and | ||
| 123 | drag the color you want over the Emacs face you want to change. Normal | ||
| 124 | dragging will alter the foreground color. Shift dragging will alter the | ||
| 125 | background color. To discard the settings, create a new frame and | ||
| 126 | close the altered one. | ||
| 127 | |||
| 128 | @c To make the changes permanent select the "Save Options" | ||
| 129 | @c item in the "Options" menu, or run @code{menu-bar-options-save}. | ||
| 130 | |||
| 131 | Useful in this context is the listing of all faces obtained by | ||
| 132 | @kbd{M-x list-faces-display}. | ||
| 133 | |||
| 134 | @cindex Core Text, on macOS | 120 | @cindex Core Text, on macOS |
| 135 | @cindex font backend, on macOS | 121 | @cindex font backend, on macOS |
| 136 | In macOS, Emacs uses a Core Text based font backend | 122 | 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 | |||
| 180 | the file. Emacs handles this by visiting that file and highlighting | 166 | the file. Emacs handles this by visiting that file and highlighting |
| 181 | the requested line (@code{ns-open-file-select-line}). | 167 | the requested line (@code{ns-open-file-select-line}). |
| 182 | 168 | ||
| 183 | @item ns-drag-file | 169 | @item ns-drag-n-drop |
| 184 | This event occurs when a user drags files from another application | 170 | This event occurs when a user drags an object from another application |
| 185 | into an Emacs frame. The default behavior is to insert the contents | 171 | into an Emacs frame. The default behavior is to open a file in the |
| 186 | of all the dragged files into the current buffer | 172 | window under the mouse, or to insert text at point of the window under |
| 187 | (@code{ns-insert-files}). The list of dragged files is stored in the | 173 | the mouse. It may sometimes be necessary to use the @key{META} key in |
| 188 | variable @code{ns-input-file}. | 174 | conjunction with dragging to force text insertion. |
| 189 | |||
| 190 | @item ns-drag-color | ||
| 191 | This event occurs when a user drags a color from the color well (or | ||
| 192 | some other source) into an Emacs frame. The default behavior is to | ||
| 193 | alter the foreground color of the area the color was dragged onto | ||
| 194 | (@code{ns-set-foreground-at-mouse}). If this event is issued with a | ||
| 195 | @key{Shift} modifier, Emacs changes the background color instead | ||
| 196 | (@code{ns-set-background-at-mouse}). The name of the dragged color is | ||
| 197 | stored in the variable @code{ns-input-color}. | ||
| 198 | 175 | ||
| 199 | @item ns-change-font | 176 | @item ns-change-font |
| 200 | This event occurs when the user selects a font in a Nextstep font | 177 | This event occurs when the user selects a font in a Nextstep font |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 02dc830e0ab..13a25af02c8 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -7235,8 +7235,8 @@ Characters of Unicode General Category [Cf], such as @samp{U+200E} | |||
| 7235 | images, such as @samp{U+00AD} (Soft Hyphen). | 7235 | images, such as @samp{U+00AD} (Soft Hyphen). |
| 7236 | 7236 | ||
| 7237 | @item no-font | 7237 | @item no-font |
| 7238 | Characters for there is no suitable font, or which cannot be encoded | 7238 | Characters for which there is no suitable font, or which cannot be |
| 7239 | by the terminal's coding system. | 7239 | encoded by the terminal's coding system. |
| 7240 | @end table | 7240 | @end table |
| 7241 | 7241 | ||
| 7242 | @c FIXME: this can also be 'acronym', but that's not currently | 7242 | @c FIXME: this can also be 'acronym', but that's not currently |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 8cb6cf6242a..da09b4ae1c6 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -1143,7 +1143,7 @@ If @var{n} is zero, indicating a request for the latest kill, | |||
| 1143 | @code{current-kill} calls the value of | 1143 | @code{current-kill} calls the value of |
| 1144 | @code{interprogram-paste-function} (documented below) before | 1144 | @code{interprogram-paste-function} (documented below) before |
| 1145 | consulting the kill ring. If that value is a function and calling it | 1145 | consulting the kill ring. If that value is a function and calling it |
| 1146 | returns a string or a list of several string, @code{current-kill} | 1146 | returns a string or a list of several strings, @code{current-kill} |
| 1147 | pushes the strings onto the kill ring and returns the first string. | 1147 | pushes the strings onto the kill ring and returns the first string. |
| 1148 | It also sets the yanking pointer to point to the kill-ring entry of | 1148 | It also sets the yanking pointer to point to the kill-ring entry of |
| 1149 | the first string returned by @code{interprogram-paste-function}, | 1149 | the first string returned by @code{interprogram-paste-function}, |
| @@ -1156,8 +1156,10 @@ move the yanking pointer. | |||
| 1156 | @defun kill-new string &optional replace | 1156 | @defun kill-new string &optional replace |
| 1157 | This function pushes the text @var{string} onto the kill ring and | 1157 | This function pushes the text @var{string} onto the kill ring and |
| 1158 | makes the yanking pointer point to it. It discards the oldest entry | 1158 | makes the yanking pointer point to it. It discards the oldest entry |
| 1159 | if appropriate. It also invokes the value of | 1159 | if appropriate. It also invokes the values of |
| 1160 | @code{interprogram-cut-function} (see below). | 1160 | @code{interprogram-paste-function} (subject to |
| 1161 | the user option @code{save-interprogram-paste-before-kill}) | ||
| 1162 | and @code{interprogram-cut-function} (see below). | ||
| 1161 | 1163 | ||
| 1162 | If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the | 1164 | If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the |
| 1163 | first element of the kill ring with @var{string}, rather than pushing | 1165 | 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 | |||
| 1169 | kill ring and makes the yanking pointer point to the combined entry. | 1171 | kill ring and makes the yanking pointer point to the combined entry. |
| 1170 | Normally @var{string} goes at the end of the entry, but if | 1172 | Normally @var{string} goes at the end of the entry, but if |
| 1171 | @var{before-p} is non-@code{nil}, it goes at the beginning. This | 1173 | @var{before-p} is non-@code{nil}, it goes at the beginning. This |
| 1172 | function also invokes the value of @code{interprogram-cut-function} | 1174 | function calls @code{kill-new} as a subroutine, thus causing the |
| 1173 | (see below). | 1175 | values of @code{interprogram-cut-function} and possibly |
| 1176 | @code{interprogram-paste-function} (see below) to be invoked by | ||
| 1177 | extension. | ||
| 1174 | @end defun | 1178 | @end defun |
| 1175 | 1179 | ||
| 1176 | @defvar interprogram-paste-function | 1180 | @defvar interprogram-paste-function |
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index b2cf006285d..96ca4657284 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -930,6 +930,7 @@ status of its latest version. | |||
| 930 | @menu | 930 | @menu |
| 931 | * Origin of the term Emacs:: | 931 | * Origin of the term Emacs:: |
| 932 | * Latest version of Emacs:: | 932 | * Latest version of Emacs:: |
| 933 | * New in Emacs 26:: | ||
| 933 | * New in Emacs 25:: | 934 | * New in Emacs 25:: |
| 934 | * New in Emacs 24:: | 935 | * New in Emacs 24:: |
| 935 | * New in Emacs 23:: | 936 | * New in Emacs 23:: |
| @@ -979,7 +980,7 @@ conventions}). | |||
| 979 | Emacs @value{EMACSVER} is the current version as of this writing. A version | 980 | Emacs @value{EMACSVER} is the current version as of this writing. A version |
| 980 | number with two components (e.g., @samp{24.5}) indicates a released | 981 | number with two components (e.g., @samp{24.5}) indicates a released |
| 981 | version; three components indicate a development | 982 | version; three components indicate a development |
| 982 | version (e.g., @samp{26.0.50} is what will eventually become @samp{26.1}). | 983 | version (e.g., @samp{27.0.50} is what will eventually become @samp{27.1}). |
| 983 | 984 | ||
| 984 | Emacs is under active development, hosted at | 985 | Emacs is under active development, hosted at |
| 985 | @uref{https://savannah.gnu.org/projects/emacs/, Savannah}. | 986 | @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, | |||
| 998 | you can give this command a prefix argument to read about which features | 999 | you can give this command a prefix argument to read about which features |
| 999 | were new in older versions. | 1000 | were new in older versions. |
| 1000 | 1001 | ||
| 1002 | @node New in Emacs 26 | ||
| 1003 | @section What is different about Emacs 26? | ||
| 1004 | @cindex Differences between Emacs 25 and Emacs 26 | ||
| 1005 | @cindex Emacs 26, new features in | ||
| 1006 | |||
| 1007 | @itemize | ||
| 1008 | @cindex threads | ||
| 1009 | @item | ||
| 1010 | Emacs now provides a limited form of concurrency with Lisp threads. | ||
| 1011 | |||
| 1012 | @cindex systemd support | ||
| 1013 | @item | ||
| 1014 | Emacs now supports @code{systemd}. The new command-line option | ||
| 1015 | @option{--fg-daemon} is part of this support, it causes Emacs to run | ||
| 1016 | in the foreground instead of forking, as under @option{--daemon}. | ||
| 1017 | |||
| 1018 | @item | ||
| 1019 | Emacs now supports 24-bit true color on text terminals which provide | ||
| 1020 | that feature. @xref{Colors on a TTY}. | ||
| 1021 | |||
| 1022 | @cindex double-buffering | ||
| 1023 | @item | ||
| 1024 | Emacs on X now supports double-buffering, which eliminates display | ||
| 1025 | flickering in most situations. | ||
| 1026 | |||
| 1027 | @item | ||
| 1028 | You can now scroll the Emacs display horizontally using the mouse or | ||
| 1029 | touchpad. | ||
| 1030 | |||
| 1031 | @cindex line number display | ||
| 1032 | @item | ||
| 1033 | Emacs display now includes an optional feature for display of line | ||
| 1034 | numbers via the @code{display-line-numbers-mode} command. This | ||
| 1035 | feature is much faster than the equivalent display offered by packages | ||
| 1036 | such as @code{linum}, and also provides many optional features like | ||
| 1037 | relative line numbers. | ||
| 1038 | |||
| 1039 | @cindex horizontal scrolling of current line | ||
| 1040 | @item | ||
| 1041 | The automatic horizontal scrolling of the window display when lines | ||
| 1042 | are truncated can now optionally be enabled only for the current line, | ||
| 1043 | the line where Emacs shows the cursor. Under this mode, all the other | ||
| 1044 | window lines are not scrolled to show characters outside of the | ||
| 1045 | viewport. | ||
| 1046 | |||
| 1047 | @item | ||
| 1048 | Letter-case conversions now honor special cases in Turkish and Greek | ||
| 1049 | scripts. | ||
| 1050 | |||
| 1051 | @cindex Enchant support | ||
| 1052 | @item | ||
| 1053 | Support for Enchant is now part of the Emacs spell-checking commands. | ||
| 1054 | |||
| 1055 | @item | ||
| 1056 | Tramp now supports Google Drive filesystems. | ||
| 1057 | |||
| 1058 | @item | ||
| 1059 | Emacs can now be built while omitting the details of the machine on | ||
| 1060 | which it was built, thus making it easier to produce reproducible | ||
| 1061 | builds. | ||
| 1062 | |||
| 1063 | @item | ||
| 1064 | Security vulnerability related to Enriched Text mode is removed. | ||
| 1065 | Enriched mode previously allowed saving @code{display} properties as | ||
| 1066 | part of text; those properties support evaluating arbitrary Lisp code, | ||
| 1067 | which opens a vulnerability for Emacs users receiving Enriched Text | ||
| 1068 | from external sources. Execution of arbitrary Lisp forms in | ||
| 1069 | @code{display} properties decoded by Enriched Text mode is now | ||
| 1070 | disabled by default. | ||
| 1071 | @end itemize | ||
| 1072 | |||
| 1073 | Consult the Emacs @file{NEWS} file (@kbd{C-h n}) for the full list of | ||
| 1074 | changes in Emacs 26. | ||
| 1075 | |||
| 1001 | @node New in Emacs 25 | 1076 | @node New in Emacs 25 |
| 1002 | @section What is different about Emacs 25? | 1077 | @section What is different about Emacs 25? |
| 1003 | @cindex Differences between Emacs 24 and Emacs 25 | 1078 | @cindex Differences between Emacs 24 and Emacs 25 |
| @@ -43,6 +43,11 @@ created in the 'src' directory. | |||
| 43 | 43 | ||
| 44 | *** Configuring GDB | 44 | *** Configuring GDB |
| 45 | 45 | ||
| 46 | To start GDB to debug Emacs, you can simply type "gdb ./emacs RET" at | ||
| 47 | the shell prompt (assuming you do that from the directory of the Emacs | ||
| 48 | executable, usually the 'src' sub-directory of the Emacs tree). | ||
| 49 | However, we recommend starting GDB from Emacs, see below. | ||
| 50 | |||
| 46 | When you debug Emacs with GDB, you should start GDB in the directory | 51 | When you debug Emacs with GDB, you should start GDB in the directory |
| 47 | where the Emacs executable was made (the 'src' directory in the Emacs | 52 | where the Emacs executable was made (the 'src' directory in the Emacs |
| 48 | source tree). That directory has a .gdbinit file that defines various | 53 | source tree). That directory has a .gdbinit file that defines various |
| @@ -52,16 +57,19 @@ Emacs Redisplay problems".) | |||
| 52 | 57 | ||
| 53 | Starting the debugger from Emacs, via the "M-x gdb" command (described | 58 | Starting the debugger from Emacs, via the "M-x gdb" command (described |
| 54 | below), when the current buffer visits one of the Emacs C source files | 59 | below), when the current buffer visits one of the Emacs C source files |
| 55 | will automatically start GDB in the 'src' directory. | 60 | will automatically start GDB in the 'src' directory. If you invoke |
| 61 | "M-x gdb" from a buffer whose default directory is different, such as | ||
| 62 | from the "*scratch*" buffer, you can change the default directory with | ||
| 63 | the "M-x cd" command before starting the debugger. | ||
| 56 | 64 | ||
| 57 | Some GDB versions by default do not automatically load .gdbinit files | 65 | Recent GDB versions by default do not automatically load .gdbinit |
| 58 | in the directory where you invoke GDB. With those versions of GDB, | 66 | files in the directory where you invoke GDB. With those versions of |
| 59 | you will see a warning when GDB starts, like this: | 67 | GDB, you will see a warning when GDB starts, like this: |
| 60 | 68 | ||
| 61 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". | 69 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". |
| 62 | 70 | ||
| 63 | The simplest way to fix this is to add the following line to your | 71 | The simplest way to fix this is to add the following line to your |
| 64 | ~/.gdbinit file: | 72 | ~/.gdbinit file (creating such a file if it doesn't already exist): |
| 65 | 73 | ||
| 66 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit | 74 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit |
| 67 | 75 | ||
| @@ -133,9 +141,12 @@ to the debugger". | |||
| 133 | 141 | ||
| 134 | You are now ready to start your debugging session. | 142 | You are now ready to start your debugging session. |
| 135 | 143 | ||
| 144 | *** Running Emacs from GDB | ||
| 145 | |||
| 136 | If you are starting a new Emacs session, type "run", followed by any | 146 | If you are starting a new Emacs session, type "run", followed by any |
| 137 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and | 147 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and |
| 138 | press RET. | 148 | press RET. If you ran GDB outside of Emacs, type "run" followed by |
| 149 | the command-line arguments at the GDB prompt instead. | ||
| 139 | 150 | ||
| 140 | If you attached the debugger to a running Emacs, type "continue" into | 151 | If you attached the debugger to a running Emacs, type "continue" into |
| 141 | the *gud-emacs* buffer and press RET. | 152 | the *gud-emacs* buffer and press RET. |
diff --git a/lisp/simple.el b/lisp/simple.el index 863547a76ba..5446159d319 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1067,14 +1067,14 @@ instead of deleted." | |||
| 1067 | (t | 1067 | (t |
| 1068 | (filter-buffer-substring (region-beginning) (region-end) method))))) | 1068 | (filter-buffer-substring (region-beginning) (region-end) method))))) |
| 1069 | "Function to get the region's content. | 1069 | "Function to get the region's content. |
| 1070 | Called with one argument METHOD. | 1070 | Called with one argument METHOD which can be: |
| 1071 | If METHOD is `delete-only', then delete the region; the return value | 1071 | - nil: return the content as a string. |
| 1072 | is undefined. If METHOD is nil, then return the content as a string. | 1072 | - `delete-only': delete the region; the return value is undefined. |
| 1073 | If METHOD is `bounds', then return the boundaries of the region | 1073 | - `bounds': return the boundaries of the region as a list of cons |
| 1074 | as a list of cons cells of the form (START . END). | 1074 | cells of the form (START . END). |
| 1075 | If METHOD is anything else, delete the region and return its content | 1075 | - anything else: delete the region and return its content |
| 1076 | as a string, after filtering it with `filter-buffer-substring', which | 1076 | as a string, after filtering it with `filter-buffer-substring', which |
| 1077 | is called with METHOD as its 3rd argument.") | 1077 | is called with METHOD as its 3rd argument.") |
| 1078 | 1078 | ||
| 1079 | (defvar region-insert-function | 1079 | (defvar region-insert-function |
| 1080 | (lambda (lines) | 1080 | (lambda (lines) |
| @@ -4355,12 +4355,11 @@ ring directly.") | |||
| 4355 | "The tail of the kill ring whose car is the last thing yanked.") | 4355 | "The tail of the kill ring whose car is the last thing yanked.") |
| 4356 | 4356 | ||
| 4357 | (defcustom save-interprogram-paste-before-kill nil | 4357 | (defcustom save-interprogram-paste-before-kill nil |
| 4358 | "Save clipboard strings into kill ring before replacing them. | 4358 | "Save existing clipboard text into kill ring before replacing it. |
| 4359 | When one selects something in another program to paste it into Emacs, | 4359 | A non-nil value ensures that Emacs kill operations do not |
| 4360 | but kills something in Emacs before actually pasting it, | 4360 | irrevocably overwrite existing clipboard text by saving it to the |
| 4361 | this selection is gone unless this variable is non-nil, | 4361 | `kill-ring' prior to the kill. Such text can subsequently be |
| 4362 | in which case the other program's selection is saved in the `kill-ring' | 4362 | retrieved via \\[yank] \\[yank-pop]]." |
| 4363 | before the Emacs kill and one can still paste it using \\[yank] \\[yank-pop]." | ||
| 4364 | :type 'boolean | 4363 | :type 'boolean |
| 4365 | :group 'killing | 4364 | :group 'killing |
| 4366 | :version "23.2") | 4365 | :version "23.2") |
| @@ -4380,7 +4379,7 @@ Optional second argument REPLACE non-nil means that STRING will replace | |||
| 4380 | the front of the kill ring, rather than being added to the list. | 4379 | the front of the kill ring, rather than being added to the list. |
| 4381 | 4380 | ||
| 4382 | When `save-interprogram-paste-before-kill' and `interprogram-paste-function' | 4381 | When `save-interprogram-paste-before-kill' and `interprogram-paste-function' |
| 4383 | are non-nil, saves the interprogram paste string(s) into `kill-ring' before | 4382 | are non-nil, save the interprogram paste string(s) into `kill-ring' before |
| 4384 | STRING. | 4383 | STRING. |
| 4385 | 4384 | ||
| 4386 | When the yank handler has a non-nil PARAM element, the original STRING | 4385 | 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." | |||
| 4416 | (if interprogram-cut-function | 4415 | (if interprogram-cut-function |
| 4417 | (funcall interprogram-cut-function string))) | 4416 | (funcall interprogram-cut-function string))) |
| 4418 | 4417 | ||
| 4419 | ;; It has been argued that this should work similar to `self-insert-command' | 4418 | ;; It has been argued that this should work like `self-insert-command' |
| 4420 | ;; which merges insertions in undo-list in groups of 20 (hard-coded in cmds.c). | 4419 | ;; which merges insertions in `buffer-undo-list' in groups of 20 |
| 4420 | ;; (hard-coded in `undo-auto-amalgamate'). | ||
| 4421 | (defcustom kill-append-merge-undo nil | 4421 | (defcustom kill-append-merge-undo nil |
| 4422 | "Whether appending to kill ring also makes \\[undo] restore both pieces of text simultaneously." | 4422 | "Amalgamate appending kills with the last kill for undo. |
| 4423 | When non-nil, appending or prepending text to the last kill makes | ||
| 4424 | \\[undo] restore both pieces of text simultaneously." | ||
| 4423 | :type 'boolean | 4425 | :type 'boolean |
| 4424 | :group 'killing | 4426 | :group 'killing |
| 4425 | :version "25.1") | 4427 | :version "25.1") |
| 4426 | 4428 | ||
| 4427 | (defun kill-append (string before-p) | 4429 | (defun kill-append (string before-p) |
| 4428 | "Append STRING to the end of the latest kill in the kill ring. | 4430 | "Append STRING to the end of the latest kill in the kill ring. |
| 4429 | If BEFORE-P is non-nil, prepend STRING to the kill. | 4431 | If BEFORE-P is non-nil, prepend STRING to the kill instead. |
| 4430 | Also removes the last undo boundary in the current buffer, | 4432 | If `interprogram-cut-function' is non-nil, call it with the |
| 4431 | depending on `kill-append-merge-undo'. | 4433 | resulting kill. |
| 4432 | If `interprogram-cut-function' is set, pass the resulting kill to it." | 4434 | If `kill-append-merge-undo' is non-nil, remove the last undo |
| 4435 | boundary in the current buffer." | ||
| 4433 | (let* ((cur (car kill-ring))) | 4436 | (let* ((cur (car kill-ring))) |
| 4434 | (kill-new (if before-p (concat string cur) (concat cur string)) | 4437 | (kill-new (if before-p (concat string cur) (concat cur string)) |
| 4435 | (or (= (length cur) 0) | 4438 | (or (= (length cur) 0) |
diff --git a/lisp/term.el b/lisp/term.el index cfb39c34e53..017b0221ecb 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1456,6 +1456,9 @@ The main purpose is to get rid of the local keymap." | |||
| 1456 | (let ((buffer-read-only nil) | 1456 | (let ((buffer-read-only nil) |
| 1457 | (omax (point-max)) | 1457 | (omax (point-max)) |
| 1458 | (opoint (point))) | 1458 | (opoint (point))) |
| 1459 | ;; Remove hooks to avoid errors due to dead process. | ||
| 1460 | (remove-hook 'pre-command-hook #'term-set-goto-process-mark t) | ||
| 1461 | (remove-hook 'post-command-hook #'term-goto-process-mark-maybe t) | ||
| 1459 | ;; Record where we put the message, so we can ignore it | 1462 | ;; Record where we put the message, so we can ignore it |
| 1460 | ;; later on. | 1463 | ;; later on. |
| 1461 | (goto-char omax) | 1464 | (goto-char omax) |