diff options
author | Glenn Morris <rgm@gnu.org> | 2013-01-04 11:22:37 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-01-04 11:22:37 -0800 |
commit | 0f668a4db4a33f98f84613513af3efea521b4847 (patch) | |
tree | ab85f709ca11c2390dddfc1756656293d6762e55 /lisp | |
parent | 4a1b123d1517bcad22f936df9c39b61fbc3e5359 (diff) | |
parent | 92d596112248baecbe6789d450d8e8ea405de19b (diff) | |
download | emacs-0f668a4db4a33f98f84613513af3efea521b4847.tar.gz emacs-0f668a4db4a33f98f84613513af3efea521b4847.tar.bz2 emacs-0f668a4db4a33f98f84613513af3efea521b4847.zip |
Merge from emacs-24; up to 2012-12-06T20:16:38Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 18 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 28 | ||||
-rw-r--r-- | lisp/progmodes/etags.el | 11 | ||||
-rw-r--r-- | lisp/term.el | 18 |
4 files changed, 53 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0dbe5ac0eb7..c34f256b955 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2013-01-04 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be + non-negative integers. Otherwise, the default values are used. + (tramp-convert-file-attributes): Convert uid and gid to integers. + +2013-01-04 Glenn Morris <rgm@gnu.org> + + * term.el (term-handle-colors-array): Ensure face attributes + are fully specified, not nil. (Bug#13337) + + * term.el (term-default-fg-color, term-default-bg-color): + Fix custom type. + + * progmodes/etags.el (tags-compression-info-list): Doc fix. + (tag-find-file-of-tag-noselect): Check auto-compression-mode + rather than 'jka-compr being loaded. (Bug#13338) + 2013-01-04 Wesley Dawson <whd@lavabit.com> (tiny change) * icomplete.el (icomplete-completions): diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5bbf1708654..79f8d82b02b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1452,23 +1452,22 @@ of." (defun tramp-set-file-uid-gid (filename &optional uid gid) "Set the ownership for FILENAME. If UID and GID are provided, these values are used; otherwise uid -and gid of the corresponding user is taken. Both parameters must be integers." +and gid of the corresponding user is taken. Both parameters must +be non-negative integers." ;; Modern Unices allow chown only for root. So we might need ;; another implementation, see `dired-do-chown'. OTOH, it is mostly ;; working with su(do)? when it is needed, so it shall succeed in ;; the majority of cases. ;; Don't modify `last-coding-system-used' by accident. - (let ((last-coding-system-used last-coding-system-used) - (uid (and (numberp uid) (round uid))) - (gid (and (numberp gid) (round gid)))) + (let ((last-coding-system-used last-coding-system-used)) (if (file-remote-p filename) (with-parsed-tramp-file-name filename nil (if (and (zerop (user-uid)) (tramp-local-host-p v)) ;; If we are root on the local host, we can do it directly. (tramp-set-file-uid-gid localname uid gid) - (let ((uid (or (and (integerp uid) uid) + (let ((uid (or (and (natnump uid) uid) (tramp-get-remote-uid v 'integer))) - (gid (or (and (integerp gid) gid) + (gid (or (and (natnump gid) gid) (tramp-get-remote-gid v 'integer)))) (tramp-send-command v (format @@ -1477,8 +1476,8 @@ and gid of the corresponding user is taken. Both parameters must be integers." ;; We handle also the local part, because there doesn't exist ;; `set-file-uid-gid'. On W32 "chown" might not work. - (let ((uid (or (and (integerp uid) uid) (tramp-get-local-uid 'integer))) - (gid (or (and (integerp gid) gid) (tramp-get-local-gid 'integer)))) + (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer))) + (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer)))) (tramp-compat-call-process "chown" nil nil nil (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))) @@ -4665,7 +4664,7 @@ raises an error." command (buffer-string)))))))) (defun tramp-convert-file-attributes (vec attr) - "Convert file-attributes ATTR generated by perl script, stat or ls. + "Convert `file-attributes' ATTR generated by perl script, stat or ls. Convert file mode bits to string and set virtual device number. Return ATTR." (when attr @@ -4673,6 +4672,17 @@ Return ATTR." (when (stringp (car attr)) (while (string-match tramp-color-escape-sequence-regexp (car attr)) (setcar attr (replace-match "" nil nil (car attr))))) + ;; Convert uid and gid. Use -1 as indication of unusable value. + (when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0)) + (setcar (nthcdr 2 attr) -1)) + (when (and (floatp (nth 2 attr)) + (<= (nth 2 attr) (tramp-compat-most-positive-fixnum))) + (setcar (nthcdr 2 attr) (round (nth 2 attr)))) + (when (and (numberp (nth 3 attr)) (< (nth 3 attr) 0)) + (setcar (nthcdr 3 attr) -1)) + (when (and (floatp (nth 3 attr)) + (<= (nth 3 attr) (tramp-compat-most-positive-fixnum))) + (setcar (nthcdr 3 attr) (round (nth 3 attr)))) ;; Convert last access time. (unless (listp (nth 4 attr)) (setcar (nthcdr 4 attr) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 0dfc7f27a9c..81dc31792c3 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -67,11 +67,8 @@ Use the `etags' program to make a tags table file." ;;;###autoload (defcustom tags-compression-info-list (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) - "List of extensions tried by etags when jka-compr is used. -An empty string means search the non-compressed file. -These extensions will be tried only if jka-compr was activated -\(i.e. via customize of `auto-compression-mode' or by calling the function -`auto-compression-mode')." + "List of extensions tried by etags when `auto-compression-mode' is on. +An empty string means search the non-compressed file." :version "24.1" ; added xz :type '(repeat string) :group 'etags) @@ -1182,7 +1179,7 @@ error message." "Find the right line in the specified FILE." ;; If interested in compressed-files, search files with extensions. ;; Otherwise, search only the real file. - (let* ((buffer-search-extensions (if (featurep 'jka-compr) + (let* ((buffer-search-extensions (if auto-compression-mode tags-compression-info-list '(""))) the-buffer @@ -1206,7 +1203,7 @@ error message." (setq file-search-extensions (cdr file-search-extensions)) (setq the-buffer (find-file-noselect (concat file (car file-search-extensions)))))) (if (not the-buffer) - (if (featurep 'jka-compr) + (if auto-compression-mode (error "File %s (with or without extensions %s) not found" file tags-compression-info-list) (error "File %s not found" file)) (set-buffer the-buffer)))) diff --git a/lisp/term.el b/lisp/term.el index fc7ec3ad0f9..b37e71280da 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -778,14 +778,14 @@ Buffer local variable.") (defcustom term-default-fg-color nil "If non-nil, default color for foreground in Term mode." :group 'term - :type 'string) + :type '(choice (const nil) (string :tag "color"))) (make-obsolete-variable 'term-default-fg-color "use the face `term' instead." "24.3") (defcustom term-default-bg-color nil "If non-nil, default color for foreground in Term mode." :group 'term - :type 'string) + :type '(choice (const nil) (string :tag "color"))) (make-obsolete-variable 'term-default-bg-color "use the face `term' instead." "24.3") @@ -3222,18 +3222,24 @@ See `term-prompt-regexp'." (let ((color (if term-ansi-current-reverse (face-foreground - (elt ansi-term-color-vector term-ansi-current-color)) + (elt ansi-term-color-vector term-ansi-current-color) + nil 'default) (face-background - (elt ansi-term-color-vector term-ansi-current-bg-color))))) + (elt ansi-term-color-vector term-ansi-current-bg-color) + nil 'default)))) (setq term-current-face (list :background color :foreground color)) ) ;; No need to bother with anything else if it's invisible. (setq term-current-face (list :foreground - (face-foreground (elt ansi-term-color-vector term-ansi-current-color)) + (face-foreground + (elt ansi-term-color-vector term-ansi-current-color) + nil 'default) :background - (face-background (elt ansi-term-color-vector term-ansi-current-bg-color)) + (face-background + (elt ansi-term-color-vector term-ansi-current-bg-color) + nil 'default) :inverse-video term-ansi-current-reverse)) (when term-ansi-current-bold |