]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el (isearch-mode-map): Restore advertised bindings.
authorJuri Linkov <juri@linkov.net>
Thu, 19 Apr 2018 19:45:08 +0000 (22:45 +0300)
committerJuri Linkov <juri@linkov.net>
Thu, 19 Apr 2018 19:45:08 +0000 (22:45 +0300)
Remove obsolete comments and code.

* lisp/replace.el (occur-find-match): Use user-error instead of error.
(Bug#14912)

lisp/isearch.el
lisp/replace.el

index 15a15436f7c7d1df6eb5c554293b7e629857e8f0..e0066942f99a8abeb5c854046333eff4f6e8d169 100644 (file)
@@ -525,6 +525,8 @@ This is like `describe-bindings', but displays only Isearch keys."
     (define-key map "\M-r" 'isearch-toggle-regexp)
     (define-key map "\M-e" 'isearch-edit-string)
 
+    (put 'isearch-toggle-case-fold :advertised-binding "\M-sc")
+    (put 'isearch-toggle-regexp    :advertised-binding "\M-sr")
     (put 'isearch-edit-string      :advertised-binding "\M-se")
 
     (define-key map "\M-se" 'isearch-edit-string)
@@ -1129,15 +1131,6 @@ REGEXP if non-nil says use the regexp search ring."
    string
    (if regexp regexp-search-ring-max search-ring-max)))
 
-;; Switching buffers should first terminate isearch-mode.
-;; ;; For Emacs 19, the frame switch event is handled.
-;; (defun isearch-switch-frame-handler ()
-;;   (interactive) ;; Is this necessary?
-;;   ;; First terminate isearch-mode.
-;;   (isearch-done)
-;;   (isearch-clean-overlays)
-;;   (handle-switch-frame (car (cdr last-command-event))))
-
 \f
 ;; The search status structure and stack.
 
@@ -1577,7 +1570,6 @@ Turning on word search turns off regexp mode.")
 Turning on symbol search turns off regexp mode.")
 (isearch-define-mode-toggle char-fold "'" char-fold-to-regexp "\
 Turning on character-folding turns off regexp mode.")
-(put 'char-fold-to-regexp 'isearch-message-prefix "char-fold ")
 
 (isearch-define-mode-toggle regexp "r" nil nil
   (setq isearch-regexp (not isearch-regexp))
@@ -1776,8 +1768,6 @@ the beginning or the end of the string need not match a symbol boundary."
         (if (string-match-p (format "%s\\'" not-word-symbol-re) string) not-word-symbol-re
           (unless lax "\\_>")))))))
 
-(put 'isearch-symbol-regexp 'isearch-message-prefix "symbol ")
-
 ;; Search with lax whitespace
 
 (defun search-forward-lax-whitespace (string &optional bound noerror count)
@@ -2938,8 +2928,6 @@ Optional third argument, if t, means if fail just return nil (no error).
       (funcall  (overlay-get ov 'isearch-open-invisible-temporary)  ov nil)
     ;; Store the values for the `invisible' property, and then set it to nil.
     ;; This way the text hidden by this overlay becomes visible.
-
-    ;; In 19.34 this does not exist so I cannot test it.
     (overlay-put ov 'isearch-invisible (overlay-get ov 'invisible))
     (overlay-put ov 'invisible nil)))
 
index ebdf99d6eb80e5458f648c2b8009cf57d9497e5d..7f3541d7735d790fa9ba1c5ce1d9bc7090b0de64 100644 (file)
@@ -1258,7 +1258,7 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]."
            (setq r (funcall search r 'occur-match)))
       (if r
           (goto-char r)
-        (error message))
+        (user-error message))
       (setq n (1- n)))))
 
 (defun occur-next (&optional n)