[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102344: ls-lisp: get rid of the drea
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102344: ls-lisp: get rid of the dreaded "no effect until you restart Emacs". |
Date: |
Thu, 11 Nov 2010 00:28:35 -0800 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102344
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2010-11-11 00:28:35 -0800
message:
ls-lisp: get rid of the dreaded "no effect until you restart Emacs".
* lisp/ls-lisp.el (ls-lisp-set-options): New function.
(ls-lisp-emulation): Use ls-lisp-set-options for custom :set. Doc fix.
modified:
lisp/ChangeLog
lisp/ls-lisp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-11 03:59:04 +0000
+++ b/lisp/ChangeLog 2010-11-11 08:28:35 +0000
@@ -7,6 +7,9 @@
(ls-lisp-verbosity, ls-lisp-use-localized-time-format): Doc fixes.
(ls-lisp-format, ls-lisp-format-time): Don't take `now' as an argument.
(ls-lisp-insert-directory): Update caller.
+ (ls-lisp-set-options): New function.
+ (ls-lisp-emulation): Use ls-lisp-set-options for custom :set.
+ Doc fix.
* play/landmark.el (lm-prompt-for-move):
* play/gomoku.el (gomoku-prompt-for-move): Remove nonsensical code.
=== modified file 'lisp/ls-lisp.el'
--- a/lisp/ls-lisp.el 2010-11-11 03:59:04 +0000
+++ b/lisp/ls-lisp.el 2010-11-11 08:28:35 +0000
@@ -70,21 +70,37 @@
:version "21.1"
:group 'dired)
+(defun ls-lisp-set-options ()
+ "Reset the ls-lisp options that depend on `ls-lisp-emulation'."
+ (mapc 'custom-reevaluate-setting
+ '(ls-lisp-ignore-case ls-lisp-dirs-first ls-lisp-verbosity)))
+
(defcustom ls-lisp-emulation
(cond ;; ((eq system-type 'windows-nt) 'MS-Windows)
- ((memq system-type
- '(hpux usg-unix-v irix berkeley-unix))
- 'UNIX)) ; very similar to GNU
+ ((memq system-type '(hpux usg-unix-v irix berkeley-unix))
+ 'UNIX)) ; very similar to GNU
;; Anything else defaults to nil, meaning GNU.
"Platform to emulate: GNU (default), MacOS, MS-Windows, UNIX.
-Corresponding value is one of the atoms: nil, MacOS, MS-Windows, UNIX.
-Sets default values for: `ls-lisp-ignore-case', `ls-lisp-dirs-first',
-`ls-lisp-verbosity'. Need not match actual platform. Changing this
-option will have no effect until you restart Emacs."
+Corresponding value is one of: nil, `MacOS', `MS-Windows', `UNIX'.
+Set this to your preferred value; it need not match the actual platform
+you are using.
+
+This variable does not affect the behavior of ls-lisp directly.
+Rather, it controls the default values for some variables that do:
+`ls-lisp-ignore-case', `ls-lisp-dirs-first', and `ls-lisp-verbosity'.
+
+If you change this variable directly (without using customize)
+after loading `ls-lisp', you should use `ls-lisp-set-options' to
+update the dependent variables."
:type '(choice (const :tag "GNU" nil)
(const MacOS)
(const MS-Windows)
(const UNIX))
+ :initialize 'custom-initialize-default
+ :set (lambda (symbol value)
+ (unless (equal value (eval symbol))
+ (custom-set-default symbol value)
+ (ls-lisp-set-options)))
:group 'ls-lisp)
(defcustom ls-lisp-ignore-case
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102344: ls-lisp: get rid of the dreaded "no effect until you restart Emacs".,
Glenn Morris <=