From: yamaoka Date: Tue, 3 Aug 1999 05:32:44 +0000 (+0000) Subject: (compress-cited-prefix): Use `if' instead of `when'. X-Git-Tag: mu-cite-8_0~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b3e2eaf50824264fed1299a55ee05f17d1841ef;p=elisp%2Fmu-cite.git (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. --- 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)