aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2025-01-06 11:07:09 +0100
committerStefan Kangas2025-01-06 11:10:10 +0100
commitda5df90fadbec9db692ff34abcd28ce5a5b29c2a (patch)
tree616ee453f5de55c60d82a7c456503590666720f8
parent6a389d5be47d1c143054a69e7302371d3889d658 (diff)
downloademacs-da5df90fadbec9db692ff34abcd28ce5a5b29c2a.tar.gz
emacs-da5df90fadbec9db692ff34abcd28ce5a5b29c2a.zip
Improve integer file mode options docstrings
* 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.
-rw-r--r--lisp/emacs-lisp/package.el2
-rw-r--r--lisp/epg.el2
-rw-r--r--lisp/eshell/esh-util.el6
-rw-r--r--lisp/gnus/mail-source.el5
-rw-r--r--lisp/gnus/mm-decode.el5
-rw-r--r--lisp/gnus/nnmail.el5
-rw-r--r--lisp/printing.el4
-rw-r--r--lisp/recentf.el7
-rw-r--r--lisp/vc/ediff-init.el5
-rw-r--r--lisp/vc/emerge.el5
10 files changed, 27 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 9e62f0a5c0d..3abce17a3e8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1751,7 +1751,7 @@ The variable `package-load-list' controls which packages to load."
1751 (setq file (expand-file-name file)) 1751 (setq file (expand-file-name file))
1752 (let ((context (epg-make-context 'OpenPGP))) 1752 (let ((context (epg-make-context 'OpenPGP)))
1753 (when package-gnupghome-dir 1753 (when package-gnupghome-dir
1754 (with-file-modes 448 1754 (with-file-modes #o700
1755 (make-directory package-gnupghome-dir t)) 1755 (make-directory package-gnupghome-dir t))
1756 (setf (epg-context-home-directory context) package-gnupghome-dir)) 1756 (setf (epg-context-home-directory context) package-gnupghome-dir))
1757 (message "Importing %s..." (file-name-nondirectory file)) 1757 (message "Importing %s..." (file-name-nondirectory file))
diff --git a/lisp/epg.el b/lisp/epg.el
index 385e5a7f7c8..c796230b12c 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -670,7 +670,7 @@ callback data (if any)."
670 :noquery t)) 670 :noquery t))
671 (setf (epg-context-error-buffer context) (process-buffer error-process)) 671 (setf (epg-context-error-buffer context) (process-buffer error-process))
672 (with-existing-directory 672 (with-existing-directory
673 (with-file-modes 448 673 (with-file-modes #o700
674 (setq process (make-process :name "epg" 674 (setq process (make-process :name "epg"
675 :buffer buffer 675 :buffer buffer
676 :command (cons (epg-context-program context) 676 :command (cons (epg-context-program context)
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 189be5fe57c..bc2e04746b1 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -64,11 +64,13 @@ Setting this to nil is offered as an aid to debugging only."
64 :type 'boolean) 64 :type 'boolean)
65 65
66(defcustom eshell-private-file-modes #o600 ; umask 177 66(defcustom eshell-private-file-modes #o600 ; umask 177
67 "The file-modes value to use for creating \"private\" files." 67 "The file-modes value to use for creating \"private\" files.
68This is decimal, not octal. The default is 384 (0600 in octal)."
68 :type 'integer) 69 :type 'integer)
69 70
70(defcustom eshell-private-directory-modes #o700 ; umask 077 71(defcustom eshell-private-directory-modes #o700 ; umask 077
71 "The file-modes value to use for creating \"private\" directories." 72 "The file-modes value to use for creating \"private\" directories.
73This is decimal, not octal. The default is 448 (0700 in octal)."
72 :type 'integer) 74 :type 'integer)
73 75
74(defcustom eshell-tar-regexp 76(defcustom eshell-tar-regexp
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 838ba7dac77..eece03a62bc 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -246,8 +246,9 @@ If non-nil, this maildrop will be checked periodically for new mail."
246 "Directory where incoming mail source files (if any) will be stored." 246 "Directory where incoming mail source files (if any) will be stored."
247 :type 'directory) 247 :type 'directory)
248 248
249(defcustom mail-source-default-file-modes 384 249(defcustom mail-source-default-file-modes #o600
250 "Set the mode bits of all new mail files to this integer." 250 "Set the mode bits of all new mail files to this integer.
251This is decimal, not octal. The default is 384 (0600 in octal)."
251 :type 'integer) 252 :type 'integer)
252 253
253(defcustom mail-source-delete-incoming 254(defcustom mail-source-delete-incoming
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 33d08b4677a..6aab997b892 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -442,8 +442,9 @@ If not set, `default-directory' will be used."
442 :type '(choice directory (const :tag "Default" nil)) 442 :type '(choice directory (const :tag "Default" nil))
443 :group 'mime-display) 443 :group 'mime-display)
444 444
445(defcustom mm-attachment-file-modes 384 445(defcustom mm-attachment-file-modes #o600
446 "Set the mode bits of saved attachments to this integer." 446 "Set the mode bits of saved attachments to this integer.
447This is decimal, not octal. The default is 384 (0600 in octal)."
447 :version "22.1" 448 :version "22.1"
448 :type 'integer 449 :type 'integer
449 :group 'mime-display) 450 :group 'mime-display)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 966078659f7..e580d7aebba 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -152,8 +152,9 @@ If nil, groups like \"mail.misc\" will end up in directories like
152 :group 'nnmail-files 152 :group 'nnmail-files
153 :type 'boolean) 153 :type 'boolean)
154 154
155(defcustom nnmail-default-file-modes 384 155(defcustom nnmail-default-file-modes #o600
156 "Set the mode bits of all new mail files to this integer." 156 "Set the mode bits of all new mail files to this integer.
157This is decimal, not octal. The default is 384 (0600 in octal)."
157 :group 'nnmail-files 158 :group 'nnmail-files
158 :type 'integer) 159 :type 'integer)
159 160
diff --git a/lisp/printing.el b/lisp/printing.el
index 0d7013a30cf..c84ee54eb7f 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -1814,9 +1814,9 @@ See also `pr-temp-dir' and `pr-file-modes'."
1814;; It uses 0600 as default instead of (default-file-modes). 1814;; It uses 0600 as default instead of (default-file-modes).
1815;; So, by default, only the session owner have permission to deal with files 1815;; So, by default, only the session owner have permission to deal with files
1816;; generated by `printing'. 1816;; generated by `printing'.
1817(defcustom pr-file-modes ?\600 1817(defcustom pr-file-modes #o600
1818 "Specify the file permission bits for newly created files. 1818 "Specify the file permission bits for newly created files.
1819 1819This is decimal, not octal. The default is 384 (0600 in octal).
1820It should be an integer; only the low 9 bits are used. 1820It should be an integer; only the low 9 bits are used.
1821 1821
1822See also `pr-temp-dir' and `pr-ps-temp-file'." 1822See also `pr-temp-dir' and `pr-ps-temp-file'."
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 58f03e0c615..a282fbee3b1 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -96,9 +96,10 @@ See the command `recentf-save-list'."
96 96
97(defcustom recentf-save-file-modes #o600 97(defcustom recentf-save-file-modes #o600
98 "Mode bits of recentf save file, as an integer, or nil. 98 "Mode bits of recentf save file, as an integer, or nil.
99If non-nil, after writing `recentf-save-file', set its mode bits to 99If non-nil, after writing `recentf-save-file', set its mode bits to this
100this value. By default give R/W access only to the user who owns that 100value. This is decimal, not octal. The default is 384 (0600 in octal),
101file. See also the function `set-file-modes'." 101which gives R/W access only to the user who owns that file. See also
102the function `set-file-modes'."
102 :group 'recentf 103 :group 'recentf
103 :type '(choice (const :tag "Don't change" nil) 104 :type '(choice (const :tag "Don't change" nil)
104 integer)) 105 integer))
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 03f280d080f..d67785d96fa 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1218,8 +1218,9 @@ Instead, C-h would jump to previous difference."
1218(define-obsolete-variable-alias 'ediff-temp-file-prefix 1218(define-obsolete-variable-alias 'ediff-temp-file-prefix
1219 'temporary-file-directory "28.1") 1219 'temporary-file-directory "28.1")
1220 1220
1221(defcustom ediff-temp-file-mode 384 ; u=rw only 1221(defcustom ediff-temp-file-mode #o0600
1222 "Mode for Ediff temporary files." 1222 "Mode for Ediff temporary files.
1223This is decimal, not octal. The default is 384 (0600 in octal)."
1223 :type 'integer 1224 :type 'integer
1224 :group 'ediff) 1225 :group 'ediff)
1225 1226
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index ca48f2f3c7b..45405028df9 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -233,8 +233,9 @@ Do not start with `~/' or `~USERNAME/'."
233 "customize `temporary-file-directory' instead." 233 "customize `temporary-file-directory' instead."
234 "24.4" 'set) 234 "24.4" 'set)
235 235
236(defcustom emerge-temp-file-mode 384 ; u=rw only 236(defcustom emerge-temp-file-mode #o600
237 "Mode for Emerge temporary files." 237 "Mode for Emerge temporary files.
238This is decimal, not octal. The default is 384 (0600 in octal)."
238 :type 'integer) 239 :type 'integer)
239 240
240(make-obsolete-variable 'emerge-temp-file-mode 241(make-obsolete-variable 'emerge-temp-file-mode