Mercurial > emacs
comparison lisp/abbrev.el @ 9180:569ed1f55710
(add-abbrev, inverse-add-abbrev):
Clear text properties from NAME.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 29 Sep 1994 19:07:45 +0000 |
parents | 10e417efb12a |
children | 03792bb111ab |
comparison
equal
deleted
inserted
replaced
9179:c8ef8dc59108 | 9180:569ed1f55710 |
---|---|
215 name) | 215 name) |
216 (setq name | 216 (setq name |
217 (read-string (format (if exp "%s abbrev for \"%s\": " | 217 (read-string (format (if exp "%s abbrev for \"%s\": " |
218 "Undefine %s abbrev: ") | 218 "Undefine %s abbrev: ") |
219 type exp))) | 219 type exp))) |
220 (set-text-properties 0 (length name) nil name) | |
220 (if (or (null exp) | 221 (if (or (null exp) |
221 (not (abbrev-expansion name table)) | 222 (not (abbrev-expansion name table)) |
222 (y-or-n-p (format "%s expands to \"%s\"; redefine? " | 223 (y-or-n-p (format "%s expands to \"%s\"; redefine? " |
223 name (abbrev-expansion name table)))) | 224 name (abbrev-expansion name table)))) |
224 (define-abbrev table (downcase name) exp)))) | 225 (define-abbrev table (downcase name) exp)))) |
248 (let (name nameloc exp) | 249 (let (name nameloc exp) |
249 (save-excursion | 250 (save-excursion |
250 (forward-word (- arg)) | 251 (forward-word (- arg)) |
251 (setq name (buffer-substring (point) (progn (forward-word 1) | 252 (setq name (buffer-substring (point) (progn (forward-word 1) |
252 (setq nameloc (point)))))) | 253 (setq nameloc (point)))))) |
254 (set-text-properties 0 (length name) nil name) | |
253 (setq exp (read-string (format "%s expansion for \"%s\": " | 255 (setq exp (read-string (format "%s expansion for \"%s\": " |
254 type name))) | 256 type name))) |
255 (if (or (not (abbrev-expansion name table)) | 257 (if (or (not (abbrev-expansion name table)) |
256 (y-or-n-p (format "%s expands to \"%s\"; redefine? " | 258 (y-or-n-p (format "%s expands to \"%s\"; redefine? " |
257 name (abbrev-expansion name table)))) | 259 name (abbrev-expansion name table)))) |