aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-10-23 17:58:22 -0700
committerGlenn Morris2010-10-23 17:58:22 -0700
commitec51400782d909f06be58d3ea1f2552136dd1927 (patch)
tree3ea5244301bb519f91243cf861522e5ccbbf79ea
parent530f7b672740a4799d1fe40fd47d849e91c5ca68 (diff)
downloademacs-ec51400782d909f06be58d3ea1f2552136dd1927.tar.gz
emacs-ec51400782d909f06be58d3ea1f2552136dd1927.zip
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.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/cus-start.el37
-rw-r--r--lisp/frame.el44
3 files changed, 40 insertions, 51 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 04b80e4eba0..fc85e829dfe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12010-10-24 Glenn Morris <rgm@gnu.org>
2
3 * frame.el (show-trailing-whitespace, auto-hscroll-mode)
4 (display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
5 Don't redefine things that are defined in C.
6 * cus-start.el: Also handle :risky, :safe, :set, and :tag.
7 (show-trailing-whitespace, auto-hscroll-mode)
8 (display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
9 Set up the appropriate custom properties.
10
12010-10-24 Chong Yidong <cyd@stupidchicken.com> 112010-10-24 Chong Yidong <cyd@stupidchicken.com>
2 12
3 Bind "C-c ]" to ... 13 Bind "C-c ]" to ...
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index a43525f8245..ceb7bcdfd1a 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -96,6 +96,11 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
96 "21.1") 96 "21.1")
97 (line-spacing display (choice (const :tag "none" nil) integer) 97 (line-spacing display (choice (const :tag "none" nil) integer)
98 "22.1") 98 "22.1")
99 (cursor-in-non-selected-windows
100 cursor boolean nil t :tag "Cursor In Non-selected Windows"
101 :set #'(lambda (symbol value)
102 (set-default symbol value)
103 (force-mode-line-update t)))
99 ;; callint.c 104 ;; callint.c
100 (mark-even-if-inactive editing-basics boolean) 105 (mark-even-if-inactive editing-basics boolean)
101 ;; callproc.c 106 ;; callproc.c
@@ -327,6 +332,8 @@ since it could result in memory overflow and make Emacs crash."
327 (other :tag "Always" t)) 332 (other :tag "Always" t))
328 "23.1") 333 "23.1")
329 ;; xdisp.c 334 ;; xdisp.c
335 (show-trailing-whitespace whitespace-faces boolean nil nil
336 :safe booleanp)
330 (scroll-step windows integer) 337 (scroll-step windows integer)
331 (scroll-conservatively windows integer) 338 (scroll-conservatively windows integer)
332 (scroll-margin windows integer) 339 (scroll-margin windows integer)
@@ -362,6 +369,9 @@ since it could result in memory overflow and make Emacs crash."
362 (const :tag "Text-image-horiz" :value text-image-horiz) 369 (const :tag "Text-image-horiz" :value text-image-horiz)
363 (const :tag "System default" :value nil)) "23.3") 370 (const :tag "System default" :value nil)) "23.3")
364 (tool-bar-max-label-size frames integer "23.3") 371 (tool-bar-max-label-size frames integer "23.3")
372 (auto-hscroll-mode scrolling boolean "21.1")
373 (display-hourglass cursor boolean)
374 (hourglass-delay cursor number)
365 375
366 ;; xfaces.c 376 ;; xfaces.c
367 (scalable-fonts-allowed display boolean "22.1") 377 (scalable-fonts-allowed display boolean "22.1")
@@ -379,7 +389,7 @@ since it could result in memory overflow and make Emacs crash."
379 (x-stretch-cursor display boolean "21.1") 389 (x-stretch-cursor display boolean "21.1")
380 ;; xsettings.c 390 ;; xsettings.c
381 (font-use-system-font font-selection boolean "23.2"))) 391 (font-use-system-font font-selection boolean "23.2")))
382 this symbol group type standard version native-p 392 this symbol group type standard version native-p rest prop propval
383 ;; This function turns a value 393 ;; This function turns a value
384 ;; into an expression which produces that value. 394 ;; into an expression which produces that value.
385 (quoter (lambda (sexp) 395 (quoter (lambda (sexp)
@@ -404,6 +414,7 @@ since it could result in memory overflow and make Emacs crash."
404 (nth 4 this) 414 (nth 4 this)
405 (when (default-boundp symbol) 415 (when (default-boundp symbol)
406 (funcall quoter (default-value symbol)))) 416 (funcall quoter (default-value symbol))))
417 rest (nthcdr 5 this)
407 ;; Don't complain about missing variables which are 418 ;; Don't complain about missing variables which are
408 ;; irrelevant to this platform. 419 ;; irrelevant to this platform.
409 native-p (save-match-data 420 native-p (save-match-data
@@ -436,6 +447,11 @@ since it could result in memory overflow and make Emacs crash."
436 ;; Save the standard value, unless we already did. 447 ;; Save the standard value, unless we already did.
437 (or (get symbol 'standard-value) 448 (or (get symbol 'standard-value)
438 (put symbol 'standard-value (list standard))) 449 (put symbol 'standard-value (list standard)))
450 ;; We need these properties independent of whether cus-start is loaded.
451 (if (setq prop (memq :safe rest))
452 (put symbol 'safe-local-variable (cadr prop)))
453 (if (setq prop (memq :risky rest))
454 (put symbol 'risky-local-variable (cadr prop)))
439 ;; If this is NOT while dumping Emacs, 455 ;; If this is NOT while dumping Emacs,
440 ;; set up the rest of the customization info. 456 ;; set up the rest of the customization info.
441 (unless purify-flag 457 (unless purify-flag
@@ -443,18 +459,25 @@ since it could result in memory overflow and make Emacs crash."
443 (custom-add-to-group group symbol 'custom-variable) 459 (custom-add-to-group group symbol 'custom-variable)
444 ;; Set the type. 460 ;; Set the type.
445 (put symbol 'custom-type type) 461 (put symbol 'custom-type type)
446 (put symbol 'custom-version version))))) 462 (put symbol 'custom-version version)
463 (while rest
464 (setq prop (car rest)
465 propval (cadr rest)
466 rest (nthcdr 2 rest))
467 (cond ((memq prop '(:risky :safe))) ; handled above
468 ((eq prop :set)
469 (put symbol 'custom-set propval))
470 ((eq prop :tag)
471 (put symbol 'custom-tag propval))))))))
447 472
448(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable) 473(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
449(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start 474(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
450 'custom-variable) 475 'custom-variable)
451 476
452;; Record cus-start as loaded 477;; Record cus-start as loaded if we have set up all the info that we can.
453;; if we have set up all the info that we can set up. 478;; Don't record it as loaded if we have only set up the standard values
454;; Don't record cus-start as loaded 479;; and safe/risky properties.
455;; if we have set up only the standard values.
456(unless purify-flag 480(unless purify-flag
457 (provide 'cus-start)) 481 (provide 'cus-start))
458 482
459;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
460;;; cus-start.el ends here 483;;; cus-start.el ends here
diff --git a/lisp/frame.el b/lisp/frame.el
index 431c2aefff4..8210363610c 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1467,14 +1467,6 @@ left untouched. FRAME nil or omitted means use the selected frame."
1467 1467
1468(make-variable-buffer-local 'show-trailing-whitespace) 1468(make-variable-buffer-local 'show-trailing-whitespace)
1469 1469
1470(defcustom show-trailing-whitespace nil
1471 "Non-nil means highlight trailing whitespace.
1472This is done in the face `trailing-whitespace'."
1473 :type 'boolean
1474 :safe 'booleanp
1475 :group 'whitespace-faces)
1476
1477
1478 1470
1479;; Scrolling 1471;; Scrolling
1480 1472
@@ -1483,13 +1475,6 @@ This is done in the face `trailing-whitespace'."
1483 :version "21.1" 1475 :version "21.1"
1484 :group 'frames) 1476 :group 'frames)
1485 1477
1486(defcustom auto-hscroll-mode t
1487 "Allow or disallow automatic horizontal scrolling of windows.
1488If non-nil, windows are automatically scrolled horizontally to make
1489point visible."
1490 :version "21.1"
1491 :type 'boolean
1492 :group 'scrolling)
1493(defvaralias 'automatic-hscrolling 'auto-hscroll-mode) 1478(defvaralias 'automatic-hscrolling 'auto-hscroll-mode)
1494 1479
1495 1480
@@ -1576,35 +1561,6 @@ cursor display. On a text-only terminal, this is not implemented."
1576 'blink-cursor-start)))) 1561 'blink-cursor-start))))
1577 1562
1578(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1") 1563(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
1579
1580;; Hourglass pointer
1581
1582(defcustom display-hourglass t
1583 "Non-nil means show an hourglass pointer, when Emacs is busy.
1584This feature only works when on a window system that can change
1585cursor shapes."
1586 :type 'boolean
1587 :group 'cursor)
1588
1589(defcustom hourglass-delay 1
1590 "Seconds to wait before displaying an hourglass pointer when Emacs is busy."
1591 :type 'number
1592 :group 'cursor)
1593
1594
1595(defcustom cursor-in-non-selected-windows t
1596 "Non-nil means show a cursor in non-selected windows.
1597If nil, only shows a cursor in the selected window.
1598If t, displays a cursor related to the usual cursor type
1599\(a solid box becomes hollow, a bar becomes a narrower bar).
1600You can also specify the cursor type as in the `cursor-type' variable.
1601Use Custom to set this variable and update the display."
1602 :tag "Cursor In Non-selected Windows"
1603 :type 'boolean
1604 :group 'cursor
1605 :set #'(lambda (symbol value)
1606 (set-default symbol value)
1607 (force-mode-line-update t)))
1608 1564
1609 1565
1610;;;; Key bindings 1566;;;; Key bindings