aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2020-03-07 07:50:28 -0800
committerGlenn Morris2020-03-07 07:50:28 -0800
commit3274b8090bf18dec00b6ce45d6a01bf5263982ed (patch)
tree51eefa044043b38e239e23049592a7e49808aa72 /lisp
parentc996fe1ec69de0082043397d4965d08cb94892fb (diff)
parent72f87f88739befce2adf202749b7d651a8ef1551 (diff)
downloademacs-3274b8090bf18dec00b6ce45d6a01bf5263982ed.tar.gz
emacs-3274b8090bf18dec00b6ce45d6a01bf5263982ed.zip
Merge from origin/emacs-27
72f87f8873 (origin/emacs-27) NS port documentation updates 5b19db98ad ; * etc/NEWS: correctly describe what fido-mode is fc47e3ad99 Let fido-mode users force a minibuffer-exit e734961d4c icomplete-fido-exit: New command for the M-j binding 335a9bd215 minibuffer-force-complete-and-exit: Allow input with no ma... 34132d4bf6 ; * etc/NEWS: Mark 2 entries as fully documented. d28b73841b ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender... d1d56a9fd9 ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum... fc4f4efabf ; * etc/NEWS: No need to document vc-hg and mergebase chan... 9e8456cf0f ; * etc/NEWS: No need to document changes in Octave mode. 25b4d6fa28 ; * etc/NEWS: No need to document changes in map.el and se... fc4d0f86da ; * etc/NEWS: No need to document Ido news. d4ac478cb3 ; * etc/NEWS: No need to document news of doc-view.el. 08c042bd26 Document that 'byte-compile-dynamic' is obsolete 512b66abd7 ; * etc/NEWS: No need to document 'goto-address-uri-scheme... 3103c01c3e ; * etc/NEWS: Formatting fixes. 98306fdfb8 ; * etc/NEWS: No need to document deprecation of 'cl'. 6281ed58be ; * etc/NEWS: No need to document the change in 'list-proc... e252341e11 ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'... ec5a267ddc ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo... 89307ebccd ; * etc/NEWS: Mark 'completion-common-part' face entry as ... fdbe7cacfb Document the changes in 'read-answer' 10c58356e4 Document changes in lexical-binding 5cb312b5b9 Update ERC mailing list address cb1877321b Use regexp-opt to define bibtex-autokey-transcriptions. (... 3f9c340de0 Improve documentation of 'table-generate-source' 33b31dc314 Attempt to avoid rare segfaults in show_mouse_face 88c6db9196 Avoid crashes when a fontset has strange entries 1814c7e158 Fix rx error with ? and ?? 40fb20061e * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err... 08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-t... cb1e30910e Have pulse.el preserve existing overlay priorities # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/pulse.el2
-rw-r--r--lisp/emacs-lisp/rx.el4
-rw-r--r--lisp/erc/erc.el2
-rw-r--r--lisp/icomplete.el15
-rw-r--r--lisp/minibuffer.el11
-rw-r--r--lisp/textmodes/bibtex.el50
-rw-r--r--lisp/textmodes/table.el21
-rw-r--r--lisp/window.el4
8 files changed, 68 insertions, 41 deletions
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 5713a7b0d1f..16243e16b45 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -181,6 +181,7 @@ Optional argument FACE specifies the face to do the highlighting."
181 (overlay-put o 'original-face (overlay-get o 'face)) 181 (overlay-put o 'original-face (overlay-get o 'face))
182 ;; Make this overlay take priority over the `transient-mark-mode' 182 ;; Make this overlay take priority over the `transient-mark-mode'
183 ;; overlay. 183 ;; overlay.
184 (overlay-put o 'original-priority (overlay-get o 'priority))
184 (overlay-put o 'priority 1) 185 (overlay-put o 'priority 1)
185 (setq pulse-momentary-overlay o) 186 (setq pulse-momentary-overlay o)
186 (if (eq pulse-flag 'never) 187 (if (eq pulse-flag 'never)
@@ -214,6 +215,7 @@ Optional argument FACE specifies the face to do the highlighting."
214 (let ((ol pulse-momentary-overlay)) 215 (let ((ol pulse-momentary-overlay))
215 (overlay-put ol 'face (overlay-get ol 'original-face)) 216 (overlay-put ol 'face (overlay-get ol 'original-face))
216 (overlay-put ol 'original-face nil) 217 (overlay-put ol 'original-face nil)
218 (overlay-put ol 'priority (overlay-get ol 'original-priority))
217 ;; Clear the overlay if it needs deleting. 219 ;; Clear the overlay if it needs deleting.
218 (when (overlay-get ol 'pulse-delete) (delete-overlay ol))) 220 (when (overlay-get ol 'pulse-delete) (delete-overlay ol)))
219 221
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index a0b2444346a..aa4b2addd47 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -134,7 +134,7 @@ Each entry is:
134 (if (cdr def) 134 (if (cdr def)
135 (error "Not an `rx' symbol definition: %s" form) 135 (error "Not an `rx' symbol definition: %s" form)
136 (car def))))) 136 (car def)))))
137 ((consp form) 137 ((and (consp form) (symbolp (car form)))
138 (let* ((op (car form)) 138 (let* ((op (car form))
139 (def (rx--lookup-def op))) 139 (def (rx--lookup-def op)))
140 (and def 140 (and def
@@ -360,7 +360,7 @@ character X becomes (?X . ?X). Return the intervals in a list."
360 (push (cons start end) intervals)) 360 (push (cons start end) intervals))
361 (t 361 (t
362 (error "Invalid rx `any' range: %s" 362 (error "Invalid rx `any' range: %s"
363 (substring str i 3)))) 363 (substring str i (+ i 3)))))
364 (setq i (+ i 3)))) 364 (setq i (+ i 3))))
365 (t 365 (t
366 ;; Single character. 366 ;; Single character.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a46755153e3..81325df3f4f 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -75,7 +75,7 @@
75(eval-when-compile (require 'subr-x)) 75(eval-when-compile (require 'subr-x))
76 76
77(defvar erc-official-location 77(defvar erc-official-location
78 "https://www.emacswiki.org/emacs/ERC (mailing list: erc-discuss@gnu.org)" 78 "https://www.emacswiki.org/emacs/ERC (mailing list: emacs-erc@gnu.org)"
79 "Location of the ERC client on the Internet.") 79 "Location of the ERC client on the Internet.")
80 80
81(defgroup erc nil 81(defgroup erc nil
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index a1a67e2330a..66bc731f67f 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -284,6 +284,17 @@ require user confirmation."
284 (t 284 (t
285 (icomplete-force-complete-and-exit))))) 285 (icomplete-force-complete-and-exit)))))
286 286
287(defun icomplete-fido-exit (force)
288 "Attempt to exit minibuffer immediately with current input.
289Unless FORCE is non-nil (interactively with a prefix argument),
290honour a non-nil REQUIRE-MATCH argument to `completing-read' by
291trying to complete as much as possible and disallowing the exit
292if that doesn't produce a completion match."
293 (interactive "P")
294 (if (and (not force) minibuffer--require-match)
295 (minibuffer-complete-and-exit)
296 (exit-minibuffer)))
297
287(defun icomplete-fido-backward-updir () 298(defun icomplete-fido-backward-updir ()
288 "Delete char before or go up directory, like `ido-mode'." 299 "Delete char before or go up directory, like `ido-mode'."
289 (interactive) 300 (interactive)
@@ -299,7 +310,7 @@ require user confirmation."
299 (define-key map (kbd "RET") 'icomplete-fido-ret) 310 (define-key map (kbd "RET") 'icomplete-fido-ret)
300 (define-key map (kbd "C-m") 'icomplete-fido-ret) 311 (define-key map (kbd "C-m") 'icomplete-fido-ret)
301 (define-key map (kbd "DEL") 'icomplete-fido-backward-updir) 312 (define-key map (kbd "DEL") 'icomplete-fido-backward-updir)
302 (define-key map (kbd "M-j") 'exit-minibuffer) 313 (define-key map (kbd "M-j") 'icomplete-fido-exit)
303 (define-key map (kbd "C-s") 'icomplete-forward-completions) 314 (define-key map (kbd "C-s") 'icomplete-forward-completions)
304 (define-key map (kbd "C-r") 'icomplete-backward-completions) 315 (define-key map (kbd "C-r") 'icomplete-backward-completions)
305 (define-key map (kbd "<right>") 'icomplete-forward-completions) 316 (define-key map (kbd "<right>") 'icomplete-forward-completions)
@@ -541,7 +552,7 @@ See `icomplete-mode' and `minibuffer-setup-hook'."
541 (icomplete--completion-table) 552 (icomplete--completion-table)
542 (icomplete--completion-predicate) 553 (icomplete--completion-predicate)
543 (if (window-minibuffer-p) 554 (if (window-minibuffer-p)
544 (not minibuffer-completion-confirm))))) 555 (eq minibuffer--require-match t)))))
545 (buffer-undo-list t) 556 (buffer-undo-list t)
546 deactivate-mark) 557 deactivate-mark)
547 ;; Do nothing if while-no-input was aborted. 558 ;; Do nothing if while-no-input was aborted.
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 49daabc44e3..7f5b597542a 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1400,7 +1400,11 @@ scroll the window of possible completions."
1400 (minibuffer-prompt-end) (point-max) #'exit-minibuffer 1400 (minibuffer-prompt-end) (point-max) #'exit-minibuffer
1401 ;; If the previous completion completed to an element which fails 1401 ;; If the previous completion completed to an element which fails
1402 ;; test-completion, then we shouldn't exit, but that should be rare. 1402 ;; test-completion, then we shouldn't exit, but that should be rare.
1403 (lambda () (minibuffer-message "Incomplete")))) 1403 (lambda ()
1404 (if minibuffer--require-match
1405 (minibuffer-message "Incomplete")
1406 ;; If a match is not required, exit after all.
1407 (exit-minibuffer)))))
1404 1408
1405(defun minibuffer-force-complete (&optional start end dont-cycle) 1409(defun minibuffer-force-complete (&optional start end dont-cycle)
1406 "Complete the minibuffer to an exact match. 1410 "Complete the minibuffer to an exact match.
@@ -1464,6 +1468,9 @@ DONT-CYCLE tells the function not to setup cycling."
1464 "List of commands which cause an immediately following 1468 "List of commands which cause an immediately following
1465`minibuffer-complete-and-exit' to ask for extra confirmation.") 1469`minibuffer-complete-and-exit' to ask for extra confirmation.")
1466 1470
1471(defvar minibuffer--require-match nil
1472 "Value of REQUIRE-MATCH passed to `completing-read'.")
1473
1467(defun minibuffer-complete-and-exit () 1474(defun minibuffer-complete-and-exit ()
1468 "Exit if the minibuffer contains a valid completion. 1475 "Exit if the minibuffer contains a valid completion.
1469Otherwise, try to complete the minibuffer contents. If 1476Otherwise, try to complete the minibuffer contents. If
@@ -3748,8 +3755,10 @@ See `completing-read' for the meaning of the arguments."
3748 3755
3749 (let* ((minibuffer-completion-table collection) 3756 (let* ((minibuffer-completion-table collection)
3750 (minibuffer-completion-predicate predicate) 3757 (minibuffer-completion-predicate predicate)
3758 ;; FIXME: Remove/rename this var, see the next one.
3751 (minibuffer-completion-confirm (unless (eq require-match t) 3759 (minibuffer-completion-confirm (unless (eq require-match t)
3752 require-match)) 3760 require-match))
3761 (minibuffer--require-match require-match)
3753 (base-keymap (if require-match 3762 (base-keymap (if require-match
3754 minibuffer-local-must-match-map 3763 minibuffer-local-must-match-map
3755 minibuffer-local-completion-map)) 3764 minibuffer-local-completion-map))
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index a7be57e5a3f..670e763814c 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1006,32 +1006,36 @@ See `bibtex-generate-autokey' for details."
1006 :type 'boolean) 1006 :type 'boolean)
1007 1007
1008(defvar bibtex-autokey-transcriptions 1008(defvar bibtex-autokey-transcriptions
1009 '(;; language specific characters 1009 (nconc
1010 ("\\\\aa" . "a") ; \aa -> a 1010 (mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a)))
1011 ("\\\\AA" . "A") ; \AA -> A 1011 '(;; language specific characters
1012 ("\\\"a\\|\\\\\\\"a\\|\\\\ae" . "ae") ; "a,\"a,\ae -> ae 1012 (("\\aa") . "a") ; \aa -> a
1013 ("\\\"A\\|\\\\\\\"A\\|\\\\AE" . "Ae") ; "A,\"A,\AE -> Ae 1013 (("\\AA") . "A") ; \AA -> A
1014 ("\\\\i" . "i") ; \i -> i 1014 (("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae
1015 ("\\\\j" . "j") ; \j -> j 1015 (("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae
1016 ("\\\\l" . "l") ; \l -> l 1016 (("\\i") . "i") ; \i -> i
1017 ("\\\\L" . "L") ; \L -> L 1017 (("\\j") . "j") ; \j -> j
1018 ("\\\"o\\|\\\\\\\"o\\|\\\\o\\|\\\\oe" . "oe") ; "o,\"o,\o,\oe -> oe 1018 (("\\l") . "l") ; \l -> l
1019 ("\\\"O\\|\\\\\\\"O\\|\\\\O\\|\\\\OE" . "Oe") ; "O,\"O,\O,\OE -> Oe 1019 (("\\L") . "L") ; \L -> L
1020 ("\\\"s\\|\\\\\\\"s\\|\\\\3" . "ss") ; "s,\"s,\3 -> ss 1020 (("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe
1021 ("\\\"u\\|\\\\\\\"u" . "ue") ; "u,\"u -> ue 1021 (("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe
1022 ("\\\"U\\|\\\\\\\"U" . "Ue") ; "U,\"U -> Ue 1022 (("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss
1023 ;; accents 1023 (("\"u" "\\\"u") . "ue") ; "u,\"u -> ue
1024 ("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" . "") 1024 (("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue
1025 ;; braces, quotes, concatenation. 1025 ;; hyphen, accents
1026 ("[`'\"{}#]" . "") 1026 (("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v"
1027 ("\\\\-" . "") ; \- -> 1027 "\\H" "\\t" "\\c" "\\d" "\\b") . "")
1028 ;; spaces 1028 ;; space
1029 ("\\\\?[ \t\n]+\\|~" . " ")) 1029 (("~") . " ")))
1030 ;; more spaces
1031 '(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ")
1032 ;; braces, quotes, concatenation.
1033 ("[`'\"{}#]" . "")))
1030 "Alist of (OLD-REGEXP . NEW-STRING) pairs. 1034 "Alist of (OLD-REGEXP . NEW-STRING) pairs.
1031Used by the default values of `bibtex-autokey-name-change-strings' and 1035Used as default values of `bibtex-autokey-name-change-strings' and
1032`bibtex-autokey-titleword-change-strings'. Defaults to translating some 1036`bibtex-autokey-titleword-change-strings'. Defaults to translating some
1033language specific characters to their ASCII transcriptions, and 1037language specific characters to their ASCII transcriptions, and
1034removing any character accents.") 1038removing any accent characters.")
1035 1039
1036(defcustom bibtex-autokey-name-change-strings 1040(defcustom bibtex-autokey-name-change-strings
1037 bibtex-autokey-transcriptions 1041 bibtex-autokey-transcriptions
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 7f87ee3646d..33f181b80c3 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -2914,16 +2914,17 @@ WHERE is provided the cell and table at that location is reported."
2914(defun table-generate-source (language &optional dest-buffer caption) 2914(defun table-generate-source (language &optional dest-buffer caption)
2915 "Generate source of the current table in the specified language. 2915 "Generate source of the current table in the specified language.
2916LANGUAGE is a symbol that specifies the language to describe the 2916LANGUAGE is a symbol that specifies the language to describe the
2917structure of the table. It must be either `html', `latex' or `cals'. 2917structure of the table. It must be either `html', `latex', `cals',
2918The resulted source text is inserted into DEST-BUFFER and the buffer 2918`wiki', or `mediawiki'.
2919object is returned. When DEST-BUFFER is omitted or nil the default 2919The function inserts the resulting source text into DEST-BUFFER, and
2920buffer specified in `table-dest-buffer-name' is used. In this case 2920returns the buffer object. When DEST-BUFFER is omitted or nil, the
2921the content of the default buffer is erased prior to the generation. 2921function uses the default buffer specified in `table-dest-buffer-name'.
2922When DEST-BUFFER is non-nil it is expected to be either a destination 2922In this case, the function erases the default buffer prior to the
2923buffer or a name of the destination buffer. In this case the 2923source generation.
2924generated result is inserted at the current point in the destination 2924When DEST-BUFFER is non-nil, it should be either a destination
2925buffer and the previously existing contents in the buffer are 2925buffer or a name of the destination buffer. In that case, the
2926untouched. 2926function inserts the generated result at point in the destination
2927buffer, and leaves the previous contents of the buffer untouched.
2927 2928
2928References used for this implementation: 2929References used for this implementation:
2929 2930
diff --git a/lisp/window.el b/lisp/window.el
index bbd4e9b6dfc..5824b1cb845 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9125,8 +9125,8 @@ accessible position."
9125 ;; wider than its frame's pixel width, its height 9125 ;; wider than its frame's pixel width, its height
9126 ;; remains unaltered. 9126 ;; remains unaltered.
9127 (width (+ (car (window-text-pixel-size 9127 (width (+ (car (window-text-pixel-size
9128 window (window-start) (point-max) 9128 window (window-start window) nil
9129 (frame-pixel-width) 9129 (frame-pixel-width (window-frame window))
9130 ;; Add one line-height to assure that 9130 ;; Add one line-height to assure that
9131 ;; we're on the safe side. This 9131 ;; we're on the safe side. This
9132 ;; overshoots when the first line below 9132 ;; overshoots when the first line below