emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102654: Make some dired defvars into


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102654: Make some dired defvars into defcustoms.
Date: Mon, 13 Dec 2010 20:32:14 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102654
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-13 20:32:14 -0800
message:
  Make some dired defvars into defcustoms.
  
  * lisp/dired.el (dired-subdir-switches, dired-chown-program)
  (dired-use-ls-dired, dired-chmod-program, dired-touch-program):
  Make into defcustoms.
  (dired-chown-program): Simplify initialization.
modified:
  lisp/ChangeLog
  lisp/dired.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-14 04:26:01 +0000
+++ b/lisp/ChangeLog    2010-12-14 04:32:14 +0000
@@ -1,5 +1,10 @@
 2010-12-14  Glenn Morris  <address@hidden>
 
+       * dired.el (dired-subdir-switches, dired-chown-program)
+       (dired-use-ls-dired, dired-chmod-program, dired-touch-program):
+       Make into defcustoms.
+       (dired-chown-program): Simplify initialization.
+
        * mail/mail-utils.el: No need to require lisp-mode, it's in loadup.
 
 2010-12-13  Romain Francoise  <address@hidden>

=== modified file 'lisp/dired.el'
--- a/lisp/dired.el     2010-12-13 15:27:36 +0000
+++ b/lisp/dired.el     2010-12-14 04:32:14 +0000
@@ -26,8 +26,8 @@
 
 ;;; Commentary:
 
-;; This is a major mode for directory browsing and editing.  It is
-;; documented in the Emacs manual.
+;; This is a major mode for directory browsing and editing.
+;; It is documented in the Emacs manual.
 
 ;; Rewritten in 1990/1991 to add tree features, file marking and
 ;; sorting by Sebastian Kremer <address@hidden>.
@@ -62,35 +62,42 @@
   :type 'string
   :group 'dired)
 
-(defvar dired-subdir-switches nil
+(defcustom dired-subdir-switches nil
   "If non-nil, switches passed to `ls' for inserting subdirectories.
-If nil, `dired-listing-switches' is used.")
-
-; Don't use absolute file names as /bin should be in any PATH and people
-; may prefer /usr/local/gnu/bin or whatever.  However, chown is
-; usually not in PATH.
+If nil, `dired-listing-switches' is used."
+   :group 'dired
+   :type '(choice (const :tag "Use dired-listing-switches" nil)
+                  (string :tag "Switches")))
 
 ;;;###autoload
-(defvar dired-chown-program
-  (purecopy
-  (if (memq system-type '(hpux usg-unix-v irix gnu/linux cygwin))
-      "chown"
-    (if (file-exists-p "/usr/sbin/chown")
-       "/usr/sbin/chown"
-      "/etc/chown")))
-  "Name of chown command (usually `chown' or `/etc/chown').")
+(defcustom dired-chown-program
+  (purecopy (cond ((executable-find "chown") "chown")
+                  ((file-executable-p "/usr/sbin/chown") "/usr/sbin/chown")
+                  ((file-executable-p "/etc/chown") "/etc/chown")
+                  (t "chown")))
+  "Name of chown command (usually `chown')."
+  :group 'dired
+  :type 'file)
 
-(defvar dired-use-ls-dired 'unspecified
+(defcustom dired-use-ls-dired 'unspecified
   "Non-nil means Dired should use \"ls --dired\".
 The special value of `unspecified' means to check explicitly, and
 save the result in this variable.  This is performed the first
-time `dired-insert-directory' is called.")
-
-(defvar dired-chmod-program "chmod"
-  "Name of chmod command (usually `chmod').")
-
-(defvar dired-touch-program "touch"
-  "Name of touch command (usually `touch').")
+time `dired-insert-directory' is called."
+  :group 'dired
+  :type '(choice (const :tag "Check for --dired support" unspecified)
+                 (const :tag "Do not use --dired" nil)
+                 (other :tag "Use --dired" t)))
+
+(defcustom dired-chmod-program "chmod"
+  "Name of chmod command (usually `chmod')."
+  :group 'dired
+  :type 'file)
+
+(defcustom dired-touch-program "touch"
+  "Name of touch command (usually `touch')."
+   :group 'dired
+   :type 'file)
 
 (defcustom dired-ls-F-marks-symlinks nil
   "Informs Dired about how `ls -lF' marks symbolic links.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]