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

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

[elpa] master 59010d0 2/7: remove example using `message' in a guard


From: Michael Heerdegen
Subject: [elpa] master 59010d0 2/7: remove example using `message' in a guard
Date: Thu, 31 Dec 2015 21:43:07 +0000

branch: master
commit 59010d078e49cd04d65c3fc306b01cfc2163516a
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

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

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 7d625f8..6e81c28 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/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]