Fix acdw/define-auto-insert
This commit is contained in:
parent
bb5d048df6
commit
fcb03f1200
|
@ -42,14 +42,17 @@ OPTIONS is a plist with three optional arguments:
|
||||||
(declare (indent 1))
|
(declare (indent 1))
|
||||||
(let ((testfn (or (plist-get options :testfn)
|
(let ((testfn (or (plist-get options :testfn)
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
(string= (cdr a) (cdar b)))))
|
(string= (cdr-safe a) (cdar b)))))
|
||||||
(replace (or (plist-get options :replace) nil))
|
(replace (or (plist-get options :replace) nil))
|
||||||
(after (or (plist-get options :after) nil)))
|
(after (or (plist-get options :after) nil)))
|
||||||
(when replace
|
(if replace
|
||||||
(setq auto-insert-alist
|
(progn (setq auto-insert-alist
|
||||||
(assoc-delete-all condition auto-insert-alist testfn)))
|
(assoc-delete-all (list condition)
|
||||||
(unless (assoc (list condition) auto-insert-alist testfn)
|
auto-insert-alist
|
||||||
(define-auto-insert condition action after))))
|
testfn))
|
||||||
|
(define-auto-insert condition action after))
|
||||||
|
(unless (assoc (list condition) auto-insert-alist testfn)
|
||||||
|
(define-auto-insert condition action after)))))
|
||||||
|
|
||||||
(provide 'acdw-autoinsert)
|
(provide 'acdw-autoinsert)
|
||||||
;;; acdw-autoinsert.el ends here
|
;;; acdw-autoinsert.el ends here
|
||||||
|
|
Loading…
Reference in New Issue