aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2013-12-11 19:06:29 +0200
committerEli Zaretskii2013-12-11 19:06:29 +0200
commita34a8cd1e46594c5776f187dd98583bcb82f9bc0 (patch)
tree92503ed7f7d3fb3c73c38d4689611b8202682970 /lisp
parent8b55eeeb70be4b4ff3dd4694013bdb1a9f668bc6 (diff)
parent1421be8445803bdb9c3fece8c658836b5f0f9c34 (diff)
downloademacs-a34a8cd1e46594c5776f187dd98583bcb82f9bc0.tar.gz
emacs-a34a8cd1e46594c5776f187dd98583bcb82f9bc0.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog82
-rw-r--r--lisp/Makefile.in2
-rw-r--r--lisp/bindings.el64
-rw-r--r--lisp/comint.el4
-rw-r--r--lisp/delsel.el33
-rw-r--r--lisp/dired-aux.el10
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/smie.el2
-rw-r--r--lisp/emacs-lisp/trace.el1
-rw-r--r--lisp/emulation/cua-base.el68
-rw-r--r--lisp/emulation/cua-rect.el6
-rw-r--r--lisp/misearch.el24
-rw-r--r--lisp/net/eww.el5
-rw-r--r--lisp/progmodes/octave.el18
-rw-r--r--lisp/simple.el2
15 files changed, 195 insertions, 128 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f61812f7e1a..22ff12fe6b4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,85 @@
12013-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/smie.el (smie-indent--hanging-p): Don't bother matching
4 comment-start-skip, since it fails when that uses submatch 1 (bug#16041).
5
6 * emulation/cua-base.el (cua-paste): Add `delete-selection' property
7 instead of deleting the selection "by hand" (bug#16098).
8 Rely on insert-for-yank to yank rectangles.
9 (cua-highlight-region-shift-only): Mark obsolete.
10 (cua-mode): Don't enable/disable transient-mark-mode,
11 shift-select-mode (cua-mode works both with and without them), and
12 pc-selection-mode (obsolete).
13 * emulation/cua-rect.el (cua--activate-rectangle): Activate the mark.
14 (cua--deactivate-rectangle): Deactivate it.
15
16 * delsel.el (delete-selection-mode): Don't enable transient-mark-mode.
17 (delete-selection-helper): Make sure yank starts at the top of the
18 deleted region.
19 (minibuffer-keyboard-quit): Use region-active-p.
20
21 * emacs-lisp/trace.el (trace-make-advice): Don't deactivate the mark.
22
23 * simple.el (normal-erase-is-backspace-mode): Map kp-delete identically
24 to `delete' (bug#16109).
25
262013-12-11 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
27
28 * progmodes/octave.el (octave-mode, inferior-octave-mode): Link to
29 info manual and show keybindings and set `:group' keyword.
30
312013-12-11 Juri Linkov <juri@jurta.org>
32
33 * delsel.el (delete-active-region): Let-bind `this-command'
34 to prevent `kill-region' from changing its original value.
35 (delete-selection-helper): Handle `overwrite-mode' for the type
36 `kill' exactly the same way as for the type `t'.
37 (insert-char, quoted-insert, reindent-then-newline-and-indent):
38 Support more commands. (Bug#13312)
39
402013-12-11 Juri Linkov <juri@jurta.org>
41
42 * bindings.el: Map kp keys to non-kp keys systematically
43 with basic modifiers control, meta and shift. (Bug#14397)
44
452013-12-11 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> (tiny change)
46
47 * net/eww.el (eww-mode-map): Instead of "Quit" show "Exit" and
48 "Close browser" menu items. Fix wrong function of "List
49 bookmarks".
50
512013-12-11 Juri Linkov <juri@jurta.org>
52
53 * misearch.el (multi-isearch-buffers): Set the value of
54 `multi-isearch-buffer-list' globally. Set NO-RECURSIVE-EDIT
55 arg of isearch-forward to t.
56 (multi-isearch-buffers-regexp): Set the value of
57 `multi-isearch-buffer-list' globally. Set NO-RECURSIVE-EDIT
58 arg of isearch-forward-regexp to t.
59 (multi-isearch-files): Set the value of
60 `multi-isearch-file-list' globally. Set NO-RECURSIVE-EDIT
61 arg of isearch-forward to t.
62 (multi-isearch-files-regexp): Set the value of
63 `multi-isearch-file-list globally. Set NO-RECURSIVE-EDIT
64 arg of isearch-forward-regexp to t. (Bug#16035)
65
66 * dired-aux.el (dired-isearch-filenames): Set NO-RECURSIVE-EDIT
67 arg of isearch-forward to t.
68 (dired-isearch-filenames-regexp): Set NO-RECURSIVE-EDIT
69 arg of isearch-forward-regexp to t.
70 (dired-isearch-filter-filenames): Remove unnecessary check for
71 `dired-isearch-filenames'.
72
73 * comint.el (comint-history-isearch-backward):
74 Set NO-RECURSIVE-EDIT arg of isearch-backward to t.
75 (comint-history-isearch-backward-regexp):
76 Set NO-RECURSIVE-EDIT arg of isearch-backward-regexp to t.
77
782013-12-10 Eli Zaretskii <eliz@gnu.org>
79
80 * Makefile.in (autoloads): Run $(srcdir)/loaddefs.el through
81 unmsys--file-name. (Bug#16099)
82
12013-12-10 Teodor Zlatanov <tzz@lifelogs.com> 832013-12-10 Teodor Zlatanov <tzz@lifelogs.com>
2 84
3 * emacs-lisp/package.el (package-keyword-button-action): Remove 85 * emacs-lisp/package.el (package-keyword-button-action): Remove
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 9c9eacfd386..3675cd90e46 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -183,7 +183,7 @@ autoloads: $(LOADDEFS) doit
183 echo Directories: $$wins; \ 183 echo Directories: $$wins; \
184 $(emacs) -l autoload \ 184 $(emacs) -l autoload \
185 --eval '(setq autoload-builtin-package-versions t)' \ 185 --eval '(setq autoload-builtin-package-versions t)' \
186 --eval '(setq generated-autoload-file (expand-file-name "$(srcdir)/loaddefs.el"))' \ 186 --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \
187 -f batch-update-autoloads $$wins 187 -f batch-update-autoloads $$wins
188 188
189# This is required by the bootstrap-emacs target in ../src/Makefile, so 189# This is required by the bootstrap-emacs target in ../src/Makefile, so
diff --git a/lisp/bindings.el b/lisp/bindings.el
index b3b4f76b555..c159f44eecd 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1056,36 +1056,30 @@ if `inhibit-field-text-motion' is non-nil."
1056;; FIXME: rather than list such mappings for every modifier-combination, 1056;; FIXME: rather than list such mappings for every modifier-combination,
1057;; we should come up with a way to do it generically, something like 1057;; we should come up with a way to do it generically, something like
1058;; (define-key function-key-map [*-kp-home] [*-home]) 1058;; (define-key function-key-map [*-kp-home] [*-home])
1059(define-key function-key-map [kp-home] [home]) 1059;; Currently we add keypad key combinations with basic modifiers
1060(define-key function-key-map [kp-left] [left]) 1060;; (to complement plain bindings in "Keypad support" section in simple.el)
1061(define-key function-key-map [kp-up] [up]) 1061;; Until [*-kp-home] is implemented, for more modifiers we could also use:
1062(define-key function-key-map [kp-right] [right]) 1062;; (todo-powerset '(control meta shift hyper super alt)) (Bug#14397)
1063(define-key function-key-map [kp-down] [down]) 1063(let ((modifiers '(nil (control) (meta) (control meta) (shift)
1064(define-key function-key-map [kp-prior] [prior]) 1064 (control shift) (meta shift) (control meta shift)))
1065(define-key function-key-map [kp-next] [next]) 1065 (keys '((kp-delete delete) (kp-insert insert)
1066(define-key function-key-map [M-kp-next] [M-next]) 1066 (kp-end end) (kp-down down) (kp-next next)
1067(define-key function-key-map [kp-end] [end]) 1067 (kp-left left) (kp-begin begin) (kp-right right)
1068(define-key function-key-map [kp-begin] [begin]) 1068 (kp-home home) (kp-up up) (kp-prior prior)
1069(define-key function-key-map [kp-insert] [insert]) 1069 (kp-enter enter) (kp-decimal ?.)
1070 (kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4)
1071 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
1072 (kp-add +) (kp-subtract -) (kp-multiply *) (kp-divide /))))
1073 (dolist (pair keys)
1074 (dolist (mod modifiers)
1075 (define-key function-key-map
1076 (vector (append mod (list (nth 0 pair))))
1077 (vector (append mod (list (nth 1 pair))))))))
1078
1070(define-key function-key-map [backspace] [?\C-?]) 1079(define-key function-key-map [backspace] [?\C-?])
1071(define-key function-key-map [delete] [?\C-?]) 1080(define-key function-key-map [delete] [?\C-?])
1072(define-key function-key-map [kp-delete] [?\C-?]) 1081(define-key function-key-map [kp-delete] [?\C-?])
1073(define-key function-key-map [S-kp-end] [S-end]) 1082
1074(define-key function-key-map [S-kp-down] [S-down])
1075(define-key function-key-map [S-kp-next] [S-next])
1076(define-key function-key-map [S-kp-left] [S-left])
1077(define-key function-key-map [S-kp-right] [S-right])
1078(define-key function-key-map [S-kp-home] [S-home])
1079(define-key function-key-map [S-kp-up] [S-up])
1080(define-key function-key-map [S-kp-prior] [S-prior])
1081(define-key function-key-map [C-S-kp-end] [C-S-end])
1082(define-key function-key-map [C-S-kp-down] [C-S-down])
1083(define-key function-key-map [C-S-kp-next] [C-S-next])
1084(define-key function-key-map [C-S-kp-left] [C-S-left])
1085(define-key function-key-map [C-S-kp-right] [C-S-right])
1086(define-key function-key-map [C-S-kp-home] [C-S-home])
1087(define-key function-key-map [C-S-kp-up] [C-S-up])
1088(define-key function-key-map [C-S-kp-prior] [C-S-prior])
1089;; Don't bind shifted keypad numeric keys, they reportedly 1083;; Don't bind shifted keypad numeric keys, they reportedly
1090;; interfere with the feature of some keyboards to produce 1084;; interfere with the feature of some keyboards to produce
1091;; numbers when NumLock is off. 1085;; numbers when NumLock is off.
@@ -1097,14 +1091,14 @@ if `inhibit-field-text-motion' is non-nil."
1097;(define-key function-key-map [S-kp-7] [S-home]) 1091;(define-key function-key-map [S-kp-7] [S-home])
1098;(define-key function-key-map [S-kp-8] [S-up]) 1092;(define-key function-key-map [S-kp-8] [S-up])
1099;(define-key function-key-map [S-kp-9] [S-prior]) 1093;(define-key function-key-map [S-kp-9] [S-prior])
1100(define-key function-key-map [C-S-kp-1] [C-S-end]) 1094;(define-key function-key-map [C-S-kp-1] [C-S-end])
1101(define-key function-key-map [C-S-kp-2] [C-S-down]) 1095;(define-key function-key-map [C-S-kp-2] [C-S-down])
1102(define-key function-key-map [C-S-kp-3] [C-S-next]) 1096;(define-key function-key-map [C-S-kp-3] [C-S-next])
1103(define-key function-key-map [C-S-kp-4] [C-S-left]) 1097;(define-key function-key-map [C-S-kp-4] [C-S-left])
1104(define-key function-key-map [C-S-kp-6] [C-S-right]) 1098;(define-key function-key-map [C-S-kp-6] [C-S-right])
1105(define-key function-key-map [C-S-kp-7] [C-S-home]) 1099;(define-key function-key-map [C-S-kp-7] [C-S-home])
1106(define-key function-key-map [C-S-kp-8] [C-S-up]) 1100;(define-key function-key-map [C-S-kp-8] [C-S-up])
1107(define-key function-key-map [C-S-kp-9] [C-S-prior]) 1101;(define-key function-key-map [C-S-kp-9] [C-S-prior])
1108 1102
1109;; Hitting C-SPC on text terminals, usually sends the ascii code 0 (aka C-@), 1103;; Hitting C-SPC on text terminals, usually sends the ascii code 0 (aka C-@),
1110;; so we can't distinguish those two keys, but usually we consider C-SPC 1104;; so we can't distinguish those two keys, but usually we consider C-SPC
diff --git a/lisp/comint.el b/lisp/comint.el
index afd93fc6ff0..08e8b162771 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1407,13 +1407,13 @@ If nil, Isearch operates on the whole comint buffer."
1407 "Search for a string backward in input history using Isearch." 1407 "Search for a string backward in input history using Isearch."
1408 (interactive) 1408 (interactive)
1409 (let ((comint-history-isearch t)) 1409 (let ((comint-history-isearch t))
1410 (isearch-backward))) 1410 (isearch-backward nil t)))
1411 1411
1412(defun comint-history-isearch-backward-regexp () 1412(defun comint-history-isearch-backward-regexp ()
1413 "Search for a regular expression backward in input history using Isearch." 1413 "Search for a regular expression backward in input history using Isearch."
1414 (interactive) 1414 (interactive)
1415 (let ((comint-history-isearch t)) 1415 (let ((comint-history-isearch t))
1416 (isearch-backward-regexp))) 1416 (isearch-backward-regexp nil t)))
1417 1417
1418(defvar-local comint-history-isearch-message-overlay nil) 1418(defvar-local comint-history-isearch-message-overlay nil)
1419 1419
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 3c9a6561cde..87e84e59dee 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -71,14 +71,15 @@ any selection."
71 :global t :group 'editing-basics 71 :global t :group 'editing-basics
72 (if (not delete-selection-mode) 72 (if (not delete-selection-mode)
73 (remove-hook 'pre-command-hook 'delete-selection-pre-hook) 73 (remove-hook 'pre-command-hook 'delete-selection-pre-hook)
74 (add-hook 'pre-command-hook 'delete-selection-pre-hook) 74 (add-hook 'pre-command-hook 'delete-selection-pre-hook)))
75 (transient-mark-mode t)))
76 75
77(defun delete-active-region (&optional killp) 76(defun delete-active-region (&optional killp)
78 "Delete the active region. 77 "Delete the active region.
79If KILLP in not-nil, the active region is killed instead of deleted." 78If KILLP in not-nil, the active region is killed instead of deleted."
80 (if killp 79 (if killp
81 (kill-region (point) (mark) t) 80 ;; Don't allow `kill-region' to change the value of `this-command'.
81 (let (this-command)
82 (kill-region (point) (mark) t))
82 (funcall region-extract-function 'delete-only)) 83 (funcall region-extract-function 'delete-only))
83 t) 84 t)
84 85
@@ -102,7 +103,13 @@ If KILLP in not-nil, the active region is killed instead of deleted."
102 FUNCTION should take no argument and return one of the above values or nil." 103 FUNCTION should take no argument and return one of the above values or nil."
103 (condition-case data 104 (condition-case data
104 (cond ((eq type 'kill) 105 (cond ((eq type 'kill)
105 (delete-active-region t)) 106 (delete-active-region t)
107 (if (and overwrite-mode
108 (eq this-command 'self-insert-command))
109 (let ((overwrite-mode nil))
110 (self-insert-command
111 (prefix-numeric-value current-prefix-arg))
112 (setq this-command 'ignore))))
106 ((eq type 'yank) 113 ((eq type 'yank)
107 ;; Before a yank command, make sure we don't yank the 114 ;; Before a yank command, make sure we don't yank the
108 ;; head of the kill-ring that really comes from the 115 ;; head of the kill-ring that really comes from the
@@ -114,7 +121,11 @@ If KILLP in not-nil, the active region is killed instead of deleted."
114 (fboundp 'mouse-region-match) 121 (fboundp 'mouse-region-match)
115 (mouse-region-match)) 122 (mouse-region-match))
116 (current-kill 1)) 123 (current-kill 1))
117 (delete-active-region)) 124 (let ((pos (copy-marker (region-beginning))))
125 (delete-active-region)
126 ;; If the region was, say, rectangular, make sure we yank
127 ;; from the top, to "replace".
128 (goto-char pos)))
118 ((eq type 'supersede) 129 ((eq type 'supersede)
119 (let ((empty-region (= (point) (mark)))) 130 (let ((empty-region (= (point) (mark))))
120 (delete-active-region) 131 (delete-active-region)
@@ -165,10 +176,14 @@ See `delete-selection-helper'."
165 (not (run-hook-with-args-until-success 176 (not (run-hook-with-args-until-success
166 'self-insert-uses-region-functions)))) 177 'self-insert-uses-region-functions))))
167 178
179(put 'insert-char 'delete-selection t)
180(put 'quoted-insert 'delete-selection t)
181
168(put 'yank 'delete-selection 'yank) 182(put 'yank 'delete-selection 'yank)
169(put 'clipboard-yank 'delete-selection 'yank) 183(put 'clipboard-yank 'delete-selection 'yank)
170(put 'insert-register 'delete-selection t) 184(put 'insert-register 'delete-selection t)
171 185
186(put 'reindent-then-newline-and-indent 'delete-selection t)
172(put 'newline-and-indent 'delete-selection t) 187(put 'newline-and-indent 'delete-selection t)
173(put 'newline 'delete-selection t) 188(put 'newline 'delete-selection t)
174(put 'open-line 'delete-selection 'kill) 189(put 'open-line 'delete-selection 'kill)
@@ -180,7 +195,7 @@ See `delete-selection-helper'."
180In Delete Selection mode, if the mark is active, just deactivate it; 195In Delete Selection mode, if the mark is active, just deactivate it;
181then it takes a second \\[keyboard-quit] to abort the minibuffer." 196then it takes a second \\[keyboard-quit] to abort the minibuffer."
182 (interactive) 197 (interactive)
183 (if (and delete-selection-mode transient-mark-mode mark-active) 198 (if (and delete-selection-mode (region-active-p))
184 (setq deactivate-mark t) 199 (setq deactivate-mark t)
185 (abort-recursive-edit))) 200 (abort-recursive-edit)))
186 201
@@ -197,9 +212,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
197 (define-key minibuffer-local-completion-map "\C-g" 'abort-recursive-edit) 212 (define-key minibuffer-local-completion-map "\C-g" 'abort-recursive-edit)
198 (define-key minibuffer-local-must-match-map "\C-g" 'abort-recursive-edit) 213 (define-key minibuffer-local-must-match-map "\C-g" 'abort-recursive-edit)
199 (define-key minibuffer-local-isearch-map "\C-g" 'abort-recursive-edit) 214 (define-key minibuffer-local-isearch-map "\C-g" 'abort-recursive-edit)
200 (dolist (sym '(self-insert-command yank clipboard-yank 215 (dolist (sym '(self-insert-command insert-char quoted-insert yank
201 insert-register 216 clipboard-yank insert-register newline-and-indent
202 newline-and-indent newline open-line)) 217 reindent-then-newline-and-indent newline open-line))
203 (put sym 'delete-selection nil)) 218 (put sym 'delete-selection nil))
204 ;; continue standard unloading 219 ;; continue standard unloading
205 nil) 220 nil)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 31d0495175a..28bfb283717 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -2526,24 +2526,22 @@ Intended to be added to `isearch-mode-hook'."
2526 "Test whether the current search hit is a file name. 2526 "Test whether the current search hit is a file name.
2527Return non-nil if the text from BEG to END is part of a file 2527Return non-nil if the text from BEG to END is part of a file
2528name (has the text property `dired-filename')." 2528name (has the text property `dired-filename')."
2529 (if dired-isearch-filenames 2529 (text-property-not-all (min beg end) (max beg end)
2530 (text-property-not-all (min beg end) (max beg end) 2530 'dired-filename nil))
2531 'dired-filename nil)
2532 t))
2533 2531
2534;;;###autoload 2532;;;###autoload
2535(defun dired-isearch-filenames () 2533(defun dired-isearch-filenames ()
2536 "Search for a string using Isearch only in file names in the Dired buffer." 2534 "Search for a string using Isearch only in file names in the Dired buffer."
2537 (interactive) 2535 (interactive)
2538 (let ((dired-isearch-filenames t)) 2536 (let ((dired-isearch-filenames t))
2539 (isearch-forward))) 2537 (isearch-forward nil t)))
2540 2538
2541;;;###autoload 2539;;;###autoload
2542(defun dired-isearch-filenames-regexp () 2540(defun dired-isearch-filenames-regexp ()
2543 "Search for a regexp using Isearch only in file names in the Dired buffer." 2541 "Search for a regexp using Isearch only in file names in the Dired buffer."
2544 (interactive) 2542 (interactive)
2545 (let ((dired-isearch-filenames t)) 2543 (let ((dired-isearch-filenames t))
2546 (isearch-forward-regexp))) 2544 (isearch-forward-regexp nil t)))
2547 2545
2548 2546
2549;; Functions for searching in tags style among marked files. 2547;; Functions for searching in tags style among marked files.
diff --git a/lisp/dired.el b/lisp/dired.el
index 27327352afb..afd9fbca5c2 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3849,7 +3849,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3849 3849
3850;;; Start of automatically extracted autoloads. 3850;;; Start of automatically extracted autoloads.
3851 3851
3852;;;### (autoloads nil "dired-aux" "dired-aux.el" "04b4cb6bde3220f55574eb1d99ac0d29") 3852;;;### (autoloads nil "dired-aux" "dired-aux.el" "4cb9d594789dacdf2445f338b9189357")
3853;;; Generated autoloads from dired-aux.el 3853;;; Generated autoloads from dired-aux.el
3854 3854
3855(autoload 'dired-diff "dired-aux" "\ 3855(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index f025a8b400b..1c468e013d6 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1165,7 +1165,7 @@ the beginning of a line."
1165 (forward-char 1)) 1165 (forward-char 1))
1166 (skip-chars-forward " \t") 1166 (skip-chars-forward " \t")
1167 (or (eolp) 1167 (or (eolp)
1168 (and (looking-at comment-start-skip) 1168 (and ;; (looking-at comment-start-skip) ;(bug#16041).
1169 (forward-comment (point-max)))) 1169 (forward-comment (point-max))))
1170 (point)))))) 1170 (point))))))
1171 1171
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index f605c2865c0..3a2c44a8da6 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -222,6 +222,7 @@ be printed along with the arguments in the trace."
222 (lambda (body &rest args) 222 (lambda (body &rest args)
223 (let ((trace-level (1+ trace-level)) 223 (let ((trace-level (1+ trace-level))
224 (trace-buffer (get-buffer-create buffer)) 224 (trace-buffer (get-buffer-create buffer))
225 (deactivate-mark nil) ;Protect deactivate-mark.
225 (ctx (funcall context))) 226 (ctx (funcall context)))
226 (unless inhibit-trace 227 (unless inhibit-trace
227 (with-current-buffer trace-buffer 228 (with-current-buffer trace-buffer
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 6c891c10eed..24149a33c89 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -294,6 +294,8 @@ But when the mark was set using \\[cua-set-mark], Transient Mark mode
294is not turned on." 294is not turned on."
295 :type 'boolean 295 :type 'boolean
296 :group 'cua) 296 :group 'cua)
297(make-obsolete-variable 'cua-highlight-region-shift-only
298 'transient-mark-mode "24.4")
297 299
298(defcustom cua-prefix-override-inhibit-delay 0.2 300(defcustom cua-prefix-override-inhibit-delay 0.2
299 "If non-nil, time in seconds to delay before overriding prefix key. 301 "If non-nil, time in seconds to delay before overriding prefix key.
@@ -858,6 +860,7 @@ With numeric prefix arg, copy to register 0-9 instead."
858 860
859(declare-function x-clipboard-yank "../term/x-win" ()) 861(declare-function x-clipboard-yank "../term/x-win" ())
860 862
863(put 'cua-paste 'delete-selection 'yank)
861(defun cua-paste (arg) 864(defun cua-paste (arg)
862 "Paste last cut or copied region or rectangle. 865 "Paste last cut or copied region or rectangle.
863An active region is deleted before executing the command. 866An active region is deleted before executing the command.
@@ -866,8 +869,7 @@ If global mark is active, copy from register or one character."
866 (interactive "P") 869 (interactive "P")
867 (setq arg (cua--prefix-arg arg)) 870 (setq arg (cua--prefix-arg arg))
868 (let ((regtxt (and cua--register (get-register cua--register))) 871 (let ((regtxt (and cua--register (get-register cua--register)))
869 (count (prefix-numeric-value arg)) 872 (count (prefix-numeric-value arg)))
870 paste-column paste-lines)
871 (cond 873 (cond
872 ((and cua--register (not regtxt)) 874 ((and cua--register (not regtxt))
873 (message "Nothing in register %c" cua--register)) 875 (message "Nothing in register %c" cua--register))
@@ -875,30 +877,12 @@ If global mark is active, copy from register or one character."
875 (if regtxt 877 (if regtxt
876 (cua--insert-at-global-mark regtxt) 878 (cua--insert-at-global-mark regtxt)
877 (when (not (eobp)) 879 (when (not (eobp))
878 (cua--insert-at-global-mark (filter-buffer-substring (point) (+ (point) count))) 880 (cua--insert-at-global-mark
881 (filter-buffer-substring (point) (+ (point) count)))
879 (forward-char count)))) 882 (forward-char count))))
880 (buffer-read-only 883 (buffer-read-only
881 (error "Cannot paste into a read-only buffer")) 884 (error "Cannot paste into a read-only buffer"))
882 (t 885 (t
883 ;; Must save register here, since delete may override reg 0.
884 (if mark-active
885 (if cua--rectangle
886 (progn
887 (goto-char (min (mark) (point)))
888 (setq paste-column (cua--rectangle-left))
889 (setq paste-lines (cua--delete-rectangle))
890 (if (= paste-lines 1)
891 (setq paste-lines nil))) ;; paste all
892 ;; Before a yank command, make sure we don't yank the
893 ;; head of the kill-ring that really comes from the
894 ;; currently active region we are going to delete.
895 ;; That would make yank a no-op.
896 (if (and (string= (filter-buffer-substring (point) (mark))
897 (car kill-ring))
898 (fboundp 'mouse-region-match)
899 (mouse-region-match))
900 (current-kill 1))
901 (cua-delete-region)))
902 (cond 886 (cond
903 (regtxt 887 (regtxt
904 (cond 888 (cond
@@ -906,16 +890,6 @@ If global mark is active, copy from register or one character."
906 ((consp regtxt) (cua--insert-rectangle regtxt)) 890 ((consp regtxt) (cua--insert-rectangle regtxt))
907 ((stringp regtxt) (insert-for-yank regtxt)) 891 ((stringp regtxt) (insert-for-yank regtxt))
908 (t (message "Unknown data in register %c" cua--register)))) 892 (t (message "Unknown data in register %c" cua--register))))
909 ((and cua--last-killed-rectangle
910 (eq (and kill-ring (car kill-ring)) (car cua--last-killed-rectangle)))
911 (let ((pt (point)))
912 (when (not (eq buffer-undo-list t))
913 (setq this-command 'cua--paste-rectangle)
914 (undo-boundary)
915 (setq buffer-undo-list (cons pt buffer-undo-list)))
916 (cua--insert-rectangle (cdr cua--last-killed-rectangle)
917 nil paste-column paste-lines)
918 (if arg (goto-char pt))))
919 ((eq this-original-command 'clipboard-yank) 893 ((eq this-original-command 'clipboard-yank)
920 (clipboard-yank)) 894 (clipboard-yank))
921 ((eq this-original-command 'x-clipboard-yank) 895 ((eq this-original-command 'x-clipboard-yank)
@@ -1426,9 +1400,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1426 1400
1427;; State prior to enabling cua-mode 1401;; State prior to enabling cua-mode
1428;; Value is a list with the following elements: 1402;; Value is a list with the following elements:
1429;; transient-mark-mode
1430;; delete-selection-mode 1403;; delete-selection-mode
1431;; pc-selection-mode
1432 1404
1433(defvar cua--saved-state nil) 1405(defvar cua--saved-state nil)
1434 1406
@@ -1488,7 +1460,8 @@ shifted movement key, set `cua-highlight-region-shift-only'."
1488 (remove-hook 'post-command-hook 'cua--post-command-handler)) 1460 (remove-hook 'post-command-hook 'cua--post-command-handler))
1489 1461
1490 (if (not cua-mode) 1462 (if (not cua-mode)
1491 (setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists)) 1463 (setq emulation-mode-map-alists
1464 (delq 'cua--keymap-alist emulation-mode-map-alists))
1492 (add-to-ordered-list 'emulation-mode-map-alists 'cua--keymap-alist 400) 1465 (add-to-ordered-list 'emulation-mode-map-alists 'cua--keymap-alist 400)
1493 (cua--select-keymaps)) 1466 (cua--select-keymaps))
1494 1467
@@ -1496,34 +1469,21 @@ shifted movement key, set `cua-highlight-region-shift-only'."
1496 (cua-mode 1469 (cua-mode
1497 (setq cua--saved-state 1470 (setq cua--saved-state
1498 (list 1471 (list
1499 transient-mark-mode 1472 (and (boundp 'delete-selection-mode) delete-selection-mode)))
1500 (and (boundp 'delete-selection-mode) delete-selection-mode)
1501 (and (boundp 'pc-selection-mode) pc-selection-mode)
1502 shift-select-mode))
1503 (if cua-delete-selection 1473 (if cua-delete-selection
1504 (delete-selection-mode 1) 1474 (delete-selection-mode 1)
1505 (if (and (boundp 'delete-selection-mode) delete-selection-mode) 1475 (if (and (boundp 'delete-selection-mode) delete-selection-mode)
1506 (delete-selection-mode -1))) 1476 (delete-selection-mode -1)))
1507 (if (and (boundp 'pc-selection-mode) pc-selection-mode) 1477 (if cua-highlight-region-shift-only (transient-mark-mode -1))
1508 (pc-selection-mode -1)) 1478 (cua--deactivate))
1509 (cua--deactivate)
1510 (setq shift-select-mode t)
1511 (transient-mark-mode (if cua-highlight-region-shift-only -1 1)))
1512 (cua--saved-state 1479 (cua--saved-state
1513 (setq transient-mark-mode (car cua--saved-state)) 1480 (if (nth 0 cua--saved-state)
1514 (if (nth 1 cua--saved-state)
1515 (delete-selection-mode 1) 1481 (delete-selection-mode 1)
1516 (if (and (boundp 'delete-selection-mode) delete-selection-mode) 1482 (if (and (boundp 'delete-selection-mode) delete-selection-mode)
1517 (delete-selection-mode -1))) 1483 (delete-selection-mode -1)))
1518 (if (nth 2 cua--saved-state)
1519 (pc-selection-mode 1))
1520 (setq shift-select-mode (nth 3 cua--saved-state))
1521 (if (called-interactively-p 'interactive) 1484 (if (called-interactively-p 'interactive)
1522 (message "CUA mode disabled.%s%s%s%s" 1485 (message "CUA mode disabled.%s"
1523 (if (nth 1 cua--saved-state) " Delete-Selection" "") 1486 (if (nth 0 cua--saved-state) " Delete-Selection enabled" "")))
1524 (if (and (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " and" "")
1525 (if (nth 2 cua--saved-state) " PC-Selection" "")
1526 (if (or (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " enabled" "")))
1527 (setq cua--saved-state nil)))) 1487 (setq cua--saved-state nil))))
1528 1488
1529 1489
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 8941bf27de7..71578031cba 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -718,7 +718,8 @@ If command is repeated at same position, delete the rectangle."
718 (cdr (cdr cua--last-rectangle)) 718 (cdr (cdr cua--last-rectangle))
719 (cua--rectangle-get-corners)) 719 (cua--rectangle-get-corners))
720 cua--status-string (if (cua--rectangle-virtual-edges) " [R]" "") 720 cua--status-string (if (cua--rectangle-virtual-edges) " [R]" "")
721 cua--last-rectangle nil)) 721 cua--last-rectangle nil)
722 (activate-mark))
722 723
723;; (defvar cua-save-point nil) 724;; (defvar cua-save-point nil)
724 725
@@ -731,7 +732,8 @@ If command is repeated at same position, delete the rectangle."
731 cua--rectangle nil 732 cua--rectangle nil
732 cua--rectangle-overlays nil 733 cua--rectangle-overlays nil
733 cua--status-string nil 734 cua--status-string nil
734 cua--mouse-last-pos nil)) 735 cua--mouse-last-pos nil)
736 (deactivate-mark))
735 737
736(defun cua--highlight-rectangle () 738(defun cua--highlight-rectangle ()
737 ;; This function is used to highlight the rectangular region. 739 ;; This function is used to highlight the rectangular region.
diff --git a/lisp/misearch.el b/lisp/misearch.el
index 0c4cd4ea323..36b826b862a 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -262,11 +262,11 @@ whose names match the specified regexp."
262 (multi-isearch-read-matching-buffers) 262 (multi-isearch-read-matching-buffers)
263 (multi-isearch-read-buffers)))) 263 (multi-isearch-read-buffers))))
264 (let ((multi-isearch-next-buffer-function 264 (let ((multi-isearch-next-buffer-function
265 'multi-isearch-next-buffer-from-list) 265 'multi-isearch-next-buffer-from-list))
266 (multi-isearch-buffer-list (mapcar #'get-buffer buffers))) 266 (setq multi-isearch-buffer-list (mapcar #'get-buffer buffers))
267 (switch-to-buffer (car multi-isearch-buffer-list)) 267 (switch-to-buffer (car multi-isearch-buffer-list))
268 (goto-char (if isearch-forward (point-min) (point-max))) 268 (goto-char (if isearch-forward (point-min) (point-max)))
269 (isearch-forward))) 269 (isearch-forward nil t)))
270 270
271;;;###autoload 271;;;###autoload
272(defun multi-isearch-buffers-regexp (buffers) 272(defun multi-isearch-buffers-regexp (buffers)
@@ -280,11 +280,11 @@ whose names match the specified regexp."
280 (multi-isearch-read-matching-buffers) 280 (multi-isearch-read-matching-buffers)
281 (multi-isearch-read-buffers)))) 281 (multi-isearch-read-buffers))))
282 (let ((multi-isearch-next-buffer-function 282 (let ((multi-isearch-next-buffer-function
283 'multi-isearch-next-buffer-from-list) 283 'multi-isearch-next-buffer-from-list))
284 (multi-isearch-buffer-list (mapcar #'get-buffer buffers))) 284 (setq multi-isearch-buffer-list (mapcar #'get-buffer buffers))
285 (switch-to-buffer (car multi-isearch-buffer-list)) 285 (switch-to-buffer (car multi-isearch-buffer-list))
286 (goto-char (if isearch-forward (point-min) (point-max))) 286 (goto-char (if isearch-forward (point-min) (point-max)))
287 (isearch-forward-regexp))) 287 (isearch-forward-regexp nil t)))
288 288
289 289
290;;; Global multi-file search invocations 290;;; Global multi-file search invocations
@@ -346,11 +346,11 @@ whose file names match the specified wildcard."
346 (multi-isearch-read-matching-files) 346 (multi-isearch-read-matching-files)
347 (multi-isearch-read-files)))) 347 (multi-isearch-read-files))))
348 (let ((multi-isearch-next-buffer-function 348 (let ((multi-isearch-next-buffer-function
349 'multi-isearch-next-file-buffer-from-list) 349 'multi-isearch-next-file-buffer-from-list))
350 (multi-isearch-file-list (mapcar #'expand-file-name files))) 350 (setq multi-isearch-file-list (mapcar #'expand-file-name files))
351 (find-file (car multi-isearch-file-list)) 351 (find-file (car multi-isearch-file-list))
352 (goto-char (if isearch-forward (point-min) (point-max))) 352 (goto-char (if isearch-forward (point-min) (point-max)))
353 (isearch-forward))) 353 (isearch-forward nil t)))
354 354
355;;;###autoload 355;;;###autoload
356(defun multi-isearch-files-regexp (files) 356(defun multi-isearch-files-regexp (files)
@@ -365,11 +365,11 @@ whose file names match the specified wildcard."
365 (multi-isearch-read-matching-files) 365 (multi-isearch-read-matching-files)
366 (multi-isearch-read-files)))) 366 (multi-isearch-read-files))))
367 (let ((multi-isearch-next-buffer-function 367 (let ((multi-isearch-next-buffer-function
368 'multi-isearch-next-file-buffer-from-list) 368 'multi-isearch-next-file-buffer-from-list))
369 (multi-isearch-file-list (mapcar #'expand-file-name files))) 369 (setq multi-isearch-file-list (mapcar #'expand-file-name files))
370 (find-file (car multi-isearch-file-list)) 370 (find-file (car multi-isearch-file-list))
371 (goto-char (if isearch-forward (point-min) (point-max))) 371 (goto-char (if isearch-forward (point-min) (point-max)))
372 (isearch-forward-regexp))) 372 (isearch-forward-regexp nil t)))
373 373
374 374
375(provide 'multi-isearch) 375(provide 'multi-isearch)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 9d1c3a26949..8355ce1fb3c 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -418,7 +418,8 @@ word(s) will be searched for via `eww-search-prefix'."
418 418
419 (easy-menu-define nil map "" 419 (easy-menu-define nil map ""
420 '("Eww" 420 '("Eww"
421 ["Quit" eww-quit t] 421 ["Exit" eww-quit t]
422 ["Close browser" quit-window t]
422 ["Reload" eww-reload t] 423 ["Reload" eww-reload t]
423 ["Back to previous page" eww-back-url 424 ["Back to previous page" eww-back-url
424 :active (not (zerop (length eww-history)))] 425 :active (not (zerop (length eww-history)))]
@@ -429,7 +430,7 @@ word(s) will be searched for via `eww-search-prefix'."
429 ["View page source" eww-view-source] 430 ["View page source" eww-view-source]
430 ["Copy page URL" eww-copy-page-url t] 431 ["Copy page URL" eww-copy-page-url t]
431 ["Add bookmark" eww-add-bookmark t] 432 ["Add bookmark" eww-add-bookmark t]
432 ["List bookmarks" eww-copy-page-url t] 433 ["List bookmarks" eww-list-bookmarks t]
433 ["List cookies" url-cookie-list t])) 434 ["List cookies" url-cookie-list t]))
434 map)) 435 map))
435 436
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 778659c0de4..d551d0ddb57 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -528,8 +528,14 @@ Non-nil means always go to the next Octave code line after sending."
528Octave is a high-level language, primarily intended for numerical 528Octave is a high-level language, primarily intended for numerical
529computations. It provides a convenient command line interface 529computations. It provides a convenient command line interface
530for solving linear and nonlinear problems numerically. Function 530for solving linear and nonlinear problems numerically. Function
531definitions can also be stored in files and used in batch mode." 531definitions can also be stored in files and used in batch mode.
532
533See Info node `(octave-mode) Using Octave Mode' for more details.
534
535Key bindings:
536\\{octave-mode-map}"
532 :abbrev-table octave-abbrev-table 537 :abbrev-table octave-abbrev-table
538 :group 'octave
533 539
534 (smie-setup octave-smie-grammar #'octave-smie-rules 540 (smie-setup octave-smie-grammar #'octave-smie-rules
535 :forward-token #'octave-smie-forward-token 541 :forward-token #'octave-smie-forward-token
@@ -705,8 +711,16 @@ in the Inferior Octave buffer.")
705 (process-live-p inferior-octave-process)) 711 (process-live-p inferior-octave-process))
706 712
707(define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" 713(define-derived-mode inferior-octave-mode comint-mode "Inferior Octave"
708 "Major mode for interacting with an inferior Octave process." 714 "Major mode for interacting with an inferior Octave process.
715
716See Info node `(octave-mode) Running Octave from Within Emacs' for more
717details.
718
719Key bindings:
720\\{inferior-octave-mode-map}"
709 :abbrev-table octave-abbrev-table 721 :abbrev-table octave-abbrev-table
722 :group 'octave
723
710 (setq comint-prompt-regexp inferior-octave-prompt) 724 (setq comint-prompt-regexp inferior-octave-prompt)
711 725
712 (setq-local comment-use-syntax t) 726 (setq-local comment-use-syntax t)
diff --git a/lisp/simple.el b/lisp/simple.el
index 260c1702def..af1139bb942 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7435,7 +7435,7 @@ See also `normal-erase-is-backspace'."
7435 (if enabled 7435 (if enabled
7436 (progn 7436 (progn
7437 (define-key local-function-key-map [delete] [deletechar]) 7437 (define-key local-function-key-map [delete] [deletechar])
7438 (define-key local-function-key-map [kp-delete] [?\C-d]) 7438 (define-key local-function-key-map [kp-delete] [deletechar])
7439 (define-key local-function-key-map [backspace] [?\C-?]) 7439 (define-key local-function-key-map [backspace] [?\C-?])
7440 (dolist (b bindings) 7440 (dolist (b bindings)
7441 ;; Not sure if input-decode-map is really right, but 7441 ;; Not sure if input-decode-map is really right, but