mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 05:00:47 -08:00
auto upstream
This commit is contained in:
commit
1c05adeed6
13 changed files with 267 additions and 86 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2013-01-07 Bastien Guerry <bzg@gnu.org>
|
||||
|
||||
* help.texi (Apropos): Document `apropos-user-option' and update
|
||||
the doc for `apropos-variable'.
|
||||
|
||||
2013-01-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* text.texi (HTML Mode): Remove deleted nxml C-RET binding.
|
||||
|
|
|
|||
|
|
@ -295,11 +295,16 @@ search for noninteractive functions too.
|
|||
Search for functions and variables. Both interactive functions
|
||||
(commands) and noninteractive functions can be found by this.
|
||||
|
||||
@item M-x apropos-variable
|
||||
@findex apropos-variable
|
||||
@item M-x apropos-user-option
|
||||
@findex apropos-user-option
|
||||
Search for user-customizable variables. With a prefix argument,
|
||||
search for non-customizable variables too.
|
||||
|
||||
@item M-x apropos-variable
|
||||
@findex apropos-variable
|
||||
Search for variables. With a prefix argument, search for
|
||||
customizable variables only.
|
||||
|
||||
@item M-x apropos-value
|
||||
@findex apropos-value
|
||||
Search for variables whose values match the specified pattern. With a
|
||||
|
|
|
|||
|
|
@ -1,3 +1,50 @@
|
|||
2013-01-07 Bastien Guerry <bzg@gnu.org>
|
||||
|
||||
* menu-bar.el (menu-bar-search-documentation-menu): Use
|
||||
`apropos-user-option' and fix the help message.
|
||||
|
||||
2013-01-07 Bastien Guerry <bzg@gnu.org>
|
||||
|
||||
* apropos.el (apropos-do-all): Update docstring.
|
||||
(apropos-user-option-button): New face.
|
||||
(apropos-user-option): Rename from `apropos-variable' and update
|
||||
docstring.
|
||||
(apropos-variable): Rewrite, now show all variables by default.
|
||||
(apropos-print): Mention "User option" instead of "Variable" when
|
||||
printing doc for user options. (Bug#13276)
|
||||
|
||||
2013-01-07 Jürgen Hötzel <juergen@archlinux.org>
|
||||
|
||||
* net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls):
|
||||
Handle filename correctly, when parsing "source -> target" symlink
|
||||
output.
|
||||
(tramp-adb-handle-set-file-times): New defun.
|
||||
|
||||
2013-01-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the
|
||||
advice list when the interactive-spec of ad-Advice-* changes.
|
||||
|
||||
2013-01-07 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* wid-edit.el (widget-default-get): Work for inlined elements.
|
||||
(Bug#12670)
|
||||
|
||||
2013-01-07 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-default-host-alist): New defcustom.
|
||||
(tramp-find-host): Use it.
|
||||
(tramp-eshell-directory-change): Move from tramp-sh.el. Add to
|
||||
`eshell-directory-change-hook'.
|
||||
|
||||
* net/tramp-adb.el (top): Add adb specific entry in
|
||||
`tramp-default-host-alist'.
|
||||
(tramp-adb-file-name-host): Remove function.
|
||||
(tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection):
|
||||
Use `tramp-file-name-host' instead of `tramp-adb-file-name-host'.
|
||||
|
||||
* net/tramp-sh.el: Move eshell integration code to tramp.el.
|
||||
|
||||
2013-01-06 Jürgen Hötzel <juergen@archlinux.org>
|
||||
|
||||
* net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry.
|
||||
|
|
@ -5,9 +52,9 @@
|
|||
2013-01-06 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can
|
||||
consist of mor than one digit.
|
||||
(tramp-adb-file-name-handler-alist): Use
|
||||
`tramp-handle-file-exists-p' consistently.
|
||||
consist of more than one digit.
|
||||
(tramp-adb-file-name-handler-alist):
|
||||
Use `tramp-handle-file-exists-p' consistently.
|
||||
(tramp-adb-file-name-handler): Don't tweak `tramp-default-host'.
|
||||
(tramp-adb-handle-file-exists-p): Remove function.
|
||||
(tramp-adb-file-name-host): New defun.
|
||||
|
|
@ -141,8 +188,8 @@
|
|||
(tramp-do-copy-or-rename-file): Ignore errors when calling
|
||||
`set-file-extended-attributes'.
|
||||
|
||||
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
|
||||
handler for `file-acl'.
|
||||
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
|
||||
Add handler for `file-acl'.
|
||||
(tramp-smb-handle-file-acl): New defun.
|
||||
|
||||
2013-01-02 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
"Non nil means apropos commands will search more extensively.
|
||||
This may be slower. This option affects the following commands:
|
||||
|
||||
`apropos-variable' will search all variables, not just user variables.
|
||||
`apropos-user-option' will search all variables, not just user options.
|
||||
`apropos-command' will also search non-interactive functions.
|
||||
`apropos' will search all symbols, not just functions, variables, faces,
|
||||
and those with property lists.
|
||||
|
|
@ -115,6 +115,12 @@ include key-binding information in its output."
|
|||
:group 'apropos
|
||||
:version "24.3")
|
||||
|
||||
(defface apropos-user-option-button
|
||||
'((t (:inherit (font-lock-variable-name-face button))))
|
||||
"Button face indicating a user option in Apropos."
|
||||
:group 'apropos
|
||||
:version "24.4")
|
||||
|
||||
(defface apropos-misc-button
|
||||
'((t (:inherit (font-lock-constant-face button))))
|
||||
"Button face indicating a miscellaneous object type in Apropos."
|
||||
|
|
@ -261,6 +267,15 @@ term, and the rest of the words are alternative terms.")
|
|||
'action (lambda (button)
|
||||
(describe-variable (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-user-option
|
||||
'apropos-label "User option"
|
||||
'apropos-short-label "o"
|
||||
'face 'apropos-user-option-button
|
||||
'help-echo "mouse-2, RET: Display more help on this user option"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-variable (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-face
|
||||
'apropos-label "Face"
|
||||
'apropos-short-label "F"
|
||||
|
|
@ -461,15 +476,15 @@ This requires that at least 2 keywords (unless only one was given)."
|
|||
This is used to decide whether to print the result's type or not.")
|
||||
|
||||
;;;###autoload
|
||||
(defun apropos-variable (pattern &optional do-all)
|
||||
"Show user variables that match PATTERN.
|
||||
(defun apropos-user-option (pattern &optional do-all)
|
||||
"Show user options that match PATTERN.
|
||||
PATTERN can be a word, a list of words (separated by spaces),
|
||||
or a regexp (using some regexp special characters). If it is a word,
|
||||
search for matches for that word as a substring. If it is a list of words,
|
||||
search for matches for any two (or more) of those words.
|
||||
|
||||
With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, also show
|
||||
normal variables."
|
||||
variables, not just user options."
|
||||
(interactive (list (apropos-read-pattern
|
||||
(if (or current-prefix-arg apropos-do-all)
|
||||
"variable" "user option"))
|
||||
|
|
@ -481,6 +496,17 @@ normal variables."
|
|||
(get symbol 'variable-documentation)))
|
||||
'custom-variable-p)))
|
||||
|
||||
;;;###autoload
|
||||
(defun apropos-variable (pattern &optional do-not-all)
|
||||
"Show variables that match PATTERN.
|
||||
When DO-NOT-ALL is not-nil, show user options only, i.e. behave
|
||||
like `apropos-user-option'."
|
||||
(interactive (list (apropos-read-pattern
|
||||
(if current-prefix-arg "user option" "variable"))
|
||||
current-prefix-arg))
|
||||
(let ((apropos-do-all (if do-not-all nil t)))
|
||||
(apropos-user-option pattern)))
|
||||
|
||||
;; For auld lang syne:
|
||||
;;;###autoload
|
||||
(defalias 'command-apropos 'apropos-command)
|
||||
|
|
@ -1099,7 +1125,11 @@ If non-nil TEXT is a string that will be printed as a heading."
|
|||
'apropos-macro
|
||||
'apropos-function))
|
||||
(not nosubst))
|
||||
(apropos-print-doc 3 'apropos-variable (not nosubst))
|
||||
(apropos-print-doc 3
|
||||
(if (custom-variable-p symbol)
|
||||
'apropos-user-option
|
||||
'apropos-variable)
|
||||
(not nosubst))
|
||||
(apropos-print-doc 7 'apropos-group t)
|
||||
(apropos-print-doc 6 'apropos-face t)
|
||||
(apropos-print-doc 5 'apropos-widget t)
|
||||
|
|
|
|||
|
|
@ -2917,13 +2917,18 @@ If COMPILE is nil then the result depends on the value of
|
|||
"Redefine FUNCTION with its advised definition from cache or scratch.
|
||||
The resulting FUNCTION will be compiled if `ad-should-compile' returns t.
|
||||
The current definition and its cache-id will be put into the cache."
|
||||
(let ((verified-cached-definition
|
||||
(let* ((verified-cached-definition
|
||||
(if (ad-verify-cache-id function)
|
||||
(ad-get-cache-definition function)))
|
||||
(advicefunname (ad-get-advice-info-field function 'advicefunname)))
|
||||
(advicefunname (ad-get-advice-info-field function 'advicefunname))
|
||||
(old-ispec (interactive-form advicefunname)))
|
||||
(fset advicefunname
|
||||
(or verified-cached-definition
|
||||
(ad-make-advised-definition function)))
|
||||
(unless (equal (interactive-form advicefunname) old-ispec)
|
||||
;; If the interactive-spec of advicefunname has changed, force nadvice to
|
||||
;; refresh its copy.
|
||||
(advice-remove function advicefunname))
|
||||
(advice-add function :around advicefunname)
|
||||
(if (ad-should-compile function compile)
|
||||
(ad-compile-function function))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
2013-01-07 Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
* mml-smime.el: Support signing by sender.
|
||||
Requested by Uwe Brauer.
|
||||
(mml-smime-sign-with-sender): New user option analogous
|
||||
to mml2015-sign-with-sender.
|
||||
(mml-smime-epg-sign): Respect mml-smime-sign-with-sender.
|
||||
(mml-smime-epg-find-usable-secret-key): New helper function copied from
|
||||
mml2015.el.
|
||||
|
||||
2012-12-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus
|
||||
|
|
|
|||
|
|
@ -74,6 +74,11 @@ Whether the passphrase is cached at all is controlled by
|
|||
:group 'mime-security
|
||||
:type '(repeat (string :tag "Key ID")))
|
||||
|
||||
(defcustom mml-smime-sign-with-sender nil
|
||||
"If t, use message sender so find a key to sign with."
|
||||
:group 'mime-security
|
||||
:type 'boolean)
|
||||
|
||||
(defun mml-smime-sign (cont)
|
||||
(let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist))))
|
||||
(if func
|
||||
|
|
@ -366,6 +371,24 @@ Whether the passphrase is cached at all is controlled by
|
|||
(setq pointer (cdr pointer))))
|
||||
(setq keys (cdr keys)))))
|
||||
|
||||
;; XXX: since gpg --list-secret-keys does not return validity of each
|
||||
;; key, `mml-smime-epg-find-usable-key' defined above is not enough for
|
||||
;; secret keys. The function `mml-smime-epg-find-usable-secret-key'
|
||||
;; below looks at appropriate public keys to check usability.
|
||||
(defun mml-smime-epg-find-usable-secret-key (context name usage)
|
||||
(let ((secret-keys (epg-list-keys context name t))
|
||||
secret-key)
|
||||
(while (and (not secret-key) secret-keys)
|
||||
(if (mml-smime-epg-find-usable-key
|
||||
(epg-list-keys context (epg-sub-key-fingerprint
|
||||
(car (epg-key-sub-key-list
|
||||
(car secret-keys)))))
|
||||
usage)
|
||||
(setq secret-key (car secret-keys)
|
||||
secret-keys nil)
|
||||
(setq secret-keys (cdr secret-keys))))
|
||||
secret-key))
|
||||
|
||||
(autoload 'mml-compute-boundary "mml")
|
||||
|
||||
;; We require mm-decode, which requires mm-bodies, which autoloads
|
||||
|
|
@ -376,6 +399,10 @@ Whether the passphrase is cached at all is controlled by
|
|||
(let* ((inhibit-redisplay t)
|
||||
(context (epg-make-context 'CMS))
|
||||
(boundary (mml-compute-boundary cont))
|
||||
(sender (message-options-get 'message-sender))
|
||||
(signer-names (or mml-smime-signers
|
||||
(if (and mml-smime-sign-with-sender sender)
|
||||
(list (concat "<" sender ">")))))
|
||||
signer-key
|
||||
(signers
|
||||
(or (message-options-get 'mml-smime-epg-signers)
|
||||
|
|
@ -385,20 +412,23 @@ Whether the passphrase is cached at all is controlled by
|
|||
(epa-select-keys context "\
|
||||
Select keys for signing.
|
||||
If no one is selected, default secret key is used. "
|
||||
mml-smime-signers t)
|
||||
(if mml-smime-signers
|
||||
signer-names
|
||||
t)
|
||||
(if (or sender mml-smime-signers)
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (signer)
|
||||
(setq signer-key (mml-smime-epg-find-usable-key
|
||||
(epg-list-keys context signer t)
|
||||
'sign))
|
||||
(setq signer-key
|
||||
(mml-smime-epg-find-usable-secret-key
|
||||
context signer 'sign))
|
||||
(unless (or signer-key
|
||||
(y-or-n-p
|
||||
(format "No secret key for %s; skip it? "
|
||||
(format
|
||||
"No secret key for %s; skip it? "
|
||||
signer)))
|
||||
(error "No secret key for %s" signer))
|
||||
signer-key)
|
||||
mml-smime-signers))))))
|
||||
signer-names)))))))
|
||||
signature micalg)
|
||||
(epg-context-set-signers context signers)
|
||||
(if mml-smime-cache-passphrase
|
||||
|
|
|
|||
|
|
@ -1637,8 +1637,8 @@ key, a click, or a menu-item"))
|
|||
'(menu-item "Find Options by Value..." apropos-value
|
||||
:help "Find variables whose values match a regexp"))
|
||||
(bindings--define-key menu [find-options-by-name]
|
||||
'(menu-item "Find Options by Name..." apropos-variable
|
||||
:help "Find variables whose names match a regexp"))
|
||||
'(menu-item "Find Options by Name..." apropos-user-option
|
||||
:help "Find user options whose names match a regexp"))
|
||||
(bindings--define-key menu [find-commands-by-name]
|
||||
'(menu-item "Find Commands by Name..." apropos-command
|
||||
:help "Find commands whose names match a regexp"))
|
||||
|
|
|
|||
|
|
@ -66,9 +66,13 @@
|
|||
"[[:space:]]+\\(.*\\)$")) ; \6 filename
|
||||
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods `(,tramp-adb-method
|
||||
(add-to-list 'tramp-methods
|
||||
`(,tramp-adb-method
|
||||
(tramp-tmpdir "/data/local/tmp")))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-default-host-alist `(,tramp-adb-method nil ""))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(eval-after-load 'tramp
|
||||
'(tramp-set-completion-function
|
||||
|
|
@ -119,7 +123,7 @@
|
|||
(vc-registered . ignore) ;no vc control files on Android devices
|
||||
(write-region . tramp-adb-handle-write-region)
|
||||
(set-file-modes . tramp-adb-handle-set-file-modes)
|
||||
(set-file-times . ignore)
|
||||
(set-file-times . tramp-adb-handle-set-file-times)
|
||||
(copy-file . tramp-adb-handle-copy-file)
|
||||
(rename-file . tramp-adb-handle-rename-file)
|
||||
(process-file . tramp-adb-handle-process-file)
|
||||
|
|
@ -307,7 +311,9 @@ pass to the OPERATION."
|
|||
(and is-symlink
|
||||
(cadr (split-string name "\\( -> \\|\n\\)")))))
|
||||
(push (list
|
||||
name
|
||||
(if is-symlink
|
||||
(car (split-string name "\\( -> \\|\n\\)"))
|
||||
name)
|
||||
(or is-dir symlink-target)
|
||||
1 ;link-count
|
||||
;; no way to handle numeric ids in Androids ash
|
||||
|
|
@ -611,6 +617,19 @@ But handle the case, if the \"test\" command is not available."
|
|||
v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname)
|
||||
"Error while changing file's mode %s" filename)))
|
||||
|
||||
(defun tramp-adb-handle-set-file-times (filename &optional time)
|
||||
"Like `set-file-times' for Tramp files."
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
(tramp-flush-file-property v localname)
|
||||
(let ((time (if (or (null time) (equal time '(0 0)))
|
||||
(current-time)
|
||||
time)))
|
||||
(tramp-adb-command-exit-status
|
||||
;; use shell arithmetic because of Emacs integer size limit
|
||||
v (format "touch -t $(( %d * 65536 + %d )) %s"
|
||||
(car time) (cadr time)
|
||||
(tramp-shell-quote-argument localname))))))
|
||||
|
||||
(defun tramp-adb-handle-copy-file
|
||||
(filename newname &optional ok-if-already-exists keep-date
|
||||
preserve-uid-gid preserve-extended-attributes)
|
||||
|
|
@ -937,17 +956,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
|
|||
|
||||
;; Helper functions.
|
||||
|
||||
(defun tramp-adb-file-name-host (vec)
|
||||
"Return host component of VEC.
|
||||
If it is equal to the default value of `tramp-default-host', `nil' is returned."
|
||||
(let ((host (tramp-file-name-host vec)))
|
||||
(unless (equal host (eval (car (get 'tramp-default-host 'standard-value))))
|
||||
host)))
|
||||
|
||||
(defun tramp-adb-execute-adb-command (vec &rest args)
|
||||
"Returns nil on success error-output on failure."
|
||||
(when (tramp-adb-file-name-host vec)
|
||||
(setq args (append (list "-s" (tramp-adb-file-name-host vec)) args)))
|
||||
(when (> (length (tramp-file-name-host vec)) 0)
|
||||
(setq args (append (list "-s" (tramp-file-name-host vec)) args)))
|
||||
(with-temp-buffer
|
||||
(prog1
|
||||
(unless (zerop (apply 'call-process (tramp-adb-program) nil t nil args))
|
||||
|
|
@ -1048,6 +1060,7 @@ Does not do anything if a connection is already open, but re-opens the
|
|||
connection if a previous connection has died for some reason."
|
||||
(let* ((buf (tramp-get-connection-buffer vec))
|
||||
(p (get-buffer-process buf))
|
||||
(host (tramp-file-name-host vec))
|
||||
(devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
|
||||
(unless
|
||||
(and p (processp p) (memq (process-status p) '(run open)))
|
||||
|
|
@ -1055,21 +1068,17 @@ connection if a previous connection has died for some reason."
|
|||
(when (and p (processp p)) (delete-process p))
|
||||
(if (not devices)
|
||||
(tramp-error vec 'file-error "No device connected"))
|
||||
(if (and (tramp-adb-file-name-host vec)
|
||||
(not (member (tramp-adb-file-name-host vec) devices)))
|
||||
(tramp-error
|
||||
vec 'file-error
|
||||
"Device %s not connected" (tramp-adb-file-name-host vec)))
|
||||
(if (and (not (eq (length devices) 1))
|
||||
(not (tramp-adb-file-name-host vec)))
|
||||
(if (and (> (length host) 0) (not (member host devices)))
|
||||
(tramp-error vec 'file-error "Device %s not connected" host))
|
||||
(if (and (> (length devices) 1) (zerop (length host)))
|
||||
(tramp-error
|
||||
vec 'file-error
|
||||
"Multiple Devices connected: No Host/Device specified"))
|
||||
(with-tramp-progress-reporter vec 3 "Opening adb shell connection"
|
||||
(let* ((coding-system-for-read 'utf-8-dos) ;is this correct?
|
||||
(process-connection-type tramp-process-connection-type)
|
||||
(args (if (tramp-adb-file-name-host vec)
|
||||
(list "-s" (tramp-adb-file-name-host vec) "shell")
|
||||
(args (if (> (length host) 0)
|
||||
(list "-s" host "shell")
|
||||
(list "shell")))
|
||||
(p (let ((default-directory
|
||||
(tramp-compat-temporary-file-directory)))
|
||||
|
|
|
|||
|
|
@ -5181,34 +5181,6 @@ function cell is returned to be applied on a buffer."
|
|||
(t
|
||||
(format "%s <%%s" coding)))))))
|
||||
|
||||
;;; Integration of eshell.el:
|
||||
|
||||
(eval-when-compile
|
||||
(defvar eshell-path-env))
|
||||
|
||||
;; eshell.el keeps the path in `eshell-path-env'. We must change it
|
||||
;; when `default-directory' points to another host.
|
||||
(defun tramp-eshell-directory-change ()
|
||||
"Set `eshell-path-env' to $PATH of the host related to `default-directory'."
|
||||
(setq eshell-path-env
|
||||
(if (file-remote-p default-directory)
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
(mapconcat
|
||||
'identity
|
||||
(tramp-get-remote-path v)
|
||||
":"))
|
||||
(getenv "PATH"))))
|
||||
|
||||
(eval-after-load "esh-util"
|
||||
'(progn
|
||||
(tramp-eshell-directory-change)
|
||||
(add-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(remove-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)))))
|
||||
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(unload-feature 'tramp-sh 'force)))
|
||||
|
|
|
|||
|
|
@ -381,6 +381,22 @@ Useful for su and sudo methods mostly."
|
|||
:group 'tramp
|
||||
:type 'string)
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defcustom tramp-default-host-alist nil
|
||||
"Default host to use for specific method/user pairs.
|
||||
This is an alist of items (METHOD USER HOST). The first matching item
|
||||
specifies the host to use for a file name which does not specify a
|
||||
host. METHOD and HOST are regular expressions or nil, which is
|
||||
interpreted as a regular expression which always matches. If no entry
|
||||
matches, the variable `tramp-default-host' takes effect.
|
||||
|
||||
If the file name does not specify the method, lookup is done using the
|
||||
empty string for the method name."
|
||||
:group 'tramp
|
||||
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
|
||||
(choice :tag " User regexp" regexp sexp)
|
||||
(choice :tag " Host name" string (const nil)))))
|
||||
|
||||
(defcustom tramp-default-proxies-alist nil
|
||||
"Route to be followed for specific host/user pairs.
|
||||
This is an alist of items (HOST USER PROXY). The first matching
|
||||
|
|
@ -918,7 +934,7 @@ See `tramp-file-name-structure' for more explanations.")
|
|||
This regexp should match partial Tramp file names only.
|
||||
|
||||
Please note that the entry in `file-name-handler-alist' is made when
|
||||
this file (tramp.el) is loaded. This means that this variable must be set
|
||||
this file \(tramp.el\) is loaded. This means that this variable must be set
|
||||
before loading tramp.el. Alternatively, `file-name-handler-alist' can be
|
||||
updated after changing this variable.
|
||||
|
||||
|
|
@ -1163,6 +1179,15 @@ This is USER, if non-nil. Otherwise, do a lookup in
|
|||
"Return the right host string to use.
|
||||
This is HOST, if non-nil. Otherwise, it is `tramp-default-host'."
|
||||
(or (and (> (length host) 0) host)
|
||||
(let ((choices tramp-default-host-alist)
|
||||
lhost item)
|
||||
(while choices
|
||||
(setq item (pop choices))
|
||||
(when (and (string-match (or (nth 0 item) "") (or method ""))
|
||||
(string-match (or (nth 1 item) "") (or user "")))
|
||||
(setq lhost (nth 2 item))
|
||||
(setq choices nil)))
|
||||
lhost)
|
||||
tramp-default-host))
|
||||
|
||||
(defun tramp-dissect-file-name (name &optional nodefault)
|
||||
|
|
@ -3861,6 +3886,34 @@ Only works for Bourne-like shells."
|
|||
t t result)))
|
||||
result))))
|
||||
|
||||
;;; Integration of eshell.el:
|
||||
|
||||
(eval-when-compile
|
||||
(defvar eshell-path-env))
|
||||
|
||||
;; eshell.el keeps the path in `eshell-path-env'. We must change it
|
||||
;; when `default-directory' points to another host.
|
||||
(defun tramp-eshell-directory-change ()
|
||||
"Set `eshell-path-env' to $PATH of the host related to `default-directory'."
|
||||
(setq eshell-path-env
|
||||
(if (file-remote-p default-directory)
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
(mapconcat
|
||||
'identity
|
||||
(tramp-get-connection-property v "remote-path" nil)
|
||||
":"))
|
||||
(getenv "PATH"))))
|
||||
|
||||
(eval-after-load "esh-util"
|
||||
'(progn
|
||||
(tramp-eshell-directory-change)
|
||||
(add-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(remove-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)))))
|
||||
|
||||
;; Checklist for `tramp-unload-hook'
|
||||
;; - Unload all `tramp-*' packages
|
||||
;; - Reset `file-name-handler-alist'
|
||||
|
|
|
|||
|
|
@ -526,7 +526,16 @@ Otherwise, just return the value."
|
|||
"Extract the default external value of WIDGET."
|
||||
(widget-apply widget :value-to-external
|
||||
(or (widget-get widget :value)
|
||||
(widget-apply widget :default-get))))
|
||||
(progn
|
||||
(when (widget-get widget :args)
|
||||
(let (args)
|
||||
(dolist (arg (widget-get widget :args))
|
||||
(setq args (append args
|
||||
(if (widget-get arg :inline)
|
||||
(widget-get arg :args)
|
||||
(list arg)))))
|
||||
(widget-put widget :args args)))
|
||||
(widget-apply widget :default-get)))))
|
||||
|
||||
(defun widget-match-inline (widget vals)
|
||||
"In WIDGET, match the start of VALS."
|
||||
|
|
|
|||
|
|
@ -107,6 +107,12 @@
|
|||
(lambda (f &rest args)
|
||||
(cons (cons 2 (called-interactively-p)) (apply f args))))
|
||||
(should (equal (call-interactively 'sm-test7) '((2 . t) (1 . t) 11)))
|
||||
|
||||
;; Check handling of interactive spec.
|
||||
(defun sm-test8 (a) (interactive "p") a)
|
||||
(defadvice sm-test8 (before adv1 activate) nil)
|
||||
(defadvice sm-test8 (before adv2 activate) (interactive "P") nil)
|
||||
(should (equal (interactive-form 'sm-test8) '(interactive "P")))
|
||||
))
|
||||
|
||||
;; Local Variables:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue