]> code.delx.au - gnu-emacs/commitdiff
Merge from origin/emacs-25
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 18:04:37 +0000 (11:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 18:04:37 +0000 (11:04 -0700)
91e6676 Fix an Isearch var to be a string (Bug#23038)
76ef522 Fix (args-out-of-range 1) error in cursor-sensor--detect

lisp/emacs-lisp/cursor-sensor.el
lisp/isearch.el

index ac063d4896ad13fe720707c4d7d37044b99a2133..f1ab82ecc4a2dde0934bdb16e590fc542f46b230 100644 (file)
            ;; non-sticky on both ends, but that means get-pos-property might
            ;; never see it.
            (new (or (get-char-property point 'cursor-sensor-functions)
-                    (unless (= point 1)
+                    (unless (bobp)
                       (get-char-property (1- point) 'cursor-sensor-functions))))
            (old (window-parameter window 'cursor-sensor--last-state))
            (oldposmark (car old))
index 988503eaa4f11c8343775c31e244664fca1d4950..48354d39d48f3026b05df33d1799fec1b762cbac 100644 (file)
@@ -2585,16 +2585,19 @@ the word mode."
                     (eq search-default-mode isearch-regexp))) "")
           ;; 2. Use the `isearch-message-prefix' set for
           ;;    `regexp-function' if available.
-               (regexp-function
-                (and (symbolp regexp-function)
-                     (or (get regexp-function 'isearch-message-prefix)
-                         "")))
+          (regexp-function
+           (and (symbolp regexp-function)
+                (or (get regexp-function 'isearch-message-prefix)
+                    "")))
           ;; 3. Else if `isearch-regexp' is non-nil, set description
           ;;    to "regexp ".
-               (isearch-regexp "regexp ")
-          ;; 4. And finally, if we're in literal mode (and if the
-          ;;    default mode is also not literal), describe it.
-               ((functionp search-default-mode) "literal "))))
+          (isearch-regexp "regexp ")
+          ;; 4. Else if we're in literal mode (and if the default
+          ;;    mode is also not literal), describe it.
+          ((functionp search-default-mode) "literal ")
+          ;; 5. And finally, if none of the above is true, set the
+          ;;    description to an empty string.
+          (t ""))))
     (if space-before
         ;; Move space from the end to the beginning.
         (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)