summaryrefslogtreecommitdiff
path: root/lisp/textmodes/sgml-mode.el
diff options
context:
space:
mode:
authorHarald Hanche-Olsen <hanche@math.ntnu.no>2015-07-23 18:09:44 +0200
committerDmitry Gutov <dgutov@yandex.ru>2015-07-24 19:27:56 +0300
commitc1ff88c0ce3bf79ed0c6bf914b6a33a8c37173d6 (patch)
treeeb18d2b73a89cab04af2ba79b22877dfe71497e4 /lisp/textmodes/sgml-mode.el
parent67eb6ae9db8543d6819c9bf63bbb810f2304f1d0 (diff)
downloademacs-c1ff88c0ce3bf79ed0c6bf914b6a33a8c37173d6.tar.gz
Pass lambdas to `skeleton-read'
* lisp/skeleton.el (skeleton-read): Allow PROMPT to be a function. * lisp/textmodes/sgml-mode.el (sgml-attributes, sgml-value): Pass lambdas to `skeleton-read' (bug#20386). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/textmodes/sgml-mode.el')
-rw-r--r--lisp/textmodes/sgml-mode.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 2ffe9c1e7ed..6a14b52dc92 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -759,9 +759,10 @@ If QUIET, do not print a message when there are no attributes for TAG."
(insert ?\s)
(insert (funcall skeleton-transformation-function
(setq attribute
- (skeleton-read '(completing-read
- "Attribute: "
- alist)))))
+ (skeleton-read (lambda ()
+ (completing-read
+ "Attribute: "
+ alist))))))
(if (string= "" attribute)
(setq i 0)
(sgml-value (assoc (downcase attribute) alist))
@@ -1177,13 +1178,16 @@ See `sgml-tag-alist' for info about attribute rules."
(if (and (eq (car alist) t) (not sgml-xml-mode))
(when (cdr alist)
(insert "=\"")
- (setq alist (skeleton-read '(completing-read "Value: " (cdr alist))))
+ (setq alist (skeleton-read (lambda ()
+ (completing-read
+ "Value: " (cdr alist)))))
(if (string< "" alist)
(insert alist ?\")
(delete-char -2)))
(insert "=\"")
(if (cdr alist)
- (insert (skeleton-read '(completing-read "Value: " alist)))
+ (insert (skeleton-read (lambda ()
+ (completing-read "Value: " alist))))
(when (null alist)
(insert (skeleton-read '(read-string "Value: ")))))
(insert ?\"))))