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 /lisp | |
| 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
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/simple.el | 47 | ||||
| -rw-r--r-- | lisp/term.el | 3 |
2 files changed, 28 insertions, 22 deletions
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) |