Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103614. ------------------------------------------------------------ revno: 103614 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 23:16:04 -0800 message: * lisp/eshell/esh-util.el (eshell-condition-case): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-10 03:44:33 +0000 +++ lisp/ChangeLog 2011-03-10 07:16:04 +0000 @@ -1,5 +1,7 @@ 2011-03-10 Glenn Morris + * eshell/esh-util.el (eshell-condition-case): Doc fix. + * cus-edit.el (Custom-newline): If no button at point, look for a subgroup button at start-of-line. (Bug#2298) === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2011-03-05 20:07:27 +0000 +++ lisp/eshell/esh-util.el 2011-03-10 07:16:04 +0000 @@ -138,7 +138,8 @@ (memq system-type '(ms-dos windows-nt))) (defmacro eshell-condition-case (tag form &rest handlers) - "Like `condition-case', but only if `eshell-pass-through-errors' is nil." + "If `eshell-handle-errors' is non-nil, this is `condition-case'. +Otherwise, evaluates FORM with no error handling." (if eshell-handle-errors `(condition-case ,tag ,form ------------------------------------------------------------ revno: 103613 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-03-10 00:48:33 -0500 message: Fix non-ASCII characters in User and ELisp manuals. doc/lispref/modes.texi (Operator Precedence Grammars): Don't use characters outside ISO-8859-1. doc/emacs/search.texi (Regexp Example): doc/emacs/mule.texi (International Chars): doc/emacs/building.texi (External Lisp): Don't use characters outside ISO-8859-1. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-09 16:54:08 +0000 +++ doc/emacs/ChangeLog 2011-03-10 05:48:33 +0000 @@ -1,3 +1,10 @@ +2011-03-10 Eli Zaretskii + + * search.texi (Regexp Example): + * mule.texi (International Chars): + * building.texi (External Lisp): Don't use characters outside + ISO-8859-1. + 2011-03-09 Eli Zaretskii * ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use === modified file 'doc/emacs/building.texi' --- doc/emacs/building.texi 2011-01-25 04:08:28 +0000 +++ doc/emacs/building.texi 2011-03-10 05:48:33 +0000 @@ -1056,7 +1056,7 @@ Show addresses for thread frames in threads buffer. @end table - It’s possible to observe information for several threads + It's possible to observe information for several threads simultaneously (in addition to buffers which show information for currently selected thread) using the following keys from the threads buffer. === modified file 'doc/emacs/mule.texi' --- doc/emacs/mule.texi 2011-03-02 08:53:23 +0000 +++ doc/emacs/mule.texi 2011-03-10 05:48:33 +0000 @@ -237,7 +237,7 @@ Character code properties: customize what to show name: LATIN CAPITAL LETTER A WITH GRAVE general-category: Lu (Letter, Uppercase) - decomposition: (65 768) ('A' '̀') + decomposition: (65 768) ('A' '`') old-name: LATIN CAPITAL LETTER A GRAVE There are text properties here: === modified file 'doc/emacs/search.texi' --- doc/emacs/search.texi 2011-03-06 18:24:11 +0000 +++ doc/emacs/search.texi 2011-03-10 05:48:33 +0000 @@ -917,13 +917,13 @@ @node Regexp Example @section Regular Expression Example - Here is an example of a regexp---the regexp that Emacs uses, by -default, to recognize the end of a sentence, not including the -following space (i.e., the variable @code{sentence-end-base}): + Here is an example of a regexp---similar to the regexp that Emacs +uses, by default, to recognize the end of a sentence, not including +the following space (i.e., the variable @code{sentence-end-base}): @example @verbatim -[.?!][]\"'””)}]* +[.?!][]\"')}]* @end verbatim @end example === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-03-09 16:54:08 +0000 +++ doc/lispref/ChangeLog 2011-03-10 05:48:33 +0000 @@ -1,3 +1,8 @@ +2011-03-10 Eli Zaretskii + + * modes.texi (Operator Precedence Grammars): Don't use characters + outside ISO-8859-1. + 2011-03-09 Eli Zaretskii * intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. === modified file 'doc/lispref/modes.texi' --- doc/lispref/modes.texi 2011-02-02 20:44:19 +0000 +++ doc/lispref/modes.texi 2011-03-10 05:48:33 +0000 @@ -3403,7 +3403,7 @@ or right-associativity of infix operators, nesting of tokens like parentheses and many other cases. -@c ¡Let's leave this undocumented to leave it more open for change! +@c Let's leave this undocumented to leave it more open for change! @c @defvar smie-grammar @c The value of this variable is an alist specifying the left and right @c precedence of each token. It is meant to be initialized by using one of ------------------------------------------------------------ revno: 103612 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 19:44:33 -0800 message: cus-edit tweak for bug#2298. * lisp/cus-edit.el (Custom-newline): If no button at point, look for a subgroup button at start-of-line. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-10 03:41:17 +0000 +++ lisp/ChangeLog 2011-03-10 03:44:33 +0000 @@ -1,5 +1,8 @@ 2011-03-10 Glenn Morris + * cus-edit.el (Custom-newline): If no button at point, look + for a subgroup button at start-of-line. (Bug#2298) + * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. 2011-03-10 Julien Danjou === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2011-03-06 02:04:41 +0000 +++ lisp/cus-edit.el 2011-03-10 03:44:33 +0000 @@ -4756,6 +4756,12 @@ "Invoke button at POS, or refuse to allow editing of Custom buffer." (interactive "@d") (let ((button (get-char-property pos 'button))) + ;; If there is no button at point, then use the one at the start + ;; of the line, if it is a custom-group-link (bug#2298). + (or button + (if (setq button (get-char-property (line-beginning-position) 'button)) + (or (eq (widget-type button) 'custom-group-link) + (setq button nil)))) (if button (widget-apply-action button event) (error "You can't edit this part of the Custom buffer")))) ------------------------------------------------------------ revno: 103611 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 19:41:17 -0800 message: * lisp/mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-10 02:14:55 +0000 +++ lisp/ChangeLog 2011-03-10 03:41:17 +0000 @@ -1,3 +1,7 @@ +2011-03-10 Glenn Morris + + * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. + 2011-03-10 Julien Danjou * avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-02-28 01:07:29 +0000 +++ lisp/mail/rmail.el 2011-03-10 03:41:17 +0000 @@ -2306,11 +2306,11 @@ ;;;; *** Rmail Message Selection And Support *** (defun rmail-msgend (n) - "Return the start position for message number N." + "Return the end position for message number N." (marker-position (aref rmail-message-vector (1+ n)))) (defun rmail-msgbeg (n) - "Return the end position for message number N." + "Return the start position for message number N." (marker-position (aref rmail-message-vector n))) (defun rmail-apply-in-message (msgnum function &rest args) ------------------------------------------------------------ revno: 103610 author: Julien Danjou committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-03-09 21:14:55 -0500 message: Inhibit mouse-avoidance if cursor-type is nil (Bug#8209). * lisp/avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if `cursor-type' is nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 23:38:16 +0000 +++ lisp/ChangeLog 2011-03-10 02:14:55 +0000 @@ -1,3 +1,8 @@ +2011-03-10 Julien Danjou + + * avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if + `cursor-type' is nil. + 2011-03-09 Jay Belanger * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. === modified file 'lisp/avoid.el' --- lisp/avoid.el 2011-01-25 04:08:28 +0000 +++ lisp/avoid.el 2011-03-10 02:14:55 +0000 @@ -278,6 +278,7 @@ (defun mouse-avoidance-ignore-p () (let ((mp (mouse-position))) (or (not (frame-pointer-visible-p)) ; The pointer is hidden + (not cursor-type) ; There's no cursor executing-kbd-macro ; don't check inside macro (null (cadr mp)) ; don't move unless in an Emacs frame (not (eq (car mp) (selected-frame))) ------------------------------------------------------------ revno: 103609 committer: Jay Belanger branch nick: trunk timestamp: Wed 2011-03-09 17:38:16 -0600 message: * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 20:48:56 +0000 +++ lisp/ChangeLog 2011-03-09 23:38:16 +0000 @@ -1,3 +1,7 @@ +2011-03-09 Jay Belanger + + * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. + 2011-03-09 Ken Manheimer * allout.el Summary: Change so yank of distinctive-bullet items === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2011-03-06 04:28:39 +0000 +++ lisp/calc/calc.el 2011-03-09 23:38:16 +0000 @@ -1084,7 +1084,7 @@ "lOW") (mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) (concat "ABCDEFGHIJKLMNOPQRSTUVXZabcdfghjkmoprstuvwxyz" - ":\\|!()[]<>{},;=~`\C-k\C-w\C-_")) + ":\\|!()[]<>{},;=~`\C-k\C-w")) (define-key map "\M-w" 'calc-missing-key) (define-key map "\M-k" 'calc-missing-key) (define-key map "\M-\C-w" 'calc-missing-key) ------------------------------------------------------------ revno: 103608 committer: Ken Manheimer branch nick: trunk timestamp: Wed 2011-03-09 15:48:56 -0500 message: * allout.el Summary: Change so yank of distinctive-bullet items preserves the existing header prefix, rebulleting it if necessary, rather than replacing it. This is necessary for proper operation of cooperative addons like allout-widgets. (allout-make-topic-prefix) (allout-rebullet-heading): Change SOLICIT arg to INSTEAD, and interpret additionally a string value as alternate bullet to be used, instead of prompting the user for a bullet character. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 11:04:27 +0000 +++ lisp/ChangeLog 2011-03-09 20:48:56 +0000 @@ -1,3 +1,14 @@ +2011-03-09 Ken Manheimer + + * allout.el Summary: Change so yank of distinctive-bullet items + preserves the existing header prefix, rebulleting it if necessary, + rather than replacing it. This is necessary for proper operation + of cooperative addons like allout-widgets. + (allout-make-topic-prefix) (allout-rebullet-heading): Change + SOLICIT arg to INSTEAD, and interpret additionally a string value + as alternate bullet to be used, instead of prompting the user for + a bullet character. + 2011-03-09 Michael Albinus * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do === modified file 'lisp/allout.el' --- lisp/allout.el 2011-03-06 02:43:19 +0000 +++ lisp/allout.el 2011-03-09 20:48:56 +0000 @@ -3465,13 +3465,13 @@ (defun allout-make-topic-prefix (&optional prior-bullet new depth - solicit + instead number-control index) ;; Depth null means use current depth, non-null means we're either ;; opening a new topic after current topic, lower or higher, or we're ;; changing level of current topic. - ;; Solicit dominates specified bullet-char. + ;; Instead dominates specified bullet-char. ;;;_ . Doc string: "Generate a topic prefix suitable for optional arg DEPTH, or current depth. @@ -3492,15 +3492,18 @@ Third arg DEPTH forces the topic prefix to that depth, regardless of the current topics' depth. -If SOLICIT is non-nil, then the choice of bullet is solicited from -user. If it's a character, then that character is offered as the -default, otherwise the one suited to the context (according to -distinction or depth) is offered. (This overrides other options, -including, eg, a distinctive PRIOR-BULLET.) If non-nil, then the -context-specific bullet is used. +If INSTEAD is: + +- nil, then the bullet char for the context is used, per distinction or depth +- a string, then the first character of the string will be used +- a character, then the user is solicited for bullet, with that char as default +- anything else, the user is solicited with bullet char per context as default + +\(INSTEAD overrides other options, including, eg, a distinctive +PRIOR-BULLET.) Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet' -is non-nil *and* soliciting was not explicitly invoked. Then +is non-nil *and* no specific INSTEAD was specified. Then NUMBER-CONTROL non-nil forces prefix to either numbered or denumbered format, depending on the value of the sixth arg, INDEX. @@ -3549,8 +3552,11 @@ ;; Solicitation overrides numbering and other cases: ((progn (setq body (make-string (- depth 2) ?\ )) ;; The actual condition: - solicit) - (let* ((got (allout-solicit-alternate-bullet depth solicit))) + instead) + (let* ((got + (if (and (stringp instead)(> (length instead) 0)) + (substring instead 0 1) + (allout-solicit-alternate-bullet depth instead)))) ;; Gotta check whether we're numbering and got a numbered bullet: (setq numbering (and allout-numbered-bullet (not (and number-control (not index))) @@ -3913,7 +3919,7 @@ (allout-end-of-prefix) (setq from allout-recent-prefix-beginning to allout-recent-prefix-end) - (allout-rebullet-heading t ;;; solicit + (allout-rebullet-heading t ;;; instead nil ;;; depth nil ;;; number-control nil ;;; index @@ -3931,8 +3937,8 @@ (message "Done.") (cond (on-bullet (goto-char (allout-current-bullet-pos))) (initial-col (move-to-column initial-col))))) -;;;_ > allout-rebullet-heading (&optional solicit ...) -(defun allout-rebullet-heading (&optional solicit +;;;_ > allout-rebullet-heading (&optional instead ...) +(defun allout-rebullet-heading (&optional instead new-depth number-control index @@ -3942,11 +3948,11 @@ All args are optional. -If SOLICIT is non-nil, then the choice of bullet is solicited from -user. If it's a character, then that character is offered as the -default, otherwise the one suited to the context (according to -distinction or depth) is offered. If non-nil, then the -context-specific bullet is just used. +If INSTEAD is: +- nil, then the bullet char for the context is used, per distinction or depth +- a string, then the first character of the string will be used +- a character, then the user is solicited for bullet, with that char as default +- anything else, the user is solicited with bullet char per context as default Second arg DEPTH forces the topic prefix to that depth, regardless of the topic's current depth. @@ -3981,7 +3987,7 @@ (new-prefix (allout-make-topic-prefix current-bullet nil new-depth - solicit + instead number-control index))) @@ -4028,7 +4034,7 @@ (cond ((numberp index) (1+ index)) ((not number-control) (allout-sibling-index)))) (if (allout-numbered-type-prefix) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead new-depth ;;; new-depth number-control;;; number-control index ;;; index @@ -4145,7 +4151,7 @@ (when (< relative-depth 0) (save-excursion (goto-char local-point) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead (+ starting-depth relative-depth) nil ;;; number starting-index @@ -4203,7 +4209,7 @@ ; Prime ascender for ascension: (setq ascender (1- allout-recent-depth)) (if (>= allout-recent-depth depth) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead nil ;;; depth nil ;;; number-control nil ;;; index @@ -4230,7 +4236,7 @@ (use-bullet (equal '(16) denumber)) (more t)) (while more - (allout-rebullet-heading use-bullet ;;; solicit + (allout-rebullet-heading use-bullet ;;; instead depth ;;; depth t ;;; number-control index ;;; index @@ -4577,32 +4583,20 @@ (progn (widen) (forward-char -1) (narrow-to-region subj-beg (point)))))) - ;; Preserve new bullet if it's a distinctive one, otherwise - ;; use old one: - (if (string-match (regexp-quote prefix-bullet) - allout-distinctive-bullets-string) - ; Delete from bullet of old to - ; before bullet of new: - (progn - (beginning-of-line) - (allout-unprotected - (delete-region (point) subj-beg)) - (set-marker (allout-mark-marker t) subj-end) - (goto-char subj-beg) - (allout-end-of-prefix)) - ; Delete base subj prefix, - ; leaving old one: - (allout-unprotected - (progn - (delete-region (point) (+ (point) - prefix-len - (- adjust-to-depth - subj-depth))) + ;; Remove new heading prefix: + (allout-unprotected + (progn + (delete-region (point) (+ (point) + prefix-len + (- adjust-to-depth + subj-depth))) ; and delete residual subj ; prefix digits and space: - (while (looking-at "[0-9]") (delete-char 1)) - (if (looking-at " ") - (delete-char 1)))))) + (while (looking-at "[0-9]") (delete-char 1)) + (if (looking-at " ") + (delete-char 1)))) + ;; Assert new topic's bullet - minimal effort if unchanged: + (allout-rebullet-heading prefix-bullet)) (exchange-point-and-mark)))) (if rectify-numbering (progn @@ -4613,7 +4607,7 @@ (goto-char subj-beg) (if (allout-goto-prefix-doublechecked) (allout-unprotected - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead (allout-depth) ;;; depth nil ;;; number-control nil ;;; index ------------------------------------------------------------ revno: 103607 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-03-09 22:05:40 +0200 message: Fix last commit. diff: === modified file 'doc/emacs/emacs.texi' --- doc/emacs/emacs.texi 2011-03-09 16:54:08 +0000 +++ doc/emacs/emacs.texi 2011-03-09 20:05:40 +0000 @@ -1,4 +1,4 @@ -\input texinfo @c -*- coding: utf-8 -*- +\input texinfo @c -*- coding: iso-latin-1 -*- @setfilename ../../info/emacs @settitle GNU Emacs Manual @@ -1352,24 +1352,24 @@ Joe Arceneaux, Miles Bader, David Bakhash, Juanma Barranquero, Eli Barzilay, Thomas Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@: Belikoff, Boaz Ben-Zvi, Karl Berry, Anna M.@: Bigatti, Ray Blaak, Jim -Blandy, Johan Bockgård, Jan Böcker, Lennart Borgman, Per Bothner, +Blandy, Johan Bockgrd, Jan Bcker, Lennart Borgman, Per Bothner, Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin Broadey, Vincent Broman, David M.@: Brown, Georges Brun-Cottan, Joe -Buehler, Włodek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, +Buehler, W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chong Yidong, Chris Chase, Bob Chassell, Andrew Choi, Sacha Chua, James Clark, Mike Clarkson, Glynn Clements, Daniel Colascione, Andrew Csillag, Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki Das, Vivek Dasmohapatra, Michael DeCorte, Gary Delp, Matthieu Devin, Eri -Ding, Jan Djärv, Carsten Dominik, Scott Draves, Benjamin Drieu, +Ding, Jan Djrv, Carsten Dominik, Scott Draves, Benjamin Drieu, Viktor Dukhovni, Dmitry Dzhus, John Eaton, Rolf Ebert, Paul Eggert, -Stephen Eglen, Torbjörn Einarsson, Tsugutomo Enami, Hans Henrik +Stephen Eglen, Torbjrn Einarsson, Tsugutomo Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnbach, Oscar Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Romain Francoise, Noah Friedman, Andreas Fuchs, Hallvard Furuseth, Keith Gabryelski, Peter S.@: -Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz -García, Howard Gayle, Daniel German, Stephen Gildea, +Galbraith, Kevin Gallagher, Kevin Gallo, Juan Len Lahoz +Garca, Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David Gillespie, Bob Glickstein, Deepak Goel, Boris -Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann, +Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Grojohann, Michael Gschwind, Bastien Guerry, Henry Guillaume, Doug Gwyn, Ken'ichi Handa, Lars Hansen, Chris Hanson, K. Shane Hartman, John Heidemann, Jon K.@: Hellan, Jesper Harder, Magnus Henoch, Markus Heritsch, Karl Heuer, @@ -1377,17 +1377,17 @@ Hornik, Tom Houlder, Joakim Hove, Denis Howe, Lars Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Philip Jackson, Pavel Janik, Paul Jarc, Ulf Jasper, Michael K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson, -Arne Jørgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, +Arne Jrgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, Lute Kamstra, David Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel -Klíč, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: +Kl@v{c}, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: Kolodney, David M.@: Koppelman, Koseki Yoshinori, Robert Krawitz, -Sebastian Kremer, Ryszard Kubiak, David Kågedal, Daniel LaLiberte, +Sebastian Kremer, Ryszard Kubiak, David Kgedal, Daniel LaLiberte, Karl Landstrom, Mario Lang, Aaron Larson, James R.@: Larus, Vinicius Jose Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Juri Linkov, -Francis Litterio, Emilio C. Lopes, Károly Lőrentey, Dave Love, -Sascha Lüdecke, Eric Ludlam, Alan Mackenzie, Christopher J.@: +Francis Litterio, Emilio C. Lopes, Kroly L@H{o}rentey, Dave Love, +Sascha Ldecke, Eric Ludlam, Alan Mackenzie, Christopher J.@: Madsen, Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath, Will Mengarini, David Megginson, Ben A. Mesander, Wayne Mesard, Brad ------------------------------------------------------------ revno: 103606 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-03-09 18:54:08 +0200 message: Allow building manuals with Texinfo before v4.12. doc/lispref/intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. doc/lispref/makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. doc/lispref/elisp.texi: Use ISO-8859-1 in @documentencoding. doc/emacs/ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use Texinfo @-commands for non Latin-1 characters. doc/emacs/emacs.texi: Use ISO-8859-1 in @documentencoding. doc/emacs/makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-09 16:04:43 +0000 +++ doc/emacs/ChangeLog 2011-03-09 16:54:08 +0000 @@ -1,5 +1,10 @@ 2011-03-09 Eli Zaretskii + * ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use + Texinfo @-commands for non Latin-1 characters. + + * makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. + * custom.texi (Init File): Add index entries for ".emacs". (Bug#8210) === modified file 'doc/emacs/ack.texi' --- doc/emacs/ack.texi 2011-03-08 08:59:18 +0000 +++ doc/emacs/ack.texi 2011-03-09 16:54:08 +0000 @@ -1,4 +1,4 @@ -@c -*- coding: utf-8 -*- +@c -*- coding: iso-latin-1 -*- @c This is part of the Emacs manual. @c Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @@ -52,7 +52,7 @@ Michael Albinus wrote @file{dbus.el}, a package that implements the D-Bus message bus protocol; @file{zeroconf.el}, a mode for browsing Avahi services; and @file{xesam.el}, a Xesam-based search engine -interface. He and Kai Großjohann wrote the Tramp package, which +interface. He and Kai Grojohann wrote the Tramp package, which provides transparent remote file editing using rcp, ssh, ftp, and other network protocols. He and Daniel Pittman wrote @file{tramp-cache.el}. @@ -154,7 +154,7 @@ tabular data. @item -Włodek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for +W@l{}odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for changing the encoding of Polish characters. @item @@ -191,7 +191,7 @@ @item Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many improvements to the Emacs display engine; and, together with Kai -Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor +Grojohann and Alex Schroeder, wrote @file{longlines.el}, a minor mode for wrapping long lines. @item @@ -249,13 +249,13 @@ Eric Ding wrote @file{goto-addr.el}, @item -Jan Djärv added support for the GTK+ toolkit and X drag-and-drop. +Jan Djrv added support for the GTK+ toolkit and X drag-and-drop. @item Carsten Dominik wrote Ref@TeX{}, a package for setting up labels and cross-references in La@TeX{} documents; and co-wrote IDLWAVE mode (q.v.@:). He was the main author of Org mode, for maintaining notes, -todo lists, and project planning. Thomas Baumann, Jan Böcker, Lennart +todo lists, and project planning. Thomas Baumann, Jan Bcker, Lennart Borgman, Baoqiu Cui, Daniel German, Bastien Guerry, Tassilo Horn, Philip Jackson, Tokuya Kameshima, Ross Patterson, Sebastian Rose, Eric Schulte, Paul Sexton, Ulf Stegemann, Andy Stewart, David O'Toole, John Wiegley, @@ -284,7 +284,7 @@ for incremental reading and completion of buffer names. @item -Torbjörn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. +Torbjrn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. @item Tsugutomo Enami co-wrote the support for international character sets. @@ -350,7 +350,7 @@ @file{w32-win.el}, support functions for the MS-Windows window system. @item -Juan León Lahoz García wrote @file{wdired.el}, a package for +Juan Len Lahoz Garca wrote @file{wdired.el}, a package for performing file operations by directly editing Dired buffers. @item @@ -484,8 +484,8 @@ @file{netrc.el} for parsing of @file{.netrc} files; and @file{time-date.el} for general date and time handling. Components of Gnus have also been written by: Nagy Andras, David Blacka, Scott Byer, -Kevin Greiner, Kai Großjohann, Joe Hildebrand, Paul Jarc, Sascha -Lüdecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, +Kevin Greiner, Kai Grojohann, Joe Hildebrand, Paul Jarc, Sascha +Ldecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, Thomas Steffen, Reiner Steib, Didier Verna, Ilja Weis, Katsumi Yamaoka, Teodor Zlatanov, and others (@pxref{Contributors,,,gnus, the Gnus Manual}). @@ -525,7 +525,7 @@ for the Transport Layer Security protocol. @item -Arne Jørgensen wrote @file{latexenc.el}, a package to +Arne Jrgensen wrote @file{latexenc.el}, a package to automatically guess the correct coding system in LaTeX files. @item @@ -577,7 +577,7 @@ Emacs. @item -Karel Klíč contributed SELinux support, for preserving the +Karel Kl@v{c} contributed SELinux support, for preserving the Security-Enchanced Linux context of files on backup and copy. @item @@ -668,7 +668,7 @@ creates a virtual Info manual of package keywords. @item -Károly Lőrentey wrote the ``multi-terminal'' code, which allows Emacs to +Kroly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to run on graphical and text-only terminals simultaneously. @item @@ -933,7 +933,7 @@ widgets. @item -François Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, +Franois Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, support for PO translation files. @item @@ -1195,7 +1195,7 @@ buffers. @item -Tibor Šimko and Milan Zamazal wrote @file{slovak.el}, support for +Tibor @v{S}imko and Milan Zamazal wrote @file{slovak.el}, support for editing text in Slovak language. @item === modified file 'doc/emacs/emacs.texi' --- doc/emacs/emacs.texi 2011-03-08 08:59:18 +0000 +++ doc/emacs/emacs.texi 2011-03-09 16:54:08 +0000 @@ -29,7 +29,7 @@ @end quotation @end copying -@documentencoding UTF-8 +@documentencoding ISO-8859-1 @dircategory Emacs @direntry === modified file 'doc/emacs/makefile.w32-in' --- doc/emacs/makefile.w32-in 2011-01-29 14:48:19 +0000 +++ doc/emacs/makefile.w32-in 2011-03-09 16:54:08 +0000 @@ -28,7 +28,7 @@ # The makeinfo program is part of the Texinfo distribution. MAKEINFO = makeinfo -MAKEINFO_OPTS = --force -I$(srcdir) +MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat INFO_TARGETS = $(infodir)/emacs DVI_TARGETS = emacs.dvi === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-03-08 17:33:55 +0000 +++ doc/lispref/ChangeLog 2011-03-09 16:54:08 +0000 @@ -1,3 +1,9 @@ +2011-03-09 Eli Zaretskii + + * intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. + + * makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. + 2011-03-08 Glenn Morris * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. === modified file 'doc/lispref/elisp.texi' --- doc/lispref/elisp.texi 2011-03-08 17:33:55 +0000 +++ doc/lispref/elisp.texi 2011-03-09 16:54:08 +0000 @@ -62,7 +62,7 @@ @end quotation @end copying -@documentencoding UTF-8 +@documentencoding ISO-8859-1 @dircategory GNU Emacs Lisp @direntry === modified file 'doc/lispref/intro.texi' --- doc/lispref/intro.texi 2011-03-08 08:59:18 +0000 +++ doc/lispref/intro.texi 2011-03-09 16:54:08 +0000 @@ -1,4 +1,4 @@ -@c -*-coding: utf-8-*- +@c -*-coding: iso-latin-1-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @@ -542,6 +542,6 @@ K. Richard Magill, Brian Marick, Roland McGrath, Stefan Monnier, Skip Montanaro, John Gardiner Myers, Thomas A. Peterson, Francesco Potorti, Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney, -Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill +Per Starbck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. === modified file 'doc/lispref/makefile.w32-in' --- doc/lispref/makefile.w32-in 2011-03-06 20:11:19 +0000 +++ doc/lispref/makefile.w32-in 2011-03-09 16:54:08 +0000 @@ -33,7 +33,7 @@ TEX=tex INSTALL_INFO = install-info MAKEINFO = makeinfo -MAKEINFO_OPTS = --force -I$(srcdir) -I$(emacsdir) +MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) -I$(emacsdir) # The environment variable and its value to add $(srcdir) to the path # searched for TeX input files. ------------------------------------------------------------ revno: 103605 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2011-03-09 17:18:51 +0100 message: * src/search.c (compile_pattern_1): Remove unused argument. (compile_pattern): Don't pass it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-03-08 08:34:55 +0000 +++ src/ChangeLog 2011-03-09 16:18:51 +0000 @@ -1,3 +1,9 @@ +2011-03-09 Juanma Barranquero + + * search.c (compile_pattern_1): Remove argument regp, unused since + revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig. + (compile_pattern): Don't pass it. + 2011-03-08 Jan Djärv * xterm.h (DEFAULT_GDK_DISPLAY): New define. @@ -62,7 +68,7 @@ text field. After disabling it, set focus on the list control. (Fx_file_dialog): If only_dir_p is non-nil, set the text of the File Name text field to "Current Directory" if it does not already have - another value. (Bug#8181) + another value. (Bug#8181) 2011-03-07 Adrian Robert @@ -123,7 +129,7 @@ * xdisp.c (BUILD_GLYPHLESS_GLYPH_STRING): Omit unused local var. (produce_glyphless_glyph): Make a pointer "const" since it might point to immutable storage. - (update_window_cursor): Now static, since it's not used elsewhere. + (update_window_cursor): Now static, since it's not used elsewhere. (SKIP_GLYPHS): Removed unused macro. 2011-03-06 Michael Shields (tiny change) === modified file 'src/search.c' --- src/search.c 2011-02-16 15:02:50 +0000 +++ src/search.c 2011-03-09 16:18:51 +0000 @@ -114,17 +114,13 @@ PATTERN is the pattern to compile. CP is the place to put the result. TRANSLATE is a translation table for ignoring case, or nil for none. - REGP is the structure that says where to store the "register" - values that will result from matching this pattern. - If it is 0, we should compile the pattern not to record any - subexpression bounds. POSIX is nonzero if we want full backtracking (POSIX style) for this pattern. 0 means backtrack only enough to get a valid match. The behavior also depends on Vsearch_spaces_regexp. */ static void -compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, struct re_registers *regp, int posix) +compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, int posix) { char *val; reg_syntax_t old; @@ -247,7 +243,7 @@ if (cp->next == 0) { compile_it: - compile_pattern_1 (cp, pattern, translate, regp, posix); + compile_pattern_1 (cp, pattern, translate, posix); break; } } ------------------------------------------------------------ revno: 103604 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-03-09 18:04:43 +0200 message: Fix a typo in last commit of ChangeLog file. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-09 15:59:23 +0000 +++ doc/emacs/ChangeLog 2011-03-09 16:04:43 +0000 @@ -1,6 +1,6 @@ 2011-03-09 Eli Zaretskii - * custom.texi (Init File): Add inex entries for ".emacs". + * custom.texi (Init File): Add index entries for ".emacs". (Bug#8210) 2011-03-08 Jan Djärv ------------------------------------------------------------ revno: 103603 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-03-09 17:59:23 +0200 message: Fix bug #8210 with index entries for ".emacs". doc/emacs/custom.texi (Init File): Add index entries for ".emacs". diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-08 17:33:55 +0000 +++ doc/emacs/ChangeLog 2011-03-09 15:59:23 +0000 @@ -1,3 +1,8 @@ +2011-03-09 Eli Zaretskii + + * custom.texi (Init File): Add inex entries for ".emacs". + (Bug#8210) + 2011-03-08 Jan Djärv * xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2011-03-01 03:05:28 +0000 +++ doc/emacs/custom.texi 2011-03-09 15:59:23 +0000 @@ -2114,6 +2114,8 @@ @node Init File @section The Init File, @file{~/.emacs} @cindex init file +@cindex .emacs file +@cindex ~/.emacs file @cindex Emacs initialization file @cindex key rebinding, permanent @cindex rebinding keys, permanently ------------------------------------------------------------ revno: 103602 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2011-03-09 14:37:30 +0000 message: auth.texi (Help for developers): Untabify. diff: === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2011-03-09 13:39:35 +0000 +++ doc/misc/auth.texi 2011-03-09 14:37:30 +0000 @@ -263,11 +263,11 @@ :create t)))) (if found (list (plist-get found :user) - (let ((secret (plist-get found :secret))) - (if (functionp secret) - (funcall secret) - secret)) - (plist-get found :save-function)) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (plist-get found :save-function)) nil))) @end example @@ -287,7 +287,7 @@ @example (when (functionp (nth 2 credentials)) (funcall (nth 2 credentials))) -@end example +@end example Which will work whether the @code{:save-function} was provided or not. @code{:save-function} will be provided only when a new entry was ------------------------------------------------------------ revno: 103601 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2011-03-09 13:39:35 +0000 message: Merge changes made in Gnus trunk. auth-source.el (auth-source-read-char-choice): New function to read a character choice using `dropdown-list', `read-char-choice', or `read-char'. It appends "[a/b/c] " to the prompt if the choices were '(?a ?b ?c). The `dropdown-list' support is disabled for now. Use `eval-when-compile' to load `dropdown-list'. (auth-source-netrc-saver): Use it. nnimap.el (nnimap-credentials): Keep the :save-function as the third parameter in the credentials. (nnimap-open-connection-1): Use it after a successful login. (nnimap-credentials): Add IMAP-specific user and password prompt. auth-source.el (auth-source-search): Add :require parameter, taking a list. Document it and the :save-function return token. Pass :require down. Change the CREATED message from a warning to a debug statement. (auth-source-search-backends): Pass :require down. (auth-source-netrc-search): Pass :require down. (auth-source-netrc-parse): Use :require, if it's given, as a filter. Change save prompt to indicate all modifications saved here are deletions. (auth-source-netrc-create): Take user login name as default in user prompt. Move all the save functionality to a lexically bound function under the :save-function token in the returned list. Set up clearer default prompts for user, host, port, and secret. (auth-source-netrc-saver): New function, intended to be wrapped for :save-function. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-03-08 14:26:05 +0000 +++ doc/misc/ChangeLog 2011-03-09 13:39:35 +0000 @@ -1,3 +1,8 @@ +2011-03-08 Teodor Zlatanov + + * auth.texi (Help for developers): Show example of using + `auth-source-search' with prompts and :save-function. + 2011-03-07 Antoine Levitt * message.texi (Message Buffers): Update default value of === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2011-02-23 13:35:35 +0000 +++ doc/misc/auth.texi 2011-03-09 13:39:35 +0000 @@ -131,11 +131,11 @@ later. If you have problems with the search, set @code{auth-source-debug} to -@code{t} and see what host, port, and user the library is checking in -the @code{*Messages*} buffer. Ditto for any other problems, your -first step is always to see what's being checked. The second step, of -course, is to write a blog entry about it and wait for the answer in -the comments. +@code{'trivia} and see what host, port, and user the library is +checking in the @code{*Messages*} buffer. Ditto for any other +problems, your first step is always to see what's being checked. The +second step, of course, is to write a blog entry about it and wait for +the answer in the comments. You can customize the variable @code{auth-sources}. The following may be needed if you are using an older version of Emacs or if the @@ -232,6 +232,14 @@ @node Help for developers @chapter Help for developers +The auth-source library lets you control logging output easily. + +@defvar auth-source-debug +Set this variable to 'trivia to see lots of output in *Messages*, or +set it to a function that behaves like @code{message} to do your own +logging. +@end defvar + The auth-source library only has a few functions for external use. @defun auth-source-search SPEC @@ -240,6 +248,52 @@ @end defun +Let's take a look at an example of using @code{auth-source-search} +from Gnus' @code{nnimap.el}. + +@example +(defun nnimap-credentials (address ports) + (let* ((auth-source-creation-prompts + '((user . "IMAP user at %h: ") + (secret . "IMAP password for %u@@%h: "))) + (found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :require '(:user :secret) + :create t)))) + (if found + (list (plist-get found :user) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (plist-get found :save-function)) + nil))) +@end example + +This call requires the user and password (secret) to be in the +results. It also requests that an entry be created if it doesn't +exist already. While the created entry is being assembled, the shown +prompts will be used to interact with the user. The caller can also +pass data in @code{auth-source-creation-defaults} to supply defaults +for any of the prompts. + +Note that the password needs to be evaluated if it's a function. It's +wrapped in a function to provide some security. + +Later, after a successful login, @code{nnimal.el} calls the +@code{:save-function} like so: + +@example +(when (functionp (nth 2 credentials)) + (funcall (nth 2 credentials))) +@end example + +Which will work whether the @code{:save-function} was provided or not. +@code{:save-function} will be provided only when a new entry was +created, so this effectively says ``after a successful login, save the +authentication information we just used, if it was newly created.'' + @defun auth-source-delete SPEC TODO: how to include docstring? === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-03-08 14:26:05 +0000 +++ lisp/gnus/ChangeLog 2011-03-09 13:39:35 +0000 @@ -1,3 +1,34 @@ +2011-03-09 Teodor Zlatanov + + * auth-source.el (auth-source-read-char-choice): New function to read a + character choice using `dropdown-list', `read-char-choice', or + `read-char'. It appends "[a/b/c] " to the prompt if the choices were + '(?a ?b ?c). The `dropdown-list' support is disabled for now. Use + `eval-when-compile' to load `dropdown-list'. + (auth-source-netrc-saver): Use it. + +2011-03-08 Teodor Zlatanov + + * nnimap.el (nnimap-credentials): Keep the :save-function as the third + parameter in the credentials. + (nnimap-open-connection-1): Use it after a successful login. + (nnimap-credentials): Add IMAP-specific user and password prompt. + + * auth-source.el (auth-source-search): Add :require parameter, taking a + list. Document it and the :save-function return token. Pass :require + down. Change the CREATED message from a warning to a debug statement. + (auth-source-search-backends): Pass :require down. + (auth-source-netrc-search): Pass :require down. + (auth-source-netrc-parse): Use :require, if it's given, as a filter. + Change save prompt to indicate all modifications saved here are + deletions. + (auth-source-netrc-create): Take user login name as default in user + prompt. Move all the save functionality to a lexically bound function + under the :save-function token in the returned list. Set up clearer + default prompts for user, host, port, and secret. + (auth-source-netrc-saver): New function, intended to be wrapped for + :save-function. + 2011-03-07 Lars Magne Ingebrigtsen * shr.el (shr-table-horizontal-line): Change the defaults for the table === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-25 23:52:19 +0000 +++ lisp/gnus/auth-source.el 2011-03-09 13:39:35 +0000 @@ -44,7 +44,18 @@ (require 'gnus-util) (require 'assoc) (eval-when-compile (require 'cl)) -(require 'eieio) +(eval-when-compile (require 'dropdown-list nil t)) +(eval-and-compile + (or (ignore-errors (require 'eieio)) + ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib + (ignore-errors + (let ((load-path (cons (expand-file-name + "gnus-fallback-lib/eieio" + (file-name-directory (locate-library "gnus"))) + load-path))) + (require 'eieio))) + (error + "eieio not found in `load-path' or gnus-fallback-lib/ directory."))) (autoload 'secrets-create-item "secrets") (autoload 'secrets-delete-item "secrets") @@ -286,6 +297,34 @@ msg)) +;;; (auth-source-read-char-choice "enter choice? " '(?a ?b ?q)) +(defun auth-source-read-char-choice (prompt choices) + "Read one of CHOICES by `read-char-choice', or `read-char'. +`dropdown-list' support is disabled because it doesn't work reliably. +Only one of CHOICES will be returned. The PROMPT is augmented +with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." + (when choices + (let* ((prompt-choices + (apply 'concat (loop for c in choices + collect (format "%c/" c)))) + (prompt-choices (concat "[" (substring prompt-choices 0 -1) "] ")) + (full-prompt (concat prompt prompt-choices)) + k) + + (while (not (memq k choices)) + (setq k (cond + ((and nil (featurep 'dropdown-list)) + (let* ((blank (fill (copy-sequence prompt) ?.)) + (dlc (cons (format "%s %c" prompt (car choices)) + (loop for c in (cdr choices) + collect (format "%s %c" blank c))))) + (nth (dropdown-list dlc) choices))) + ((fboundp 'read-char-choice) + (read-char-choice full-prompt choices)) + (t (message "%s" full-prompt) + (setq k (read-char)))))) + k))) + ;; (auth-source-pick nil :host "any" :port 'imap :user "joe") ;; (auth-source-pick t :host "any" :port 'imap :user "joe") ;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe") @@ -393,7 +432,7 @@ (defun* auth-source-search (&rest spec &key type max host user port secret - create delete + require create delete &allow-other-keys) "Search or modify authentication backends according to SPEC. @@ -487,6 +526,11 @@ backends (netrc, at least) will prompt the user rather than throw an error. +:require (A B C) means that only results that contain those +tokens will be returned. Thus for instance requiring :secret +will ensure that any results will actually have a :secret +property. + :delete t means to delete any found entries. nil by default. Use `auth-source-delete' in ELisp code instead of calling `auth-source-search' directly with this parameter. @@ -516,11 +560,17 @@ keys provided by the backend (notably :secret). But note the exception for :max 0, which see above. +The token can hold a :save-function key. If you call that, the +user will be prompted to save the data to the backend. You can't +request that this should happen right after creation, because +`auth-source-search' has no way of knowing if the token is +actually useful. So the caller must arrange to call this function. + The token's :secret key can hold a function. In that case you must call it to obtain the actual value." (let* ((backends (mapcar 'auth-source-backend-parse auth-sources)) (max (or max 1)) - (ignored-keys '(:create :delete :max)) + (ignored-keys '(:require :create :delete :max)) (keys (loop for i below (length spec) by 2 unless (memq (nth i spec) ignored-keys) collect (nth i spec))) @@ -539,6 +589,10 @@ (or (eq t create) (listp create)) t "Invalid auth-source :create parameter (must be t or a list): %s %s") + (assert + (listp require) t + "Invalid auth-source :require parameter (must be a list): %s") + (setq filtered-backends (copy-sequence backends)) (dolist (backend backends) (dolist (key keys) @@ -562,8 +616,9 @@ spec ;; to exit early max - ;; create and delete - nil delete)) + ;; create is always nil here + nil delete + require)) (auth-source-do-debug "auth-source-search: found %d results (max %d) matching %S" @@ -577,9 +632,9 @@ spec ;; to exit early max - ;; create and delete - create delete)) - (auth-source-do-warn + create delete + require)) + (auth-source-do-debug "auth-source-search: CREATED %d results (max %d) matching %S" (length found) max spec)) @@ -589,18 +644,19 @@ found)) -(defun auth-source-search-backends (backends spec max create delete) +(defun auth-source-search-backends (backends spec max create delete require) (let (matches) (dolist (backend backends) (when (> max (length matches)) ; when we need more matches... - (let ((bmatches (apply - (slot-value backend 'search-function) - :backend backend - ;; note we're overriding whatever the spec - ;; has for :create and :delete - :create create - :delete delete - spec))) + (let* ((bmatches (apply + (slot-value backend 'search-function) + :backend backend + ;; note we're overriding whatever the spec + ;; has for :require, :create, and :delete + :require require + :create create + :delete delete + spec))) (when bmatches (auth-source-do-trivia "auth-source-search-backend: got %d (max %d) in %s:%s matching %S" @@ -729,7 +785,7 @@ ;;; (auth-source-netrc-parse "~/.authinfo.gpg") (defun* auth-source-netrc-parse (&rest spec - &key file max host user port delete + &key file max host user port delete require &allow-other-keys) "Parse FILE and return a list of all entries in the file. Note that the MAX parameter is used so we can exit the parse early." @@ -828,7 +884,15 @@ (or (aget alist "port") (aget alist "protocol") - t))) + t)) + (or + ;; the required list of keys is nil, or + (null require) + ;; every element of require is in the normalized list + (let ((normalized (nth 0 (auth-source-netrc-normalize + (list alist))))) + (loop for req in require + always (plist-get normalized req))))) (decf max) (push (nreverse alist) result) ;; to delete a line, we just comment it out @@ -853,7 +917,7 @@ (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) ;; ask AFTER we've successfully opened the file - (when (y-or-n-p (format "Save file %s? (%d modifications)" + (when (y-or-n-p (format "Save file %s? (%d deletions)" file modified)) (write-region (point-min) (point-max) file nil 'silent) (auth-source-do-debug @@ -893,7 +957,7 @@ (defun* auth-source-netrc-search (&rest spec - &key backend create delete + &key backend require create delete type max host user port &allow-other-keys) "Given a property list SPEC, return search matches from the :backend. @@ -905,6 +969,7 @@ (let ((results (auth-source-netrc-normalize (auth-source-netrc-parse :max max + :require require :delete delete :file (oref backend source) :host (or host t) @@ -992,12 +1057,12 @@ (data (auth-source-netrc-element-or-first data)) ;; this is the default to be offered (given-default (aget auth-source-creation-defaults r)) - ;; the default supplementals are simple: for the user, - ;; try (user-login-name), otherwise take given-default + ;; the default supplementals are simple: + ;; for the user, try `given-default' and then (user-login-name); + ;; otherwise take `given-default' (default (cond - ;; don't default the user name - ;; ((and (not given-default) (eq r 'user)) - ;; (user-login-name)) + ((and (not given-default) (eq r 'user)) + (user-login-name)) (t given-default))) (printable-defaults (list (cons 'user @@ -1020,10 +1085,10 @@ "[any port]")))) (prompt (or (aget auth-source-creation-prompts r) (case r - ('secret "%p password for user %u, host %h: ") - ('user "%p user name: ") - ('host "%p host name for user %u: ") - ('port "%p port for user %u and host %h: ")) + (secret "%p password for %u@%h: ") + (user "%p user name for %h: ") + (host "%p host name for user %u: ") + (port "%p port for %u@%h: ")) (format "Enter %s (%%u@%%h:%%p): " r))) (prompt (auth-source-format-prompt prompt @@ -1071,70 +1136,79 @@ data)))) (setq add (concat add (funcall printer))))))) - (with-temp-buffer - (when (file-exists-p file) - (insert-file-contents file)) - (when auth-source-gpg-encrypt-to - ;; (see bug#7487) making `epa-file-encrypt-to' local to - ;; this buffer lets epa-file skip the key selection query - ;; (see the `local-variable-p' check in - ;; `epa-file-write-region'). - (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) - (make-local-variable 'epa-file-encrypt-to)) - (if (listp auth-source-gpg-encrypt-to) - (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) - (goto-char (point-max)) - - ;; ask AFTER we've successfully opened the file - (let ((prompt (format "Save auth info to file %s? %s: " - file - "y/n/N/e/?")) - (done (not (eq auth-source-save-behavior 'ask))) - (bufname "*auth-source Help*") - k) - (while (not done) - (message "%s" prompt) - (setq k (read-char)) - (case k - (?y (setq done t)) - (?? (save-excursion - (with-output-to-temp-buffer bufname - (princ - (concat "(y)es, save\n" - "(n)o but use the info\n" - "(N)o and don't ask to save again\n" - "(e)dit the line\n" - "(?) for help as you can see.\n")) + (plist-put + artificial + :save-function + (lexical-let ((file file) + (add add)) + (lambda () (auth-source-netrc-saver file add)))) + + (list artificial))) + +;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch") :user "tzz" :port "imap" :create t :max 1)) :save-function)) +(defun auth-source-netrc-saver (file add) + "Save a line ADD in FILE, prompting along the way. +Respects `auth-source-save-behavior'." + (with-temp-buffer + (when (file-exists-p file) + (insert-file-contents file)) + (when auth-source-gpg-encrypt-to + ;; (see bug#7487) making `epa-file-encrypt-to' local to + ;; this buffer lets epa-file skip the key selection query + ;; (see the `local-variable-p' check in + ;; `epa-file-write-region'). + (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) + (make-local-variable 'epa-file-encrypt-to)) + (if (listp auth-source-gpg-encrypt-to) + (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) + ;; we want the new data to be found first, so insert at beginning + (goto-char (point-min)) + + ;; ask AFTER we've successfully opened the file + (let ((prompt (format "Save auth info to file %s? " file)) + (done (not (eq auth-source-save-behavior 'ask))) + (bufname "*auth-source Help*") + k) + (while (not done) + (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) + (case k + (?y (setq done t)) + (?? (save-excursion + (with-output-to-temp-buffer bufname + (princ + (concat "(y)es, save\n" + "(n)o but use the info\n" + "(N)o and don't ask to save again\n" + "(e)dit the line\n" + "(?) for help as you can see.\n")) (set-buffer standard-output) (help-mode)))) - (?n (setq add "" - done t)) - (?N (setq add "" - done t - auth-source-save-behavior nil)) - (?e (setq add (read-string "Line to add: " add))) - (t nil))) - - (when (get-buffer-window bufname) - (delete-window (get-buffer-window bufname))) - - ;; make sure the info is not saved - (when (null auth-source-save-behavior) - (setq add "")) - - (when (< 0 (length add)) - (progn - (unless (bolp) - (insert "\n")) - (insert add "\n") - (write-region (point-min) (point-max) file nil 'silent) - (auth-source-do-warn - "auth-source-netrc-create: wrote 1 new line to %s" - file) - nil)) - - (when (eq done t) - (list artificial)))))) + (?n (setq add "" + done t)) + (?N (setq add "" + done t + auth-source-save-behavior nil)) + (?e (setq add (read-string "Line to add: " add))) + (t nil))) + + (when (get-buffer-window bufname) + (delete-window (get-buffer-window bufname))) + + ;; make sure the info is not saved + (when (null auth-source-save-behavior) + (setq add "")) + + (when (< 0 (length add)) + (progn + (unless (bolp) + (insert "\n")) + (insert add "\n") + (write-region (point-min) (point-max) file nil 'silent) + (auth-source-do-debug + "auth-source-netrc-create: wrote 1 new line to %s" + file) + (message "Saved new authentication information to %s" file) + nil))))) ;;; Backend specific parsing: Secrets API backend === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-03-08 14:26:05 +0000 +++ lisp/gnus/nnimap.el 2011-03-09 13:39:35 +0000 @@ -279,16 +279,21 @@ (current-buffer))) (defun nnimap-credentials (address ports) - (let ((found (nth 0 (auth-source-search :max 1 - :host address - :port ports - :create t)))) + (let* ((auth-source-creation-prompts + '((user . "IMAP user at %h: ") + (secret . "IMAP password for %u@%h: "))) + (found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :require '(:user :secret) + :create t)))) (if found (list (plist-get found :user) (let ((secret (plist-get found :secret))) (if (functionp secret) (funcall secret) - secret))) + secret)) + (plist-get found :save-function)) nil))) (defun nnimap-keepalive () @@ -396,7 +401,12 @@ (let ((nnimap-inhibit-logging t)) (setq login-result (nnimap-login (car credentials) (cadr credentials)))) - (unless (car login-result) + (if (car login-result) + ;; save the credentials if a save function exists + ;; (such a function will only be passed if a new + ;; token was created) + (when (functionp (nth 2 credentials)) + (funcall (nth 2 credentials))) ;; If the login failed, then forget the credentials ;; that are now possibly cached. (dolist (host (list (nnoo-current-server 'nnimap) ------------------------------------------------------------ revno: 103600 committer: Michael Albinus branch nick: trunk timestamp: Wed 2011-03-09 12:04:27 +0100 message: * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do not use `tramp-file-name-port', because this returns also `tramp-default-port'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 10:45:19 +0000 +++ lisp/ChangeLog 2011-03-09 11:04:27 +0000 @@ -1,3 +1,9 @@ +2011-03-09 Michael Albinus + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do + not use `tramp-file-name-port', because this returns also + `tramp-default-port'. + 2011-03-09 Deniz Dogan * net/rcirc.el (rcirc-handler-001): Remove useless === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-02-05 09:52:07 +0000 +++ lisp/net/tramp-sh.el 2011-03-09 11:04:27 +0000 @@ -2251,11 +2251,15 @@ 'identity) (if t2 (tramp-make-copy-program-file-name v) newname))) - ;; Check for port number. Until now, there's no need for handling - ;; like method, user, host. - (setq host (tramp-file-name-real-host v) - port (tramp-file-name-port v) - port (or (and port (number-to-string port)) "")) + ;; Check for host and port number. We cannot use + ;; `tramp-file-name-port', because this returns also + ;; `tramp-default-port', which might clash with settings in + ;; "~/.ssh/config". + (setq host (tramp-file-name-host v) + port "") + (when (string-match tramp-host-with-port-regexp host) + (setq host (string-to-number (match-string 1 host)) + port (string-to-number (match-string 2 host)))) ;; Compose copy command. (setq spec (format-spec-make @@ -2270,7 +2274,7 @@ copy-args (delete ;; " " has either been a replacement of "%k" (when - ;; keep-date argument is non-nil), or a replacemtent + ;; keep-date argument is non-nil), or a replacement ;; for the whole keep-date sublist. " " (dolist @@ -2281,7 +2285,7 @@ (append copy-args (let ((y (mapcar (lambda (z) (format-spec z spec)) x))) - (if (zerop (length (car y))) '(" ") y)))))) + (if (member "" y) '(" ") y)))))) copy-env (delq nil ------------------------------------------------------------ revno: 103599 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Wed 2011-03-09 11:45:19 +0100 message: * lisp/net/rcirc.el (rcirc-handler-001): Remove useless with-rcirc-process-buffer. (rcirc-check-auth-status): Swap arguments to string-match. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 09:01:14 +0000 +++ lisp/ChangeLog 2011-03-09 10:45:19 +0000 @@ -1,3 +1,9 @@ +2011-03-09 Deniz Dogan + + * net/rcirc.el (rcirc-handler-001): Remove useless + with-rcirc-process-buffer. + (rcirc-check-auth-status): Swap arguments to string-match. + 2011-03-09 Glenn Morris * shell.el (shell-mode): === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-03-07 12:03:22 +0000 +++ lisp/net/rcirc.el 2011-03-09 10:45:19 +0000 @@ -2449,8 +2449,7 @@ (if rcirc-auto-authenticate-flag (if rcirc-authenticate-before-join (progn - (with-rcirc-process-buffer process - (add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t)) + (add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t) (rcirc-authenticate)) (rcirc-authenticate) (rcirc-join-channels process rcirc-startup-channels)) @@ -2515,7 +2514,7 @@ (and ;; quakenet (string= sender "Q") (string= target rcirc-nick) - (string-match message "\\`You are now logged in as .+\\.\\'"))) + (string-match "\\`You are now logged in as .+\\.\\'" message))) (setq rcirc-user-authenticated t) (run-hook-with-args 'rcirc-authenticated-hook process) (remove-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t)))))) ------------------------------------------------------------ revno: 103598 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 01:01:14 -0800 message: * shell.el (shell-mode): Set comint-input-ring-size from HISTSIZE. (Bug#7889) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-09 08:43:27 +0000 +++ lisp/ChangeLog 2011-03-09 09:01:14 +0000 @@ -1,5 +1,8 @@ 2011-03-09 Glenn Morris + * shell.el (shell-mode): + Set comint-input-ring-size from HISTSIZE. (Bug#7889) + * progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. Check for GDBHISTFILE, HISTSIZE, etc. (Bug#7889) === modified file 'lisp/shell.el' --- lisp/shell.el 2011-03-05 21:56:00 +0000 +++ lisp/shell.el 2011-03-09 09:01:14 +0000 @@ -459,7 +459,12 @@ ;; shell-dependent assignments. (when (ring-empty-p comint-input-ring) (let ((shell (file-name-nondirectory (car - (process-command (get-buffer-process (current-buffer))))))) + (process-command (get-buffer-process (current-buffer)))))) + (hsize (getenv "HISTSIZE"))) + (and (stringp hsize) + (integerp (setq hsize (string-to-number hsize))) + (> hsize 0) + (set (make-local-variable 'comint-input-ring-size) hsize)) (setq comint-input-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash") "~/.bash_history") ------------------------------------------------------------ revno: 103597 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 00:57:40 -0800 message: Fix previous gdb-mi fix... diff: === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-03-09 08:55:08 +0000 +++ lisp/progmodes/gdb-mi.el 2011-03-09 08:57:40 +0000 @@ -672,7 +672,7 @@ ((string-equal (match-string 1) "size") (setq hsize (match-string 2)))))))) (and (stringp hsize) - (integerp (string-to-number hsize)) + (integerp (setq hsize (string-to-number hsize))) (> hsize 0) (set (make-local-variable 'comint-input-ring-size) hsize)) (if (stringp hfile) ------------------------------------------------------------ revno: 103596 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 00:55:08 -0800 message: Fix previous gdb-mi change. diff: === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-03-09 08:43:27 +0000 +++ lisp/progmodes/gdb-mi.el 2011-03-09 08:55:08 +0000 @@ -671,8 +671,10 @@ (file-name-directory file)))) ((string-equal (match-string 1) "size") (setq hsize (match-string 2)))))))) - (if (integerp hsize) - (set (make-local-variable 'comint-input-ring-size) hsize)) + (and (stringp hsize) + (integerp (string-to-number hsize)) + (> hsize 0) + (set (make-local-variable 'comint-input-ring-size) hsize)) (if (stringp hfile) (set (make-local-variable 'comint-input-ring-file-name) hfile)) (comint-read-input-ring t))) ------------------------------------------------------------ revno: 103595 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-09 00:43:27 -0800 message: gdb-mi addition for bug#7889. * lisp/progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. Check for GDBHISTFILE, HISTSIZE, etc. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-08 17:11:19 +0000 +++ lisp/ChangeLog 2011-03-09 08:43:27 +0000 @@ -1,3 +1,8 @@ +2011-03-09 Glenn Morris + + * progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. + Check for GDBHISTFILE, HISTSIZE, etc. (Bug#7889) + 2011-03-08 Chong Yidong * emacs-lisp/package.el (package-refresh-contents) === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-02-10 16:56:00 +0000 +++ lisp/progmodes/gdb-mi.el 2011-03-09 08:43:27 +0000 @@ -648,21 +648,34 @@ (set (make-local-variable 'gud-minor-mode) 'gdbmi) (setq comint-input-sender 'gdb-send) (when (ring-empty-p comint-input-ring) ; cf shell-mode - (let (hfile) - (when (catch 'done - (dolist (file '(".gdbinit" "~/.gdbinit")) - (if (file-readable-p (setq file (expand-file-name file))) - (with-temp-buffer - (insert-file-contents file) - (and (re-search-forward - "^ *set history filename *\\(.*\\)" nil t) - (file-readable-p - (setq hfile (expand-file-name - (match-string 1) - (file-name-directory file)))) - (throw 'done t)))))) - (set (make-local-variable 'comint-input-ring-file-name) hfile) - (comint-read-input-ring t)))) + (let ((hfile (expand-file-name (or (getenv "GBDHISTFILE") + (if (eq system-type 'ms-dos) + "_gdb_history" + ".gdb_history")))) + ;; gdb defaults to 256, but we'll default to comint-input-ring-size. + (hsize (getenv "HISTSIZE"))) + (dolist (file (append '("~/.gdbinit") + (unless (string-equal (expand-file-name ".") + (expand-file-name "~")) + '(".gdbinit")))) + (if (file-readable-p (setq file (expand-file-name file))) + (with-temp-buffer + (insert-file-contents file) + ;; TODO? check for "set history save\\( *on\\)?" and do + ;; not use history otherwise? + (while (re-search-forward + "^ *set history \\(filename\\|size\\) *\\(.*\\)" nil t) + (cond ((string-equal (match-string 1) "filename") + (setq hfile (expand-file-name + (match-string 2) + (file-name-directory file)))) + ((string-equal (match-string 1) "size") + (setq hsize (match-string 2)))))))) + (if (integerp hsize) + (set (make-local-variable 'comint-input-ring-size) hsize)) + (if (stringp hfile) + (set (make-local-variable 'comint-input-ring-file-name) hfile)) + (comint-read-input-ring t))) (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") (gud-def gud-jump ------------------------------------------------------------ revno: 103594 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-03-08 09:33:55 -0800 message: Add missing piece of previous doc/ change. * doc/lispref/elisp.texi: Set documentencoding. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-08 08:59:18 +0000 +++ doc/emacs/ChangeLog 2011-03-08 17:33:55 +0000 @@ -8,6 +8,7 @@ * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * emacs.texi (Acknowledgments): * ack.texi (Acknowledgments): Names to UTF-8. + * emacs.texi: Set documentencoding. * display.texi (Optional Mode Line): Don't mention exactly where display-time appears. (Bug#8193) === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-03-08 08:59:18 +0000 +++ doc/lispref/ChangeLog 2011-03-08 17:33:55 +0000 @@ -2,6 +2,7 @@ * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * intro.texi (Acknowledgements): Names to UTF-8. + * elisp.texi: Set documentencoding. 2011-03-06 Chong Yidong === modified file 'doc/lispref/elisp.texi' --- doc/lispref/elisp.texi 2011-03-06 15:54:36 +0000 +++ doc/lispref/elisp.texi 2011-03-08 17:33:55 +0000 @@ -62,6 +62,8 @@ @end quotation @end copying +@documentencoding UTF-8 + @dircategory GNU Emacs Lisp @direntry * Elisp: (elisp). The Emacs Lisp Reference Manual.