From: Dave Love Date: Mon, 18 Oct 1999 21:28:04 +0000 (+0000) Subject: (add-abbrev, inverse-add-abbrev, expand-region-abbrevs): Remove X-Git-Tag: emacs-pretest-21.0.90~6392 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=34f3cd03ec6f76c90f28c0b21048e08514e8dfd8;p=emacs.git (add-abbrev, inverse-add-abbrev, expand-region-abbrevs): Remove properties from buffer text. --- diff --git a/lisp/abbrev.el b/lisp/abbrev.el index c6133be034f..83d4a86a2d7 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -225,7 +225,7 @@ Don't use this function in a Lisp program; use `define-abbrev' instead." (defun add-abbrev (table type arg) (let ((exp (and (>= arg 0) - (buffer-substring + (buffer-substring-no-properties (point) (if (= arg 0) (mark) (save-excursion (forward-word (- arg)) (point)))))) @@ -266,8 +266,8 @@ Expands the abbreviation after defining it." (let (name nameloc exp) (save-excursion (forward-word (- arg)) - (setq name (buffer-substring (point) (progn (forward-word 1) - (setq nameloc (point)))))) + (setq name (buffer-substring-no-properties + (point) (progn (forward-word 1) (setq nameloc (point)))))) (set-text-properties 0 (length name) nil name) (setq exp (read-string (format "%s expansion for \"%s\": " type name) nil nil nil t)) @@ -306,7 +306,7 @@ If called from a Lisp program, arguments are START END &optional NOQUERY." (<= (setq pnt (point)) (- (point-max) lim)))) (if (abbrev-expansion (setq string - (buffer-substring + (buffer-substring-no-properties (save-excursion (forward-word -1) (point)) pnt))) (if (or noquery (y-or-n-p (format "Expand `%s'? " string)))