diff options
Diffstat (limited to 'lisp/cus-start.el')
-rw-r--r-- | lisp/cus-start.el | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 71506cb680e..b96b81763ce 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -1,4 +1,4 @@ -;;; cus-start.el --- define customization properties of builtins +;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*- ;; Copyright (C) 1997, 1999-2015 Free Software Foundation, Inc. @@ -33,6 +33,14 @@ ;;; Code: +(defun minibuffer-prompt-properties--setter (symbol value) + (set-default symbol value) + (if (memq 'cursor-intangible value) + (add-hook 'minibuffer-setup-hook 'cursor-intangible-mode) + ;; Removing it is a bit trickier since it could have been added by someone + ;; else as well, so let's just not bother. + )) + ;; Elements of this list have the form: ;; SYMBOL GROUP TYPE VERSION REST... ;; SYMBOL is the name of the variable. @@ -46,7 +54,23 @@ ;; :risky - risky-local-variable property ;; :safe - safe-local-variable property ;; :tag - custom-tag property -(let ((all '(;; alloc.c +(let (standard native-p prop propval + ;; This function turns a value + ;; into an expression which produces that value. + (quoter (lambda (sexp) + ;; FIXME: We'd like to use macroexp-quote here, but cus-start + ;; is loaded too early in loadup.el for that. + (if (or (memq sexp '(t nil)) + (keywordp sexp) + (and (listp sexp) + (memq (car sexp) '(lambda))) + (stringp sexp) + (numberp sexp)) + sexp + (list 'quote sexp))))) + (pcase-dolist + (`(,symbol ,group ,type ,version . ,rest) + '(;; alloc.c (gc-cons-threshold alloc integer) (gc-cons-percentage alloc float) (garbage-collection-messages alloc boolean) @@ -269,10 +293,10 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (make-pointer-invisible mouse boolean "23.2") (menu-bar-mode frames boolean nil ;; FIXME? -; :initialize custom-initialize-default + ;; :initialize custom-initialize-default :set custom-set-minor-mode) (tool-bar-mode (frames mouse) boolean nil -; :initialize custom-initialize-default + ;; :initialize custom-initialize-default :set custom-set-minor-mode) (frame-resize-pixelwise frames boolean "24.4") (frame-inhibit-implied-resize frames @@ -342,14 +366,15 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of :doc "Prevent point from ever entering prompt" :format "%t%n%h" :inline t - (point-entered minibuffer-avoid-prompt))) + (cursor-intangible t))) (repeat :inline t :tag "Other Properties" (list :inline t :format "%v" (symbol :tag "Property") (sexp :tag "Value")))) - "21.1") + "21.1" + :set minibuffer-prompt-properties--setter) (minibuffer-auto-raise minibuffer boolean) ;; options property set at end (read-buffer-function minibuffer @@ -550,27 +575,7 @@ since it could result in memory overflow and make Emacs crash." (x-select-enable-clipboard-manager killing boolean "24.1") ;; xsettings.c (font-use-system-font font-selection boolean "23.2"))) - this symbol group type standard version native-p rest prop propval - ;; This function turns a value - ;; into an expression which produces that value. - (quoter (lambda (sexp) - (if (or (memq sexp '(t nil)) - (keywordp sexp) - (and (listp sexp) - (memq (car sexp) '(lambda))) - (stringp sexp) - (numberp sexp)) - sexp - (list 'quote sexp))))) - (while all - (setq this (car all) - all (cdr all) - symbol (nth 0 this) - group (nth 1 this) - type (nth 2 this) - version (nth 3 this) - rest (nthcdr 4 this) - ;; If we did not specify any standard value expression above, + (setq ;; If we did not specify any standard value expression above, ;; use the current value as the standard value. standard (if (setq prop (memq :standard rest)) (cadr prop) |