Commit ec514007 authored by Glenn Morris's avatar Glenn Morris
Browse files

Avoid redefining some C defcustoms.

* lisp/frame.el (show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Don't redefine things that are defined in C.
* lisp/cus-start.el: Also handle :risky, :safe, :set, and :tag.
(show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Set up the appropriate custom properties.
parent 530f7b67
2010-10-24 Glenn Morris <rgm@gnu.org>
* frame.el (show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Don't redefine things that are defined in C.
* cus-start.el: Also handle :risky, :safe, :set, and :tag.
(show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Set up the appropriate custom properties.
2010-10-24 Chong Yidong <cyd@stupidchicken.com>
 
Bind "C-c ]" to ...
......
......@@ -96,6 +96,11 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
"21.1")
(line-spacing display (choice (const :tag "none" nil) integer)
"22.1")
(cursor-in-non-selected-windows
cursor boolean nil t :tag "Cursor In Non-selected Windows"
:set #'(lambda (symbol value)
(set-default symbol value)
(force-mode-line-update t)))
;; callint.c
(mark-even-if-inactive editing-basics boolean)
;; callproc.c
......@@ -327,6 +332,8 @@ since it could result in memory overflow and make Emacs crash."
(other :tag "Always" t))
"23.1")
;; xdisp.c
(show-trailing-whitespace whitespace-faces boolean nil nil
:safe booleanp)
(scroll-step windows integer)
(scroll-conservatively windows integer)
(scroll-margin windows integer)
......@@ -362,6 +369,9 @@ since it could result in memory overflow and make Emacs crash."
(const :tag "Text-image-horiz" :value text-image-horiz)
(const :tag "System default" :value nil)) "23.3")
(tool-bar-max-label-size frames integer "23.3")
(auto-hscroll-mode scrolling boolean "21.1")
(display-hourglass cursor boolean)
(hourglass-delay cursor number)
;; xfaces.c
(scalable-fonts-allowed display boolean "22.1")
......@@ -379,7 +389,7 @@ since it could result in memory overflow and make Emacs crash."
(x-stretch-cursor display boolean "21.1")
;; xsettings.c
(font-use-system-font font-selection boolean "23.2")))
this symbol group type standard version native-p
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)
......@@ -404,6 +414,7 @@ since it could result in memory overflow and make Emacs crash."
(nth 4 this)
(when (default-boundp symbol)
(funcall quoter (default-value symbol))))
rest (nthcdr 5 this)
;; Don't complain about missing variables which are
;; irrelevant to this platform.
native-p (save-match-data
......@@ -436,6 +447,11 @@ since it could result in memory overflow and make Emacs crash."
;; Save the standard value, unless we already did.
(or (get symbol 'standard-value)
(put symbol 'standard-value (list standard)))
;; We need these properties independent of whether cus-start is loaded.
(if (setq prop (memq :safe rest))
(put symbol 'safe-local-variable (cadr prop)))
(if (setq prop (memq :risky rest))
(put symbol 'risky-local-variable (cadr prop)))
;; If this is NOT while dumping Emacs,
;; set up the rest of the customization info.
(unless purify-flag
......@@ -443,18 +459,25 @@ since it could result in memory overflow and make Emacs crash."
(custom-add-to-group group symbol 'custom-variable)
;; Set the type.
(put symbol 'custom-type type)
(put symbol 'custom-version version)))))
(put symbol 'custom-version version)
(while rest
(setq prop (car rest)
propval (cadr rest)
rest (nthcdr 2 rest))
(cond ((memq prop '(:risky :safe))) ; handled above
((eq prop :set)
(put symbol 'custom-set propval))
((eq prop :tag)
(put symbol 'custom-tag propval))))))))
(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
'custom-variable)
;; Record cus-start as loaded
;; if we have set up all the info that we can set up.
;; Don't record cus-start as loaded
;; if we have set up only the standard values.
;; Record cus-start as loaded if we have set up all the info that we can.
;; Don't record it as loaded if we have only set up the standard values
;; and safe/risky properties.
(unless purify-flag
(provide 'cus-start))
;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
;;; cus-start.el ends here
......@@ -1467,14 +1467,6 @@ left untouched. FRAME nil or omitted means use the selected frame."
(make-variable-buffer-local 'show-trailing-whitespace)
(defcustom show-trailing-whitespace nil
"Non-nil means highlight trailing whitespace.
This is done in the face `trailing-whitespace'."
:type 'boolean
:safe 'booleanp
:group 'whitespace-faces)
;; Scrolling
......@@ -1483,13 +1475,6 @@ This is done in the face `trailing-whitespace'."
:version "21.1"
:group 'frames)
(defcustom auto-hscroll-mode t
"Allow or disallow automatic horizontal scrolling of windows.
If non-nil, windows are automatically scrolled horizontally to make
point visible."
:version "21.1"
:type 'boolean
:group 'scrolling)
(defvaralias 'automatic-hscrolling 'auto-hscroll-mode)
......@@ -1576,35 +1561,6 @@ cursor display. On a text-only terminal, this is not implemented."
'blink-cursor-start))))
(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
;; Hourglass pointer
(defcustom display-hourglass t
"Non-nil means show an hourglass pointer, when Emacs is busy.
This feature only works when on a window system that can change
cursor shapes."
:type 'boolean
:group 'cursor)
(defcustom hourglass-delay 1
"Seconds to wait before displaying an hourglass pointer when Emacs is busy."
:type 'number
:group 'cursor)
(defcustom cursor-in-non-selected-windows t
"Non-nil means show a cursor in non-selected windows.
If nil, only shows a cursor in the selected window.
If t, displays a cursor related to the usual cursor type
\(a solid box becomes hollow, a bar becomes a narrower bar).
You can also specify the cursor type as in the `cursor-type' variable.
Use Custom to set this variable and update the display."
:tag "Cursor In Non-selected Windows"
:type 'boolean
:group 'cursor
:set #'(lambda (symbol value)
(set-default symbol value)
(force-mode-line-update t)))
;;;; Key bindings
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment