(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))))))
(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))
(<= (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)))