X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=poe-18.el;h=2b5ff053792b5fecb91622b8327006c153c3dff4;hb=587e61de5605a5e3bdeff75be6853a5e2dcfb583;hp=edba3e069877785631ed4d95160d09d68bcc5b92;hpb=49556b1eb338487d82a3c463aa583e9d13fda6b2;p=elisp%2Fapel.git diff --git a/poe-18.el b/poe-18.el index edba3e0..2b5ff05 100644 --- a/poe-18.el +++ b/poe-18.el @@ -51,14 +51,16 @@ ;;; @ Compilation. ;;; -(defun defalias (sym newdef) - "Set SYMBOL's function definition to NEWVAL, and return NEWVAL. -Associates the function with the current load file, if any." - (fset sym newdef)) +(defun defalias (symbol definition) + "Set SYMBOL's function definition to DEFINITION, and return DEFINITION. +Associates the function with the current load file, if any. + +This emulating function does not support load-history feature." + (fset symbol definition)) (defun byte-code-function-p (object) "Return t if OBJECT is a byte-compiled function object." - (and (consp object) + (and (consp object) (consp (cdr object)) (let ((rest (cdr (cdr object))) elt) (if (stringp (car rest)) @@ -476,7 +478,17 @@ With optional non-nil ALL, force redisplay of all mode-lines." (if all (save-excursion (set-buffer (other-buffer)))) (set-buffer-modified-p (buffer-modified-p))) -;; (defalias 'save-match-data 'store-match-data) +(defalias 'set-match-data 'store-match-data) + +(defvar save-match-data-internal) + +;; We use save-match-data-internal as the local variable because +;; that works ok in practice (people should not use that variable elsewhere). +(defmacro save-match-data (&rest body) + "Execute the BODY forms, restoring the global value of the match data." + (` (let ((save-match-data-internal (match-data))) + (unwind-protect (progn (,@ body)) + (set-match-data save-match-data-internal))))) ;;; @ Basic editing commands. @@ -613,7 +625,7 @@ If NOSORT is dummy for compatibility." (defun previous-property-change (position &optional object limit)) (defun previous-single-property-change (position prop &optional object limit)) (defun add-text-properties (start end properties &optional object)) -(defun put-text-properties (start end property &optional object)) +(defun put-text-property (start end property &optional object)) (defun set-text-properties (start end properties &optional object)) (defun remove-text-properties (start end properties &optional object)) (defun text-property-any (start end property value &optional object))