Commit 34f3cd03 authored by Dave Love's avatar Dave Love
Browse files

(add-abbrev, inverse-add-abbrev, expand-region-abbrevs): Remove

properties from buffer text.
parent 238b647a
...@@ -225,7 +225,7 @@ Don't use this function in a Lisp program; use `define-abbrev' instead." ...@@ -225,7 +225,7 @@ Don't use this function in a Lisp program; use `define-abbrev' instead."
(defun add-abbrev (table type arg) (defun add-abbrev (table type arg)
(let ((exp (and (>= arg 0) (let ((exp (and (>= arg 0)
(buffer-substring (buffer-substring-no-properties
(point) (point)
(if (= arg 0) (mark) (if (= arg 0) (mark)
(save-excursion (forward-word (- arg)) (point)))))) (save-excursion (forward-word (- arg)) (point))))))
...@@ -266,8 +266,8 @@ Expands the abbreviation after defining it." ...@@ -266,8 +266,8 @@ Expands the abbreviation after defining it."
(let (name nameloc exp) (let (name nameloc exp)
(save-excursion (save-excursion
(forward-word (- arg)) (forward-word (- arg))
(setq name (buffer-substring (point) (progn (forward-word 1) (setq name (buffer-substring-no-properties
(setq nameloc (point)))))) (point) (progn (forward-word 1) (setq nameloc (point))))))
(set-text-properties 0 (length name) nil name) (set-text-properties 0 (length name) nil name)
(setq exp (read-string (format "%s expansion for \"%s\": " (setq exp (read-string (format "%s expansion for \"%s\": "
type name) nil nil nil t)) type name) nil nil nil t))
...@@ -306,7 +306,7 @@ If called from a Lisp program, arguments are START END &optional NOQUERY." ...@@ -306,7 +306,7 @@ If called from a Lisp program, arguments are START END &optional NOQUERY."
(<= (setq pnt (point)) (- (point-max) lim)))) (<= (setq pnt (point)) (- (point-max) lim))))
(if (abbrev-expansion (if (abbrev-expansion
(setq string (setq string
(buffer-substring (buffer-substring-no-properties
(save-excursion (forward-word -1) (point)) (save-excursion (forward-word -1) (point))
pnt))) pnt)))
(if (or noquery (y-or-n-p (format "Expand `%s'? " string))) (if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment