emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/el-search d97f8fe 052/332: remove example using `messag


From: Stefan Monnier
Subject: [elpa] externals/el-search d97f8fe 052/332: remove example using `message' in a guard
Date: Tue, 1 Dec 2020 15:48:09 -0500 (EST)

branch: externals/el-search
commit d97f8fe1a21c05e2ab08590841094a47f8d4074b
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    remove example using `message' in a guard
---
 el-search.el | 31 ++-----------------------------
 1 file changed, 2 insertions(+), 29 deletions(-)

diff --git a/el-search.el b/el-search.el
index 7d625f8..6e81c28 100644
--- a/el-search.el
+++ b/el-search.el
@@ -77,34 +77,6 @@
 ;; with point at the beginning of the currently tested expression.
 ;;
 ;;
-;; Example 3:
-;;
-;; I can be useful to use (guard EXP) patterns for side effects (note:
-;; this only works when applied to the top level expression).
-;;
-;; The following pattern will search for symbols defined in any
-;; library whose name starts with "cl".  As a side effect, it prints
-;; the current line number, whether we have a macro or a function, and
-;; the defining file in the echo area for each match:
-;;
-;;   (and (pred symbolp)
-;;        (let file (symbol-file exp))
-;;        (guard file)
-;;        (let lib-name (file-name-sans-extension
-;;                       (file-name-nondirectory file)))
-;;        (guard (string-match-p "^cl" lib-name))
-;;        (or (and (pred macrop)    (let type "macro "))
-;;            (and (pred functionp) (let type "function "))
-;;            (let type ""))
-;;        (guard (message "Line %d: %s`%S' (from \"%s\")"
-;;                        (line-number-at-pos)
-;;                        type
-;;                        exp
-;;                        lib-name)))
-;;
-;; `message' never returns nil, so the last `guard' always "matches".
-;;
-;;
 ;; Convenience
 ;; ===========
 ;;
@@ -114,7 +86,8 @@
 ;; so that you can always refer to the whole currently tested
 ;; expression via the variable `exp'.
 ;;
-;; Example 4:
+;;
+;; Example 3:
 ;;
 ;; If you want to search a buffer for symbols that are defined in
 ;; "cl-lib", you can use this pattern



reply via email to

[Prev in Thread] Current Thread [Next in Thread]