From 03dd4e7c674eee10c61c1ae683d6ea41b8d24258 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Thu, 17 Mar 2016 00:06:42 +0100 Subject: [PATCH] Comment and whitespace changes only --- packages/el-search/el-search.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 26857efdb..9f115e09d 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/el-search.el @@ -65,7 +65,7 @@ ;; `(defvar ,_) ;; ;; you search for all defvar forms that don't specify an init value. -;; +;; ;; The following will search for defvar forms with a docstring whose ;; first line is longer than 70 characters: ;; @@ -163,7 +163,7 @@ ;; (define-key isearch-mode-map [(control ?%)] #'el-search-replace-from-isearch) ;; ;; The bindings in `isearch-mode-map' let you conveniently switch to -;; elisp searching from isearch. +;; "el-search" searching from isearch. ;; ;; ;; Bugs, Known Limitations @@ -185,6 +185,8 @@ ;; ;; the comment will be lost. ;; +;; FIXME: when we have resumable sessions, pause and warn about this case. +;; ;; ;; Acknowledgments ;; =============== @@ -195,9 +197,13 @@ ;; TODO: ;; ;; - detect infloops when replacing automatically (e.g. for 1 -> '(1)) +;; Should we just fall back to interactive mode? ;; ;; - implement backward searching ;; +;; - Make `el-search-pattern' accept an &optional limit, at least for +;; the non-interactive use case? +;; ;; - improve docstrings ;; ;; - handle more reader syntaxes, e.g. #n, #n# @@ -345,6 +351,7 @@ error." Don't move if already at beginning of a sexp. Point must not be inside a string or comment. `read' the expression at that point and return it." + ;; This doesn't catch end-of-buffer to keep the return value non-ambiguous (let ((not-done t) res) (while not-done (let ((stop-here nil) @@ -680,7 +687,7 @@ of any kind matched by all PATTERNs are also matched. ((null (cdr patterns)) (let ((pattern (car patterns))) `(app ,(apply-partially #'el-search--contains-p (el-search--matcher pattern)) - (,'\` (t (,'\, ,pattern)))))) + (,'\` (t (,'\, ,pattern)))))) (t `(and ,@(mapcar (lambda (pattern) `(contains ,pattern)) patterns))))) (el-search-defpattern not (pattern) @@ -1003,7 +1010,7 @@ Hit any key to proceed." nil) ((or ?q ?\C-g) (setq done t) - t) + t) (?? (ignore (read-char el-search-search-and-replace-help-string)) nil))))) (unless (or done (eobp)) (el-search--skip-expression nil t))))) -- 2.39.2