From 2b3e2eaf50824264fed1299a55ee05f17d1841ef Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 3 Aug 1999 05:32:44 +0000 Subject: [PATCH] (compress-cited-prefix): Use `if' instead of `when'. (mu-cite-remove-text-properties): New macro for removing text properties under FSF Emacs from 19.7 to under 20.1. --- mu-cite.el | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/mu-cite.el b/mu-cite.el index ca8350c..19334ed 100644 --- a/mu-cite.el +++ b/mu-cite.el @@ -97,6 +97,20 @@ (function mu-cite/get-value) (function mu-cite-get-value)) +;;; @ macro +;;; + +(defmacro mu-cite-remove-text-properties (string) + "Remove text properties from STRING which is read from minibuffer." + (if (or (featurep 'xemacs) + (boundp 'minibuffer-allow-text-properties);; Emacs 20.1 or later. + (not (fboundp 'set-text-properties)));; under Emacs 19.7. + string + (` (let ((obj (copy-sequence (, string)))) + (set-text-properties 0 (length obj) nil obj) + obj)))) + + ;;; @ set up ;;; @@ -514,9 +528,11 @@ TABLE defaults to the current buffer's category table." pe (match-beginning 1) s (match-end 0))) i))) - (when (and ps (< ps pe)) - (delete-region b e) - (insert (concat (substring prefix ps pe) (make-string nest ?>)))) + (if (and ps (< ps pe)) + (progn + (delete-region b e) + (insert (concat (substring prefix ps pe) + (make-string nest ?>))))) )))) (defun replace-top-string (old new) -- 1.7.10.4