aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-09-13 10:02:35 +0000
committerGerd Moellmann2001-09-13 10:02:35 +0000
commit9b350152813e032bafd56b9773bd134f1694381e (patch)
treea815b5e6aabc62a83924d13e6b5b4f3a5914cd4f
parent68d0efa64e86f436699fe4964875798bdd948d7e (diff)
downloademacs-9b350152813e032bafd56b9773bd134f1694381e.tar.gz
emacs-9b350152813e032bafd56b9773bd134f1694381e.zip
(minibuffer-prompt-modification)
(minibuffer-prompt-insertion): New functions. (minibuffer-prompt-properties): Use `modification-hooks' and `insert-in-front-hooks'.
-rw-r--r--lisp/simple.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index e276b1dea32..19fee9a0c92 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4185,4 +4185,26 @@ See also `normal-erase-is-backspace'."
4185 (and (boundp 'byte-compile-current-file) 4185 (and (boundp 'byte-compile-current-file)
4186 (stringp byte-compile-current-file))) 4186 (stringp byte-compile-current-file)))
4187 4187
4188
4189;;; Minibuffer prompt stuff.
4190
4191(defun minibuffer-prompt-modification (start end)
4192 (error "You cannot modify the prompt"))
4193
4194
4195(defun minibuffer-prompt-insertion (start end)
4196 (let ((inhibit-modification-hooks t))
4197 (delete-region start end)
4198 ;; Discard undo information for the text insertion itself
4199 ;; and for the text deletion.above.
4200 (when (consp buffer-undo-list)
4201 (setq buffer-undo-list (cddr buffer-undo-list)))
4202 (message "You cannot modify the prompt")))
4203
4204
4205(setq minibuffer-prompt-properties
4206 (list 'modification-hooks '(minibuffer-prompt-modification)
4207 'insert-in-front-hooks '(minibuffer-prompt-insertion)))
4208
4209
4188;;; simple.el ends here 4210;;; simple.el ends here