diff options
| author | Michael Albinus | 2018-11-10 15:55:23 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-11-10 15:55:23 +0100 |
| commit | 55f3f21b39389263d707b091d7e1b45d295a149c (patch) | |
| tree | 8c3ffe1a51ca3a45b55701c8276343b5167514a4 | |
| parent | 70c75167ede4c54bb796187146437120856f890b (diff) | |
| download | emacs-55f3f21b39389263d707b091d7e1b45d295a149c.tar.gz emacs-55f3f21b39389263d707b091d7e1b45d295a149c.zip | |
* lisp/net/tramp.el (tramp-get-local-gid): Use `group-name' if available.
| -rw-r--r-- | lisp/net/tramp.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4ee69d71986..44d66404f15 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4193,10 +4193,14 @@ ID-FORMAT valid values are `string' and `integer'." | |||
| 4193 | (defun tramp-get-local-gid (id-format) | 4193 | (defun tramp-get-local-gid (id-format) |
| 4194 | "The gid of the local user, in ID-FORMAT. | 4194 | "The gid of the local user, in ID-FORMAT. |
| 4195 | ID-FORMAT valid values are `string' and `integer'." | 4195 | ID-FORMAT valid values are `string' and `integer'." |
| 4196 | ;; `group-gid' has been introduced with Emacs 24.4. | 4196 | (cond |
| 4197 | (if (and (fboundp 'group-gid) (equal id-format 'integer)) | 4197 | ;; `group-gid' has been introduced with Emacs 24.4. |
| 4198 | (tramp-compat-funcall 'group-gid) | 4198 | ((and (fboundp 'group-gid) (equal id-format 'integer)) |
| 4199 | (tramp-compat-file-attribute-group-id (file-attributes "~/" id-format)))) | 4199 | (tramp-compat-funcall 'group-gid)) |
| 4200 | ;; `group-name' has been introduced with Emacs 27.1. | ||
| 4201 | ((and (fboundp 'group-name) (equal id-format 'string)) | ||
| 4202 | (tramp-compat-funcall 'group-name (tramp-compat-funcall 'group-gid))) | ||
| 4203 | ((tramp-compat-file-attribute-group-id (file-attributes "~/" id-format))))) | ||
| 4200 | 4204 | ||
| 4201 | (defun tramp-get-local-locale (&optional vec) | 4205 | (defun tramp-get-local-locale (&optional vec) |
| 4202 | "Determine locale, supporting UTF8 if possible. | 4206 | "Determine locale, supporting UTF8 if possible. |