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

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

[elpa] 05/16: * packages/shen-mode/inf-shen.el: Don't require `cl'. (she


From: Stefan Monnier
Subject: [elpa] 05/16: * packages/shen-mode/inf-shen.el: Don't require `cl'. (shen-remember-functions): Avoid `flet'.
Date: Wed, 15 Oct 2014 21:05:55 +0000

monnier pushed a commit to branch master
in repository elpa.

commit 2697531dff25b20d47806b7ac145b3df2acd2121
Author: Stefan Monnier <address@hidden>
Date:   Wed Oct 15 16:31:22 2014 -0400

    * packages/shen-mode/inf-shen.el: Don't require `cl'.
    (shen-remember-functions): Avoid `flet'.
---
 packages/shen-mode/inf-shen.el |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/packages/shen-mode/inf-shen.el b/packages/shen-mode/inf-shen.el
index a27d082..bf554da 100644
--- a/packages/shen-mode/inf-shen.el
+++ b/packages/shen-mode/inf-shen.el
@@ -1,6 +1,6 @@
 ;;; inferior-shen-mode --- an inferior-shen mode
 
-;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2014 Free Software Foundation, Inc.
 
 ;; Authors: Michael Ilseman, Eric Schulte <address@hidden>
 ;; Version: 0.1
@@ -27,7 +27,6 @@
 ;; This file defines an inferior Shen mode.
 
 ;;; Code:
-(eval-when-compile (require 'cl))
 (require 'comint)
 (require 'shen-mode)
 
@@ -256,9 +255,9 @@ containing the shen source code about to be evaluated.")
 (defun shen-remember-functions (start end)
   "Add functions defined between START and END to `shen-functions'."
   (interactive "r")
-  (flet ((clean (text)
-                (when text
-                  (set-text-properties 0 (length text) nil text) text)))
+  (let ((clean (lambda (text)
+                 (when text
+                   (set-text-properties 0 (length text) nil text) text))))
     (save-excursion
       (goto-char start)
       (let ((re (concat
@@ -267,8 +266,8 @@ containing the shen source code about to be evaluated.")
                  "[\n\r]?[ \t]*\\({\\(.+\\)}\\)?"))) ; type
         (while (re-search-forward re end t)
           (let ((name (intern (match-string 1)))
-                (doc (clean (match-string 3)))
-                (type (clean (match-string 5))))
+                (doc (funcall clean (match-string 3)))
+                (type (funcall clean (match-string 5))))
             (add-to-list 'shen-functions (list name type doc))))))))
 
 (add-hook 'shen-pre-eval-hook #'shen-remember-functions)



reply via email to

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