aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2010-11-11 00:28:35 -0800
committerGlenn Morris2010-11-11 00:28:35 -0800
commit606dcd9ebc3b896bef9f63d7bbc606a19eed9d87 (patch)
tree9399826ec66d7795a968d0b7b9f74372fe1e2c81 /lisp
parent5ca6733884a35e4b72a312d081f46beb8e131ef0 (diff)
downloademacs-606dcd9ebc3b896bef9f63d7bbc606a19eed9d87.tar.gz
emacs-606dcd9ebc3b896bef9f63d7bbc606a19eed9d87.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/ls-lisp.el30
2 files changed, 26 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eae2a294bf8..5ba650c43b0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -7,6 +7,9 @@
7 (ls-lisp-verbosity, ls-lisp-use-localized-time-format): Doc fixes. 7 (ls-lisp-verbosity, ls-lisp-use-localized-time-format): Doc fixes.
8 (ls-lisp-format, ls-lisp-format-time): Don't take `now' as an argument. 8 (ls-lisp-format, ls-lisp-format-time): Don't take `now' as an argument.
9 (ls-lisp-insert-directory): Update caller. 9 (ls-lisp-insert-directory): Update caller.
10 (ls-lisp-set-options): New function.
11 (ls-lisp-emulation): Use ls-lisp-set-options for custom :set.
12 Doc fix.
10 13
11 * play/landmark.el (lm-prompt-for-move): 14 * play/landmark.el (lm-prompt-for-move):
12 * play/gomoku.el (gomoku-prompt-for-move): Remove nonsensical code. 15 * play/gomoku.el (gomoku-prompt-for-move): Remove nonsensical code.
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 3791f6f5978..5f76c1bab7f 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -70,21 +70,37 @@
70 :version "21.1" 70 :version "21.1"
71 :group 'dired) 71 :group 'dired)
72 72
73(defun ls-lisp-set-options ()
74 "Reset the ls-lisp options that depend on `ls-lisp-emulation'."
75 (mapc 'custom-reevaluate-setting
76 '(ls-lisp-ignore-case ls-lisp-dirs-first ls-lisp-verbosity)))
77
73(defcustom ls-lisp-emulation 78(defcustom ls-lisp-emulation
74 (cond ;; ((eq system-type 'windows-nt) 'MS-Windows) 79 (cond ;; ((eq system-type 'windows-nt) 'MS-Windows)
75 ((memq system-type 80 ((memq system-type '(hpux usg-unix-v irix berkeley-unix))
76 '(hpux usg-unix-v irix berkeley-unix)) 81 'UNIX)) ; very similar to GNU
77 'UNIX)) ; very similar to GNU
78 ;; Anything else defaults to nil, meaning GNU. 82 ;; Anything else defaults to nil, meaning GNU.
79 "Platform to emulate: GNU (default), MacOS, MS-Windows, UNIX. 83 "Platform to emulate: GNU (default), MacOS, MS-Windows, UNIX.
80Corresponding value is one of the atoms: nil, MacOS, MS-Windows, UNIX. 84Corresponding value is one of: nil, `MacOS', `MS-Windows', `UNIX'.
81Sets default values for: `ls-lisp-ignore-case', `ls-lisp-dirs-first', 85Set this to your preferred value; it need not match the actual platform
82`ls-lisp-verbosity'. Need not match actual platform. Changing this 86you are using.
83option will have no effect until you restart Emacs." 87
88This variable does not affect the behavior of ls-lisp directly.
89Rather, it controls the default values for some variables that do:
90`ls-lisp-ignore-case', `ls-lisp-dirs-first', and `ls-lisp-verbosity'.
91
92If you change this variable directly (without using customize)
93after loading `ls-lisp', you should use `ls-lisp-set-options' to
94update the dependent variables."
84 :type '(choice (const :tag "GNU" nil) 95 :type '(choice (const :tag "GNU" nil)
85 (const MacOS) 96 (const MacOS)
86 (const MS-Windows) 97 (const MS-Windows)
87 (const UNIX)) 98 (const UNIX))
99 :initialize 'custom-initialize-default
100 :set (lambda (symbol value)
101 (unless (equal value (eval symbol))
102 (custom-set-default symbol value)
103 (ls-lisp-set-options)))
88 :group 'ls-lisp) 104 :group 'ls-lisp)
89 105
90(defcustom ls-lisp-ignore-case 106(defcustom ls-lisp-ignore-case