]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve integer file mode options docstrings
authorStefan Kangas <stefankangas@gmail.com>
Mon, 6 Jan 2025 10:07:09 +0000 (11:07 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 8 Jan 2025 08:36:42 +0000 (09:36 +0100)
* lisp/eshell/esh-util.el (eshell-private-file-modes)
(eshell-private-directory-modes):
* lisp/gnus/mail-source.el (mail-source-default-file-modes):
* lisp/printing.el (pr-file-modes):
* lisp/gnus/mm-decode.el (mm-attachment-file-modes):
* lisp/gnus/nnmail.el (nnmail-default-file-modes):
* lisp/recentf.el (recentf-save-file-modes):
* lisp/vc/ediff-init.el (ediff-temp-file-mode):
* lisp/vc/emerge.el (emerge-temp-file-mode): Better document the fact
that these are integer and not octal values.

* lisp/epg.el (epg--start):
* lisp/emacs-lisp/package.el (package-import-keyring): Use octal values
to make the code more self-documenting.

(cherry picked from commit da5df90fadbec9db692ff34abcd28ce5a5b29c2a)

lisp/emacs-lisp/package.el
lisp/epg.el
lisp/eshell/esh-util.el
lisp/gnus/mail-source.el
lisp/gnus/mm-decode.el
lisp/gnus/nnmail.el
lisp/printing.el
lisp/recentf.el
lisp/vc/ediff-init.el
lisp/vc/emerge.el

index ef502314e3d22c93970ba5f8075c62344a0e2695..9accb2e0e62fb7e8bff67dcdd3d0597f509d3701 100644 (file)
@@ -1751,7 +1751,7 @@ The variable `package-load-list' controls which packages to load."
   (setq file (expand-file-name file))
   (let ((context (epg-make-context 'OpenPGP)))
     (when package-gnupghome-dir
-      (with-file-modes 448
+      (with-file-modes #o700
         (make-directory package-gnupghome-dir t))
       (setf (epg-context-home-directory context) package-gnupghome-dir))
     (message "Importing %s..." (file-name-nondirectory file))
index 385e5a7f7c8110e9227e64b424ef9e2a773deab7..c796230b12c391da2e26d921f569de4b8bb48601 100644 (file)
@@ -670,7 +670,7 @@ callback data (if any)."
                             :noquery t))
     (setf (epg-context-error-buffer context) (process-buffer error-process))
     (with-existing-directory
-      (with-file-modes 448
+      (with-file-modes #o700
         (setq process (make-process :name "epg"
                                    :buffer buffer
                                    :command (cons (epg-context-program context)
index 189be5fe57c0e2e5b0483cf1289a675e7fd735fc..bc2e04746b170a45405a45ac485b92437755151f 100644 (file)
@@ -64,11 +64,13 @@ Setting this to nil is offered as an aid to debugging only."
   :type 'boolean)
 
 (defcustom eshell-private-file-modes #o600 ; umask 177
-  "The file-modes value to use for creating \"private\" files."
+  "The file-modes value to use for creating \"private\" files.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :type 'integer)
 
 (defcustom eshell-private-directory-modes #o700 ; umask 077
-  "The file-modes value to use for creating \"private\" directories."
+  "The file-modes value to use for creating \"private\" directories.
+This is decimal, not octal.  The default is 448 (0700 in octal)."
   :type 'integer)
 
 (defcustom eshell-tar-regexp
index 838ba7dac7787c85816cf5fb16743e9aeb6d0603..eece03a62bc364565d28fb765752264b38fda230 100644 (file)
@@ -246,8 +246,9 @@ If non-nil, this maildrop will be checked periodically for new mail."
   "Directory where incoming mail source files (if any) will be stored."
   :type 'directory)
 
-(defcustom mail-source-default-file-modes 384
-  "Set the mode bits of all new mail files to this integer."
+(defcustom mail-source-default-file-modes #o600
+  "Set the mode bits of all new mail files to this integer.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :type 'integer)
 
 (defcustom mail-source-delete-incoming
index eced568ff09d5205882f86336cd3bed1dd5e3e1f..543c1cc257a603a9b7523216aeeeb1a5701cec09 100644 (file)
@@ -442,8 +442,9 @@ If not set, `default-directory' will be used."
   :type '(choice directory (const :tag "Default" nil))
   :group 'mime-display)
 
-(defcustom mm-attachment-file-modes 384
-  "Set the mode bits of saved attachments to this integer."
+(defcustom mm-attachment-file-modes #o600
+  "Set the mode bits of saved attachments to this integer.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :version "22.1"
   :type 'integer
   :group 'mime-display)
index 966078659f7f37a99277f5f866681b794025d9c0..e580d7aebba6514f2f017d47fbac113dd9becc2e 100644 (file)
@@ -152,8 +152,9 @@ If nil, groups like \"mail.misc\" will end up in directories like
   :group 'nnmail-files
   :type 'boolean)
 
-(defcustom nnmail-default-file-modes 384
-  "Set the mode bits of all new mail files to this integer."
+(defcustom nnmail-default-file-modes #o600
+  "Set the mode bits of all new mail files to this integer.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :group 'nnmail-files
   :type 'integer)
 
index 0d7013a30cf16e4b980e15f76283b8767294bd5a..c84ee54eb7fba790263a8eba5c666ce06dbf915d 100644 (file)
@@ -1814,9 +1814,9 @@ See also `pr-temp-dir' and `pr-file-modes'."
 ;; It uses 0600 as default instead of (default-file-modes).
 ;; So, by default, only the session owner have permission to deal with files
 ;; generated by `printing'.
-(defcustom pr-file-modes ?\600
+(defcustom pr-file-modes #o600
   "Specify the file permission bits for newly created files.
-
+This is decimal, not octal.  The default is 384 (0600 in octal).
 It should be an integer; only the low 9 bits are used.
 
 See also `pr-temp-dir' and `pr-ps-temp-file'."
index 1f1d6b94ae9f9feeb495ace748e9218a29ba714f..4e84dc687215e9cfbf8acfb924f816dac737bbaa 100644 (file)
@@ -96,9 +96,10 @@ See the command `recentf-save-list'."
 
 (defcustom recentf-save-file-modes #o600
   "Mode bits of recentf save file, as an integer, or nil.
-If non-nil, after writing `recentf-save-file', set its mode bits to
-this value.  By default give R/W access only to the user who owns that
-file.  See also the function `set-file-modes'."
+If non-nil, after writing `recentf-save-file', set its mode bits to this
+value.  This is decimal, not octal.  The default is 384 (0600 in octal),
+which gives R/W access only to the user who owns that file.  See also
+the function `set-file-modes'."
   :group 'recentf
   :type '(choice (const :tag "Don't change" nil)
           integer))
index 03f280d080f654ff92fc28b7518c09123876292f..d67785d96faddbae64f9fedb300f542eafff7f6c 100644 (file)
@@ -1218,8 +1218,9 @@ Instead, C-h would jump to previous difference."
 (define-obsolete-variable-alias 'ediff-temp-file-prefix
   'temporary-file-directory "28.1")
 
-(defcustom ediff-temp-file-mode 384    ; u=rw only
-  "Mode for Ediff temporary files."
+(defcustom ediff-temp-file-mode #o0600
+  "Mode for Ediff temporary files.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :type 'integer
   :group 'ediff)
 
index ca48f2f3c7b2751f2ffa9dc87f56725783a9e2f8..45405028df9b907c08748aae68bc2880536eb958 100644 (file)
@@ -233,8 +233,9 @@ Do not start with `~/' or `~USERNAME/'."
                        "customize `temporary-file-directory' instead."
                        "24.4" 'set)
 
-(defcustom emerge-temp-file-mode 384   ; u=rw only
-  "Mode for Emerge temporary files."
+(defcustom emerge-temp-file-mode #o600
+  "Mode for Emerge temporary files.
+This is decimal, not octal.  The default is 384 (0600 in octal)."
   :type 'integer)
 
 (make-obsolete-variable 'emerge-temp-file-mode