diff options
| author | Joakim Verona | 2013-01-08 00:03:39 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-01-08 00:03:39 +0100 |
| commit | 1c05adeed60d0afbe9439bcc995bcd4b9e40a53b (patch) | |
| tree | 2b7791b68de6eb6f716c08077d872ce7bcf828ef | |
| parent | be73be611d160876f9df633ff3a2d86eb78f65c7 (diff) | |
| parent | acfe10b71c260718f72445cd984327c1d96063ab (diff) | |
| download | emacs-1c05adeed60d0afbe9439bcc995bcd4b9e40a53b.tar.gz emacs-1c05adeed60d0afbe9439bcc995bcd4b9e40a53b.zip | |
auto upstream
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/help.texi | 9 | ||||
| -rw-r--r-- | lisp/ChangeLog | 57 | ||||
| -rw-r--r-- | lisp/apropos.el | 40 | ||||
| -rw-r--r-- | lisp/emacs-lisp/advice.el | 13 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/gnus/mml-smime.el | 62 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-adb.el | 53 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 28 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 55 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 11 | ||||
| -rw-r--r-- | test/automated/advice-tests.el | 6 |
13 files changed, 267 insertions, 86 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 601949af88e..1b5bdc8fb53 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-01-07 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * help.texi (Apropos): Document `apropos-user-option' and update | ||
| 4 | the doc for `apropos-variable'. | ||
| 5 | |||
| 1 | 2013-01-05 Glenn Morris <rgm@gnu.org> | 6 | 2013-01-05 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * text.texi (HTML Mode): Remove deleted nxml C-RET binding. | 8 | * text.texi (HTML Mode): Remove deleted nxml C-RET binding. |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 0a0a3865d2d..75b250d0f40 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -295,11 +295,16 @@ search for noninteractive functions too. | |||
| 295 | Search for functions and variables. Both interactive functions | 295 | Search for functions and variables. Both interactive functions |
| 296 | (commands) and noninteractive functions can be found by this. | 296 | (commands) and noninteractive functions can be found by this. |
| 297 | 297 | ||
| 298 | @item M-x apropos-variable | 298 | @item M-x apropos-user-option |
| 299 | @findex apropos-variable | 299 | @findex apropos-user-option |
| 300 | Search for user-customizable variables. With a prefix argument, | 300 | Search for user-customizable variables. With a prefix argument, |
| 301 | search for non-customizable variables too. | 301 | search for non-customizable variables too. |
| 302 | 302 | ||
| 303 | @item M-x apropos-variable | ||
| 304 | @findex apropos-variable | ||
| 305 | Search for variables. With a prefix argument, search for | ||
| 306 | customizable variables only. | ||
| 307 | |||
| 303 | @item M-x apropos-value | 308 | @item M-x apropos-value |
| 304 | @findex apropos-value | 309 | @findex apropos-value |
| 305 | Search for variables whose values match the specified pattern. With a | 310 | Search for variables whose values match the specified pattern. With a |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9425ca5cdc2..185bf74bc05 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,50 @@ | |||
| 1 | 2013-01-07 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * menu-bar.el (menu-bar-search-documentation-menu): Use | ||
| 4 | `apropos-user-option' and fix the help message. | ||
| 5 | |||
| 6 | 2013-01-07 Bastien Guerry <bzg@gnu.org> | ||
| 7 | |||
| 8 | * apropos.el (apropos-do-all): Update docstring. | ||
| 9 | (apropos-user-option-button): New face. | ||
| 10 | (apropos-user-option): Rename from `apropos-variable' and update | ||
| 11 | docstring. | ||
| 12 | (apropos-variable): Rewrite, now show all variables by default. | ||
| 13 | (apropos-print): Mention "User option" instead of "Variable" when | ||
| 14 | printing doc for user options. (Bug#13276) | ||
| 15 | |||
| 16 | 2013-01-07 Jürgen Hötzel <juergen@archlinux.org> | ||
| 17 | |||
| 18 | * net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls): | ||
| 19 | Handle filename correctly, when parsing "source -> target" symlink | ||
| 20 | output. | ||
| 21 | (tramp-adb-handle-set-file-times): New defun. | ||
| 22 | |||
| 23 | 2013-01-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the | ||
| 26 | advice list when the interactive-spec of ad-Advice-* changes. | ||
| 27 | |||
| 28 | 2013-01-07 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 29 | |||
| 30 | * wid-edit.el (widget-default-get): Work for inlined elements. | ||
| 31 | (Bug#12670) | ||
| 32 | |||
| 33 | 2013-01-07 Michael Albinus <michael.albinus@gmx.de> | ||
| 34 | |||
| 35 | * net/tramp.el (tramp-default-host-alist): New defcustom. | ||
| 36 | (tramp-find-host): Use it. | ||
| 37 | (tramp-eshell-directory-change): Move from tramp-sh.el. Add to | ||
| 38 | `eshell-directory-change-hook'. | ||
| 39 | |||
| 40 | * net/tramp-adb.el (top): Add adb specific entry in | ||
| 41 | `tramp-default-host-alist'. | ||
| 42 | (tramp-adb-file-name-host): Remove function. | ||
| 43 | (tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection): | ||
| 44 | Use `tramp-file-name-host' instead of `tramp-adb-file-name-host'. | ||
| 45 | |||
| 46 | * net/tramp-sh.el: Move eshell integration code to tramp.el. | ||
| 47 | |||
| 1 | 2013-01-06 Jürgen Hötzel <juergen@archlinux.org> | 48 | 2013-01-06 Jürgen Hötzel <juergen@archlinux.org> |
| 2 | 49 | ||
| 3 | * net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry. | 50 | * net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry. |
| @@ -5,9 +52,9 @@ | |||
| 5 | 2013-01-06 Michael Albinus <michael.albinus@gmx.de> | 52 | 2013-01-06 Michael Albinus <michael.albinus@gmx.de> |
| 6 | 53 | ||
| 7 | * net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can | 54 | * net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can |
| 8 | consist of mor than one digit. | 55 | consist of more than one digit. |
| 9 | (tramp-adb-file-name-handler-alist): Use | 56 | (tramp-adb-file-name-handler-alist): |
| 10 | `tramp-handle-file-exists-p' consistently. | 57 | Use `tramp-handle-file-exists-p' consistently. |
| 11 | (tramp-adb-file-name-handler): Don't tweak `tramp-default-host'. | 58 | (tramp-adb-file-name-handler): Don't tweak `tramp-default-host'. |
| 12 | (tramp-adb-handle-file-exists-p): Remove function. | 59 | (tramp-adb-handle-file-exists-p): Remove function. |
| 13 | (tramp-adb-file-name-host): New defun. | 60 | (tramp-adb-file-name-host): New defun. |
| @@ -141,8 +188,8 @@ | |||
| 141 | (tramp-do-copy-or-rename-file): Ignore errors when calling | 188 | (tramp-do-copy-or-rename-file): Ignore errors when calling |
| 142 | `set-file-extended-attributes'. | 189 | `set-file-extended-attributes'. |
| 143 | 190 | ||
| 144 | * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add | 191 | * net/tramp-smb.el (tramp-smb-file-name-handler-alist): |
| 145 | handler for `file-acl'. | 192 | Add handler for `file-acl'. |
| 146 | (tramp-smb-handle-file-acl): New defun. | 193 | (tramp-smb-handle-file-acl): New defun. |
| 147 | 194 | ||
| 148 | 2013-01-02 Jay Belanger <jay.p.belanger@gmail.com> | 195 | 2013-01-02 Jay Belanger <jay.p.belanger@gmail.com> |
diff --git a/lisp/apropos.el b/lisp/apropos.el index 5f481f54e57..000d2d87d05 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | "Non nil means apropos commands will search more extensively. | 69 | "Non nil means apropos commands will search more extensively. |
| 70 | This may be slower. This option affects the following commands: | 70 | This may be slower. This option affects the following commands: |
| 71 | 71 | ||
| 72 | `apropos-variable' will search all variables, not just user variables. | 72 | `apropos-user-option' will search all variables, not just user options. |
| 73 | `apropos-command' will also search non-interactive functions. | 73 | `apropos-command' will also search non-interactive functions. |
| 74 | `apropos' will search all symbols, not just functions, variables, faces, | 74 | `apropos' will search all symbols, not just functions, variables, faces, |
| 75 | and those with property lists. | 75 | and those with property lists. |
| @@ -115,6 +115,12 @@ include key-binding information in its output." | |||
| 115 | :group 'apropos | 115 | :group 'apropos |
| 116 | :version "24.3") | 116 | :version "24.3") |
| 117 | 117 | ||
| 118 | (defface apropos-user-option-button | ||
| 119 | '((t (:inherit (font-lock-variable-name-face button)))) | ||
| 120 | "Button face indicating a user option in Apropos." | ||
| 121 | :group 'apropos | ||
| 122 | :version "24.4") | ||
| 123 | |||
| 118 | (defface apropos-misc-button | 124 | (defface apropos-misc-button |
| 119 | '((t (:inherit (font-lock-constant-face button)))) | 125 | '((t (:inherit (font-lock-constant-face button)))) |
| 120 | "Button face indicating a miscellaneous object type in Apropos." | 126 | "Button face indicating a miscellaneous object type in Apropos." |
| @@ -261,6 +267,15 @@ term, and the rest of the words are alternative terms.") | |||
| 261 | 'action (lambda (button) | 267 | 'action (lambda (button) |
| 262 | (describe-variable (button-get button 'apropos-symbol)))) | 268 | (describe-variable (button-get button 'apropos-symbol)))) |
| 263 | 269 | ||
| 270 | (define-button-type 'apropos-user-option | ||
| 271 | 'apropos-label "User option" | ||
| 272 | 'apropos-short-label "o" | ||
| 273 | 'face 'apropos-user-option-button | ||
| 274 | 'help-echo "mouse-2, RET: Display more help on this user option" | ||
| 275 | 'follow-link t | ||
| 276 | 'action (lambda (button) | ||
| 277 | (describe-variable (button-get button 'apropos-symbol)))) | ||
| 278 | |||
| 264 | (define-button-type 'apropos-face | 279 | (define-button-type 'apropos-face |
| 265 | 'apropos-label "Face" | 280 | 'apropos-label "Face" |
| 266 | 'apropos-short-label "F" | 281 | 'apropos-short-label "F" |
| @@ -461,15 +476,15 @@ This requires that at least 2 keywords (unless only one was given)." | |||
| 461 | This is used to decide whether to print the result's type or not.") | 476 | This is used to decide whether to print the result's type or not.") |
| 462 | 477 | ||
| 463 | ;;;###autoload | 478 | ;;;###autoload |
| 464 | (defun apropos-variable (pattern &optional do-all) | 479 | (defun apropos-user-option (pattern &optional do-all) |
| 465 | "Show user variables that match PATTERN. | 480 | "Show user options that match PATTERN. |
| 466 | PATTERN can be a word, a list of words (separated by spaces), | 481 | PATTERN can be a word, a list of words (separated by spaces), |
| 467 | or a regexp (using some regexp special characters). If it is a word, | 482 | or a regexp (using some regexp special characters). If it is a word, |
| 468 | search for matches for that word as a substring. If it is a list of words, | 483 | search for matches for that word as a substring. If it is a list of words, |
| 469 | search for matches for any two (or more) of those words. | 484 | search for matches for any two (or more) of those words. |
| 470 | 485 | ||
| 471 | With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, also show | 486 | With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, also show |
| 472 | normal variables." | 487 | variables, not just user options." |
| 473 | (interactive (list (apropos-read-pattern | 488 | (interactive (list (apropos-read-pattern |
| 474 | (if (or current-prefix-arg apropos-do-all) | 489 | (if (or current-prefix-arg apropos-do-all) |
| 475 | "variable" "user option")) | 490 | "variable" "user option")) |
| @@ -481,6 +496,17 @@ normal variables." | |||
| 481 | (get symbol 'variable-documentation))) | 496 | (get symbol 'variable-documentation))) |
| 482 | 'custom-variable-p))) | 497 | 'custom-variable-p))) |
| 483 | 498 | ||
| 499 | ;;;###autoload | ||
| 500 | (defun apropos-variable (pattern &optional do-not-all) | ||
| 501 | "Show variables that match PATTERN. | ||
| 502 | When DO-NOT-ALL is not-nil, show user options only, i.e. behave | ||
| 503 | like `apropos-user-option'." | ||
| 504 | (interactive (list (apropos-read-pattern | ||
| 505 | (if current-prefix-arg "user option" "variable")) | ||
| 506 | current-prefix-arg)) | ||
| 507 | (let ((apropos-do-all (if do-not-all nil t))) | ||
| 508 | (apropos-user-option pattern))) | ||
| 509 | |||
| 484 | ;; For auld lang syne: | 510 | ;; For auld lang syne: |
| 485 | ;;;###autoload | 511 | ;;;###autoload |
| 486 | (defalias 'command-apropos 'apropos-command) | 512 | (defalias 'command-apropos 'apropos-command) |
| @@ -1099,7 +1125,11 @@ If non-nil TEXT is a string that will be printed as a heading." | |||
| 1099 | 'apropos-macro | 1125 | 'apropos-macro |
| 1100 | 'apropos-function)) | 1126 | 'apropos-function)) |
| 1101 | (not nosubst)) | 1127 | (not nosubst)) |
| 1102 | (apropos-print-doc 3 'apropos-variable (not nosubst)) | 1128 | (apropos-print-doc 3 |
| 1129 | (if (custom-variable-p symbol) | ||
| 1130 | 'apropos-user-option | ||
| 1131 | 'apropos-variable) | ||
| 1132 | (not nosubst)) | ||
| 1103 | (apropos-print-doc 7 'apropos-group t) | 1133 | (apropos-print-doc 7 'apropos-group t) |
| 1104 | (apropos-print-doc 6 'apropos-face t) | 1134 | (apropos-print-doc 6 'apropos-face t) |
| 1105 | (apropos-print-doc 5 'apropos-widget t) | 1135 | (apropos-print-doc 5 'apropos-widget t) |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 7917b769ab8..d9d8e4f3b02 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2917,13 +2917,18 @@ If COMPILE is nil then the result depends on the value of | |||
| 2917 | "Redefine FUNCTION with its advised definition from cache or scratch. | 2917 | "Redefine FUNCTION with its advised definition from cache or scratch. |
| 2918 | The resulting FUNCTION will be compiled if `ad-should-compile' returns t. | 2918 | The resulting FUNCTION will be compiled if `ad-should-compile' returns t. |
| 2919 | The current definition and its cache-id will be put into the cache." | 2919 | The current definition and its cache-id will be put into the cache." |
| 2920 | (let ((verified-cached-definition | 2920 | (let* ((verified-cached-definition |
| 2921 | (if (ad-verify-cache-id function) | 2921 | (if (ad-verify-cache-id function) |
| 2922 | (ad-get-cache-definition function))) | 2922 | (ad-get-cache-definition function))) |
| 2923 | (advicefunname (ad-get-advice-info-field function 'advicefunname))) | 2923 | (advicefunname (ad-get-advice-info-field function 'advicefunname)) |
| 2924 | (old-ispec (interactive-form advicefunname))) | ||
| 2924 | (fset advicefunname | 2925 | (fset advicefunname |
| 2925 | (or verified-cached-definition | 2926 | (or verified-cached-definition |
| 2926 | (ad-make-advised-definition function))) | 2927 | (ad-make-advised-definition function))) |
| 2928 | (unless (equal (interactive-form advicefunname) old-ispec) | ||
| 2929 | ;; If the interactive-spec of advicefunname has changed, force nadvice to | ||
| 2930 | ;; refresh its copy. | ||
| 2931 | (advice-remove function advicefunname)) | ||
| 2927 | (advice-add function :around advicefunname) | 2932 | (advice-add function :around advicefunname) |
| 2928 | (if (ad-should-compile function compile) | 2933 | (if (ad-should-compile function compile) |
| 2929 | (ad-compile-function function)) | 2934 | (ad-compile-function function)) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c1140c526f6..40600fc20a9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-01-07 Daiki Ueno <ueno@gnu.org> | ||
| 2 | |||
| 3 | * mml-smime.el: Support signing by sender. | ||
| 4 | Requested by Uwe Brauer. | ||
| 5 | (mml-smime-sign-with-sender): New user option analogous | ||
| 6 | to mml2015-sign-with-sender. | ||
| 7 | (mml-smime-epg-sign): Respect mml-smime-sign-with-sender. | ||
| 8 | (mml-smime-epg-find-usable-secret-key): New helper function copied from | ||
| 9 | mml2015.el. | ||
| 10 | |||
| 1 | 2012-12-31 Lars Magne Ingebrigtsen <larsi@gnus.org> | 11 | 2012-12-31 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 12 | ||
| 3 | * gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus | 13 | * gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus |
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 3e769d396b0..e7f9de7980d 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el | |||
| @@ -74,6 +74,11 @@ Whether the passphrase is cached at all is controlled by | |||
| 74 | :group 'mime-security | 74 | :group 'mime-security |
| 75 | :type '(repeat (string :tag "Key ID"))) | 75 | :type '(repeat (string :tag "Key ID"))) |
| 76 | 76 | ||
| 77 | (defcustom mml-smime-sign-with-sender nil | ||
| 78 | "If t, use message sender so find a key to sign with." | ||
| 79 | :group 'mime-security | ||
| 80 | :type 'boolean) | ||
| 81 | |||
| 77 | (defun mml-smime-sign (cont) | 82 | (defun mml-smime-sign (cont) |
| 78 | (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) | 83 | (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) |
| 79 | (if func | 84 | (if func |
| @@ -366,6 +371,24 @@ Whether the passphrase is cached at all is controlled by | |||
| 366 | (setq pointer (cdr pointer)))) | 371 | (setq pointer (cdr pointer)))) |
| 367 | (setq keys (cdr keys))))) | 372 | (setq keys (cdr keys))))) |
| 368 | 373 | ||
| 374 | ;; XXX: since gpg --list-secret-keys does not return validity of each | ||
| 375 | ;; key, `mml-smime-epg-find-usable-key' defined above is not enough for | ||
| 376 | ;; secret keys. The function `mml-smime-epg-find-usable-secret-key' | ||
| 377 | ;; below looks at appropriate public keys to check usability. | ||
| 378 | (defun mml-smime-epg-find-usable-secret-key (context name usage) | ||
| 379 | (let ((secret-keys (epg-list-keys context name t)) | ||
| 380 | secret-key) | ||
| 381 | (while (and (not secret-key) secret-keys) | ||
| 382 | (if (mml-smime-epg-find-usable-key | ||
| 383 | (epg-list-keys context (epg-sub-key-fingerprint | ||
| 384 | (car (epg-key-sub-key-list | ||
| 385 | (car secret-keys))))) | ||
| 386 | usage) | ||
| 387 | (setq secret-key (car secret-keys) | ||
| 388 | secret-keys nil) | ||
| 389 | (setq secret-keys (cdr secret-keys)))) | ||
| 390 | secret-key)) | ||
| 391 | |||
| 369 | (autoload 'mml-compute-boundary "mml") | 392 | (autoload 'mml-compute-boundary "mml") |
| 370 | 393 | ||
| 371 | ;; We require mm-decode, which requires mm-bodies, which autoloads | 394 | ;; We require mm-decode, which requires mm-bodies, which autoloads |
| @@ -376,29 +399,36 @@ Whether the passphrase is cached at all is controlled by | |||
| 376 | (let* ((inhibit-redisplay t) | 399 | (let* ((inhibit-redisplay t) |
| 377 | (context (epg-make-context 'CMS)) | 400 | (context (epg-make-context 'CMS)) |
| 378 | (boundary (mml-compute-boundary cont)) | 401 | (boundary (mml-compute-boundary cont)) |
| 402 | (sender (message-options-get 'message-sender)) | ||
| 403 | (signer-names (or mml-smime-signers | ||
| 404 | (if (and mml-smime-sign-with-sender sender) | ||
| 405 | (list (concat "<" sender ">"))))) | ||
| 379 | signer-key | 406 | signer-key |
| 380 | (signers | 407 | (signers |
| 381 | (or (message-options-get 'mml-smime-epg-signers) | 408 | (or (message-options-get 'mml-smime-epg-signers) |
| 382 | (message-options-set | 409 | (message-options-set |
| 383 | 'mml-smime-epg-signers | 410 | 'mml-smime-epg-signers |
| 384 | (if (eq mm-sign-option 'guided) | 411 | (if (eq mm-sign-option 'guided) |
| 385 | (epa-select-keys context "\ | 412 | (epa-select-keys context "\ |
| 386 | Select keys for signing. | 413 | Select keys for signing. |
| 387 | If no one is selected, default secret key is used. " | 414 | If no one is selected, default secret key is used. " |
| 388 | mml-smime-signers t) | 415 | signer-names |
| 389 | (if mml-smime-signers | 416 | t) |
| 390 | (mapcar | 417 | (if (or sender mml-smime-signers) |
| 391 | (lambda (signer) | 418 | (delq nil |
| 392 | (setq signer-key (mml-smime-epg-find-usable-key | 419 | (mapcar |
| 393 | (epg-list-keys context signer t) | 420 | (lambda (signer) |
| 394 | 'sign)) | 421 | (setq signer-key |
| 395 | (unless (or signer-key | 422 | (mml-smime-epg-find-usable-secret-key |
| 396 | (y-or-n-p | 423 | context signer 'sign)) |
| 397 | (format "No secret key for %s; skip it? " | 424 | (unless (or signer-key |
| 425 | (y-or-n-p | ||
| 426 | (format | ||
| 427 | "No secret key for %s; skip it? " | ||
| 398 | signer))) | 428 | signer))) |
| 399 | (error "No secret key for %s" signer)) | 429 | (error "No secret key for %s" signer)) |
| 400 | signer-key) | 430 | signer-key) |
| 401 | mml-smime-signers)))))) | 431 | signer-names))))))) |
| 402 | signature micalg) | 432 | signature micalg) |
| 403 | (epg-context-set-signers context signers) | 433 | (epg-context-set-signers context signers) |
| 404 | (if mml-smime-cache-passphrase | 434 | (if mml-smime-cache-passphrase |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 024e2237cae..60f2bc2999f 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1637,8 +1637,8 @@ key, a click, or a menu-item")) | |||
| 1637 | '(menu-item "Find Options by Value..." apropos-value | 1637 | '(menu-item "Find Options by Value..." apropos-value |
| 1638 | :help "Find variables whose values match a regexp")) | 1638 | :help "Find variables whose values match a regexp")) |
| 1639 | (bindings--define-key menu [find-options-by-name] | 1639 | (bindings--define-key menu [find-options-by-name] |
| 1640 | '(menu-item "Find Options by Name..." apropos-variable | 1640 | '(menu-item "Find Options by Name..." apropos-user-option |
| 1641 | :help "Find variables whose names match a regexp")) | 1641 | :help "Find user options whose names match a regexp")) |
| 1642 | (bindings--define-key menu [find-commands-by-name] | 1642 | (bindings--define-key menu [find-commands-by-name] |
| 1643 | '(menu-item "Find Commands by Name..." apropos-command | 1643 | '(menu-item "Find Commands by Name..." apropos-command |
| 1644 | :help "Find commands whose names match a regexp")) | 1644 | :help "Find commands whose names match a regexp")) |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index bb9ff015ac3..f5aadd591d6 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -66,8 +66,12 @@ | |||
| 66 | "[[:space:]]+\\(.*\\)$")) ; \6 filename | 66 | "[[:space:]]+\\(.*\\)$")) ; \6 filename |
| 67 | 67 | ||
| 68 | ;;;###tramp-autoload | 68 | ;;;###tramp-autoload |
| 69 | (add-to-list 'tramp-methods `(,tramp-adb-method | 69 | (add-to-list 'tramp-methods |
| 70 | (tramp-tmpdir "/data/local/tmp"))) | 70 | `(,tramp-adb-method |
| 71 | (tramp-tmpdir "/data/local/tmp"))) | ||
| 72 | |||
| 73 | ;;;###tramp-autoload | ||
| 74 | (add-to-list 'tramp-default-host-alist `(,tramp-adb-method nil "")) | ||
| 71 | 75 | ||
| 72 | ;;;###tramp-autoload | 76 | ;;;###tramp-autoload |
| 73 | (eval-after-load 'tramp | 77 | (eval-after-load 'tramp |
| @@ -119,7 +123,7 @@ | |||
| 119 | (vc-registered . ignore) ;no vc control files on Android devices | 123 | (vc-registered . ignore) ;no vc control files on Android devices |
| 120 | (write-region . tramp-adb-handle-write-region) | 124 | (write-region . tramp-adb-handle-write-region) |
| 121 | (set-file-modes . tramp-adb-handle-set-file-modes) | 125 | (set-file-modes . tramp-adb-handle-set-file-modes) |
| 122 | (set-file-times . ignore) | 126 | (set-file-times . tramp-adb-handle-set-file-times) |
| 123 | (copy-file . tramp-adb-handle-copy-file) | 127 | (copy-file . tramp-adb-handle-copy-file) |
| 124 | (rename-file . tramp-adb-handle-rename-file) | 128 | (rename-file . tramp-adb-handle-rename-file) |
| 125 | (process-file . tramp-adb-handle-process-file) | 129 | (process-file . tramp-adb-handle-process-file) |
| @@ -307,7 +311,9 @@ pass to the OPERATION." | |||
| 307 | (and is-symlink | 311 | (and is-symlink |
| 308 | (cadr (split-string name "\\( -> \\|\n\\)"))))) | 312 | (cadr (split-string name "\\( -> \\|\n\\)"))))) |
| 309 | (push (list | 313 | (push (list |
| 310 | name | 314 | (if is-symlink |
| 315 | (car (split-string name "\\( -> \\|\n\\)")) | ||
| 316 | name) | ||
| 311 | (or is-dir symlink-target) | 317 | (or is-dir symlink-target) |
| 312 | 1 ;link-count | 318 | 1 ;link-count |
| 313 | ;; no way to handle numeric ids in Androids ash | 319 | ;; no way to handle numeric ids in Androids ash |
| @@ -611,6 +617,19 @@ But handle the case, if the \"test\" command is not available." | |||
| 611 | v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname) | 617 | v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname) |
| 612 | "Error while changing file's mode %s" filename))) | 618 | "Error while changing file's mode %s" filename))) |
| 613 | 619 | ||
| 620 | (defun tramp-adb-handle-set-file-times (filename &optional time) | ||
| 621 | "Like `set-file-times' for Tramp files." | ||
| 622 | (with-parsed-tramp-file-name filename nil | ||
| 623 | (tramp-flush-file-property v localname) | ||
| 624 | (let ((time (if (or (null time) (equal time '(0 0))) | ||
| 625 | (current-time) | ||
| 626 | time))) | ||
| 627 | (tramp-adb-command-exit-status | ||
| 628 | ;; use shell arithmetic because of Emacs integer size limit | ||
| 629 | v (format "touch -t $(( %d * 65536 + %d )) %s" | ||
| 630 | (car time) (cadr time) | ||
| 631 | (tramp-shell-quote-argument localname)))))) | ||
| 632 | |||
| 614 | (defun tramp-adb-handle-copy-file | 633 | (defun tramp-adb-handle-copy-file |
| 615 | (filename newname &optional ok-if-already-exists keep-date | 634 | (filename newname &optional ok-if-already-exists keep-date |
| 616 | preserve-uid-gid preserve-extended-attributes) | 635 | preserve-uid-gid preserve-extended-attributes) |
| @@ -937,17 +956,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | |||
| 937 | 956 | ||
| 938 | ;; Helper functions. | 957 | ;; Helper functions. |
| 939 | 958 | ||
| 940 | (defun tramp-adb-file-name-host (vec) | ||
| 941 | "Return host component of VEC. | ||
| 942 | If it is equal to the default value of `tramp-default-host', `nil' is returned." | ||
| 943 | (let ((host (tramp-file-name-host vec))) | ||
| 944 | (unless (equal host (eval (car (get 'tramp-default-host 'standard-value)))) | ||
| 945 | host))) | ||
| 946 | |||
| 947 | (defun tramp-adb-execute-adb-command (vec &rest args) | 959 | (defun tramp-adb-execute-adb-command (vec &rest args) |
| 948 | "Returns nil on success error-output on failure." | 960 | "Returns nil on success error-output on failure." |
| 949 | (when (tramp-adb-file-name-host vec) | 961 | (when (> (length (tramp-file-name-host vec)) 0) |
| 950 | (setq args (append (list "-s" (tramp-adb-file-name-host vec)) args))) | 962 | (setq args (append (list "-s" (tramp-file-name-host vec)) args))) |
| 951 | (with-temp-buffer | 963 | (with-temp-buffer |
| 952 | (prog1 | 964 | (prog1 |
| 953 | (unless (zerop (apply 'call-process (tramp-adb-program) nil t nil args)) | 965 | (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 | |||
| 1048 | connection if a previous connection has died for some reason." | 1060 | connection if a previous connection has died for some reason." |
| 1049 | (let* ((buf (tramp-get-connection-buffer vec)) | 1061 | (let* ((buf (tramp-get-connection-buffer vec)) |
| 1050 | (p (get-buffer-process buf)) | 1062 | (p (get-buffer-process buf)) |
| 1063 | (host (tramp-file-name-host vec)) | ||
| 1051 | (devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))) | 1064 | (devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))) |
| 1052 | (unless | 1065 | (unless |
| 1053 | (and p (processp p) (memq (process-status p) '(run open))) | 1066 | (and p (processp p) (memq (process-status p) '(run open))) |
| @@ -1055,21 +1068,17 @@ connection if a previous connection has died for some reason." | |||
| 1055 | (when (and p (processp p)) (delete-process p)) | 1068 | (when (and p (processp p)) (delete-process p)) |
| 1056 | (if (not devices) | 1069 | (if (not devices) |
| 1057 | (tramp-error vec 'file-error "No device connected")) | 1070 | (tramp-error vec 'file-error "No device connected")) |
| 1058 | (if (and (tramp-adb-file-name-host vec) | 1071 | (if (and (> (length host) 0) (not (member host devices))) |
| 1059 | (not (member (tramp-adb-file-name-host vec) devices))) | 1072 | (tramp-error vec 'file-error "Device %s not connected" host)) |
| 1060 | (tramp-error | 1073 | (if (and (> (length devices) 1) (zerop (length host))) |
| 1061 | vec 'file-error | ||
| 1062 | "Device %s not connected" (tramp-adb-file-name-host vec))) | ||
| 1063 | (if (and (not (eq (length devices) 1)) | ||
| 1064 | (not (tramp-adb-file-name-host vec))) | ||
| 1065 | (tramp-error | 1074 | (tramp-error |
| 1066 | vec 'file-error | 1075 | vec 'file-error |
| 1067 | "Multiple Devices connected: No Host/Device specified")) | 1076 | "Multiple Devices connected: No Host/Device specified")) |
| 1068 | (with-tramp-progress-reporter vec 3 "Opening adb shell connection" | 1077 | (with-tramp-progress-reporter vec 3 "Opening adb shell connection" |
| 1069 | (let* ((coding-system-for-read 'utf-8-dos) ;is this correct? | 1078 | (let* ((coding-system-for-read 'utf-8-dos) ;is this correct? |
| 1070 | (process-connection-type tramp-process-connection-type) | 1079 | (process-connection-type tramp-process-connection-type) |
| 1071 | (args (if (tramp-adb-file-name-host vec) | 1080 | (args (if (> (length host) 0) |
| 1072 | (list "-s" (tramp-adb-file-name-host vec) "shell") | 1081 | (list "-s" host "shell") |
| 1073 | (list "shell"))) | 1082 | (list "shell"))) |
| 1074 | (p (let ((default-directory | 1083 | (p (let ((default-directory |
| 1075 | (tramp-compat-temporary-file-directory))) | 1084 | (tramp-compat-temporary-file-directory))) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 79f8d82b02b..d83599a6662 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -5181,34 +5181,6 @@ function cell is returned to be applied on a buffer." | |||
| 5181 | (t | 5181 | (t |
| 5182 | (format "%s <%%s" coding))))))) | 5182 | (format "%s <%%s" coding))))))) |
| 5183 | 5183 | ||
| 5184 | ;;; Integration of eshell.el: | ||
| 5185 | |||
| 5186 | (eval-when-compile | ||
| 5187 | (defvar eshell-path-env)) | ||
| 5188 | |||
| 5189 | ;; eshell.el keeps the path in `eshell-path-env'. We must change it | ||
| 5190 | ;; when `default-directory' points to another host. | ||
| 5191 | (defun tramp-eshell-directory-change () | ||
| 5192 | "Set `eshell-path-env' to $PATH of the host related to `default-directory'." | ||
| 5193 | (setq eshell-path-env | ||
| 5194 | (if (file-remote-p default-directory) | ||
| 5195 | (with-parsed-tramp-file-name default-directory nil | ||
| 5196 | (mapconcat | ||
| 5197 | 'identity | ||
| 5198 | (tramp-get-remote-path v) | ||
| 5199 | ":")) | ||
| 5200 | (getenv "PATH")))) | ||
| 5201 | |||
| 5202 | (eval-after-load "esh-util" | ||
| 5203 | '(progn | ||
| 5204 | (tramp-eshell-directory-change) | ||
| 5205 | (add-hook 'eshell-directory-change-hook | ||
| 5206 | 'tramp-eshell-directory-change) | ||
| 5207 | (add-hook 'tramp-unload-hook | ||
| 5208 | (lambda () | ||
| 5209 | (remove-hook 'eshell-directory-change-hook | ||
| 5210 | 'tramp-eshell-directory-change))))) | ||
| 5211 | |||
| 5212 | (add-hook 'tramp-unload-hook | 5184 | (add-hook 'tramp-unload-hook |
| 5213 | (lambda () | 5185 | (lambda () |
| 5214 | (unload-feature 'tramp-sh 'force))) | 5186 | (unload-feature 'tramp-sh 'force))) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7c393622ffc..4c346799dcf 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -381,6 +381,22 @@ Useful for su and sudo methods mostly." | |||
| 381 | :group 'tramp | 381 | :group 'tramp |
| 382 | :type 'string) | 382 | :type 'string) |
| 383 | 383 | ||
| 384 | ;;;###tramp-autoload | ||
| 385 | (defcustom tramp-default-host-alist nil | ||
| 386 | "Default host to use for specific method/user pairs. | ||
| 387 | This is an alist of items (METHOD USER HOST). The first matching item | ||
| 388 | specifies the host to use for a file name which does not specify a | ||
| 389 | host. METHOD and HOST are regular expressions or nil, which is | ||
| 390 | interpreted as a regular expression which always matches. If no entry | ||
| 391 | matches, the variable `tramp-default-host' takes effect. | ||
| 392 | |||
| 393 | If the file name does not specify the method, lookup is done using the | ||
| 394 | empty string for the method name." | ||
| 395 | :group 'tramp | ||
| 396 | :type '(repeat (list (choice :tag "Method regexp" regexp sexp) | ||
| 397 | (choice :tag " User regexp" regexp sexp) | ||
| 398 | (choice :tag " Host name" string (const nil))))) | ||
| 399 | |||
| 384 | (defcustom tramp-default-proxies-alist nil | 400 | (defcustom tramp-default-proxies-alist nil |
| 385 | "Route to be followed for specific host/user pairs. | 401 | "Route to be followed for specific host/user pairs. |
| 386 | This is an alist of items (HOST USER PROXY). The first matching | 402 | This is an alist of items (HOST USER PROXY). The first matching |
| @@ -918,7 +934,7 @@ See `tramp-file-name-structure' for more explanations.") | |||
| 918 | This regexp should match partial Tramp file names only. | 934 | This regexp should match partial Tramp file names only. |
| 919 | 935 | ||
| 920 | Please note that the entry in `file-name-handler-alist' is made when | 936 | Please note that the entry in `file-name-handler-alist' is made when |
| 921 | this file (tramp.el) is loaded. This means that this variable must be set | 937 | this file \(tramp.el\) is loaded. This means that this variable must be set |
| 922 | before loading tramp.el. Alternatively, `file-name-handler-alist' can be | 938 | before loading tramp.el. Alternatively, `file-name-handler-alist' can be |
| 923 | updated after changing this variable. | 939 | updated after changing this variable. |
| 924 | 940 | ||
| @@ -1163,6 +1179,15 @@ This is USER, if non-nil. Otherwise, do a lookup in | |||
| 1163 | "Return the right host string to use. | 1179 | "Return the right host string to use. |
| 1164 | This is HOST, if non-nil. Otherwise, it is `tramp-default-host'." | 1180 | This is HOST, if non-nil. Otherwise, it is `tramp-default-host'." |
| 1165 | (or (and (> (length host) 0) host) | 1181 | (or (and (> (length host) 0) host) |
| 1182 | (let ((choices tramp-default-host-alist) | ||
| 1183 | lhost item) | ||
| 1184 | (while choices | ||
| 1185 | (setq item (pop choices)) | ||
| 1186 | (when (and (string-match (or (nth 0 item) "") (or method "")) | ||
| 1187 | (string-match (or (nth 1 item) "") (or user ""))) | ||
| 1188 | (setq lhost (nth 2 item)) | ||
| 1189 | (setq choices nil))) | ||
| 1190 | lhost) | ||
| 1166 | tramp-default-host)) | 1191 | tramp-default-host)) |
| 1167 | 1192 | ||
| 1168 | (defun tramp-dissect-file-name (name &optional nodefault) | 1193 | (defun tramp-dissect-file-name (name &optional nodefault) |
| @@ -3861,6 +3886,34 @@ Only works for Bourne-like shells." | |||
| 3861 | t t result))) | 3886 | t t result))) |
| 3862 | result)))) | 3887 | result)))) |
| 3863 | 3888 | ||
| 3889 | ;;; Integration of eshell.el: | ||
| 3890 | |||
| 3891 | (eval-when-compile | ||
| 3892 | (defvar eshell-path-env)) | ||
| 3893 | |||
| 3894 | ;; eshell.el keeps the path in `eshell-path-env'. We must change it | ||
| 3895 | ;; when `default-directory' points to another host. | ||
| 3896 | (defun tramp-eshell-directory-change () | ||
| 3897 | "Set `eshell-path-env' to $PATH of the host related to `default-directory'." | ||
| 3898 | (setq eshell-path-env | ||
| 3899 | (if (file-remote-p default-directory) | ||
| 3900 | (with-parsed-tramp-file-name default-directory nil | ||
| 3901 | (mapconcat | ||
| 3902 | 'identity | ||
| 3903 | (tramp-get-connection-property v "remote-path" nil) | ||
| 3904 | ":")) | ||
| 3905 | (getenv "PATH")))) | ||
| 3906 | |||
| 3907 | (eval-after-load "esh-util" | ||
| 3908 | '(progn | ||
| 3909 | (tramp-eshell-directory-change) | ||
| 3910 | (add-hook 'eshell-directory-change-hook | ||
| 3911 | 'tramp-eshell-directory-change) | ||
| 3912 | (add-hook 'tramp-unload-hook | ||
| 3913 | (lambda () | ||
| 3914 | (remove-hook 'eshell-directory-change-hook | ||
| 3915 | 'tramp-eshell-directory-change))))) | ||
| 3916 | |||
| 3864 | ;; Checklist for `tramp-unload-hook' | 3917 | ;; Checklist for `tramp-unload-hook' |
| 3865 | ;; - Unload all `tramp-*' packages | 3918 | ;; - Unload all `tramp-*' packages |
| 3866 | ;; - Reset `file-name-handler-alist' | 3919 | ;; - Reset `file-name-handler-alist' |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 5402b0ec204..fb62b039d79 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -526,7 +526,16 @@ Otherwise, just return the value." | |||
| 526 | "Extract the default external value of WIDGET." | 526 | "Extract the default external value of WIDGET." |
| 527 | (widget-apply widget :value-to-external | 527 | (widget-apply widget :value-to-external |
| 528 | (or (widget-get widget :value) | 528 | (or (widget-get widget :value) |
| 529 | (widget-apply widget :default-get)))) | 529 | (progn |
| 530 | (when (widget-get widget :args) | ||
| 531 | (let (args) | ||
| 532 | (dolist (arg (widget-get widget :args)) | ||
| 533 | (setq args (append args | ||
| 534 | (if (widget-get arg :inline) | ||
| 535 | (widget-get arg :args) | ||
| 536 | (list arg))))) | ||
| 537 | (widget-put widget :args args))) | ||
| 538 | (widget-apply widget :default-get))))) | ||
| 530 | 539 | ||
| 531 | (defun widget-match-inline (widget vals) | 540 | (defun widget-match-inline (widget vals) |
| 532 | "In WIDGET, match the start of VALS." | 541 | "In WIDGET, match the start of VALS." |
diff --git a/test/automated/advice-tests.el b/test/automated/advice-tests.el index bc9135c92d0..238561bef84 100644 --- a/test/automated/advice-tests.el +++ b/test/automated/advice-tests.el | |||
| @@ -107,6 +107,12 @@ | |||
| 107 | (lambda (f &rest args) | 107 | (lambda (f &rest args) |
| 108 | (cons (cons 2 (called-interactively-p)) (apply f args)))) | 108 | (cons (cons 2 (called-interactively-p)) (apply f args)))) |
| 109 | (should (equal (call-interactively 'sm-test7) '((2 . t) (1 . t) 11))) | 109 | (should (equal (call-interactively 'sm-test7) '((2 . t) (1 . t) 11))) |
| 110 | |||
| 111 | ;; Check handling of interactive spec. | ||
| 112 | (defun sm-test8 (a) (interactive "p") a) | ||
| 113 | (defadvice sm-test8 (before adv1 activate) nil) | ||
| 114 | (defadvice sm-test8 (before adv2 activate) (interactive "P") nil) | ||
| 115 | (should (equal (interactive-form 'sm-test8) '(interactive "P"))) | ||
| 110 | )) | 116 | )) |
| 111 | 117 | ||
| 112 | ;; Local Variables: | 118 | ;; Local Variables: |