diff options
| author | Paul Eggert | 2016-03-22 11:04:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-03-22 11:04:37 -0700 |
| commit | d2ea891fca9d78553426f202ae6e1dd0047f693f (patch) | |
| tree | f6c43b1f10e9db32b89de9c3c809a0f8699224f4 | |
| parent | 656058b790c285aa037a772f752c1446e7423ba2 (diff) | |
| parent | 91e667692ba1362ca1334b8d58fd16c305ad5e2a (diff) | |
| download | emacs-d2ea891fca9d78553426f202ae6e1dd0047f693f.tar.gz emacs-d2ea891fca9d78553426f202ae6e1dd0047f693f.zip | |
Merge from origin/emacs-25
91e6676 Fix an Isearch var to be a string (Bug#23038)
76ef522 Fix (args-out-of-range 1) error in cursor-sensor--detect
| -rw-r--r-- | lisp/emacs-lisp/cursor-sensor.el | 2 | ||||
| -rw-r--r-- | lisp/isearch.el | 19 |
2 files changed, 12 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index ac063d4896a..f1ab82ecc4a 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el | |||
| @@ -113,7 +113,7 @@ | |||
| 113 | ;; non-sticky on both ends, but that means get-pos-property might | 113 | ;; non-sticky on both ends, but that means get-pos-property might |
| 114 | ;; never see it. | 114 | ;; never see it. |
| 115 | (new (or (get-char-property point 'cursor-sensor-functions) | 115 | (new (or (get-char-property point 'cursor-sensor-functions) |
| 116 | (unless (= point 1) | 116 | (unless (bobp) |
| 117 | (get-char-property (1- point) 'cursor-sensor-functions)))) | 117 | (get-char-property (1- point) 'cursor-sensor-functions)))) |
| 118 | (old (window-parameter window 'cursor-sensor--last-state)) | 118 | (old (window-parameter window 'cursor-sensor--last-state)) |
| 119 | (oldposmark (car old)) | 119 | (oldposmark (car old)) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 988503eaa4f..48354d39d48 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -2585,16 +2585,19 @@ the word mode." | |||
| 2585 | (eq search-default-mode isearch-regexp))) "") | 2585 | (eq search-default-mode isearch-regexp))) "") |
| 2586 | ;; 2. Use the `isearch-message-prefix' set for | 2586 | ;; 2. Use the `isearch-message-prefix' set for |
| 2587 | ;; `regexp-function' if available. | 2587 | ;; `regexp-function' if available. |
| 2588 | (regexp-function | 2588 | (regexp-function |
| 2589 | (and (symbolp regexp-function) | 2589 | (and (symbolp regexp-function) |
| 2590 | (or (get regexp-function 'isearch-message-prefix) | 2590 | (or (get regexp-function 'isearch-message-prefix) |
| 2591 | ""))) | 2591 | ""))) |
| 2592 | ;; 3. Else if `isearch-regexp' is non-nil, set description | 2592 | ;; 3. Else if `isearch-regexp' is non-nil, set description |
| 2593 | ;; to "regexp ". | 2593 | ;; to "regexp ". |
| 2594 | (isearch-regexp "regexp ") | 2594 | (isearch-regexp "regexp ") |
| 2595 | ;; 4. And finally, if we're in literal mode (and if the | 2595 | ;; 4. Else if we're in literal mode (and if the default |
| 2596 | ;; default mode is also not literal), describe it. | 2596 | ;; mode is also not literal), describe it. |
| 2597 | ((functionp search-default-mode) "literal ")))) | 2597 | ((functionp search-default-mode) "literal ") |
| 2598 | ;; 5. And finally, if none of the above is true, set the | ||
| 2599 | ;; description to an empty string. | ||
| 2600 | (t "")))) | ||
| 2598 | (if space-before | 2601 | (if space-before |
| 2599 | ;; Move space from the end to the beginning. | 2602 | ;; Move space from the end to the beginning. |
| 2600 | (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description) | 2603 | (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description) |