Now on revision 111428. ------------------------------------------------------------ revno: 111428 fixes bug: http://debbugs.gnu.org/11490 committer: Chong Yidong branch nick: trunk timestamp: Sun 2013-01-06 10:58:57 +0800 message: Try to handle buffer/file modifications which conflict with VCS locking. * vc/vc-hooks.el (vc-after-save): DTRT for locking VCSes. * vc/vc.el (vc-next-action): Detect buffer modifications conflicting with locking VCS operation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-05 13:48:16 +0000 +++ lisp/ChangeLog 2013-01-06 02:58:57 +0000 @@ -1,3 +1,10 @@ +2013-01-06 Chong Yidong + + * vc/vc.el (vc-next-action): Detect buffer modifications + conflicting with locking VCS operation (Bug#11490). + + * vc/vc-hooks.el (vc-after-save): DTRT for locking VCSes. + 2013-01-05 Michael Albinus * net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls): === modified file 'lisp/vc/vc-hooks.el' --- lisp/vc/vc-hooks.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/vc-hooks.el 2013-01-06 02:58:57 +0000 @@ -703,19 +703,21 @@ ;; the state to 'edited and redisplay the mode line. (let* ((file buffer-file-name) (backend (vc-backend file))) - (and backend - (or (and (equal (vc-file-getprop file 'vc-checkout-time) - (nth 5 (file-attributes file))) - ;; File has been saved in the same second in which - ;; it was checked out. Clear the checkout-time - ;; to avoid confusion. - (vc-file-setprop file 'vc-checkout-time nil)) - t) - (eq (vc-checkout-model backend (list file)) 'implicit) - (vc-state-refresh file backend) - (vc-mode-line file backend)) - ;; Try to avoid unnecessary work, a *vc-dir* buffer is - ;; present if this is true. + (cond + ((null backend)) + ((eq (vc-checkout-model backend (list file)) 'implicit) + ;; If the file was saved in the same second in which it was + ;; checked out, clear the checkout-time to avoid confusion. + (if (equal (vc-file-getprop file 'vc-checkout-time) + (nth 5 (file-attributes file))) + (vc-file-setprop file 'vc-checkout-time nil)) + (if (vc-state-refresh file backend) + (vc-mode-line file backend))) + ;; If we saved an unlocked file on a locking based VCS, that + ;; file is not longer up-to-date. + ((eq (vc-file-getprop file 'vc-state) 'up-to-date) + (vc-file-setprop file 'vc-state nil))) + ;; Resynch *vc-dir* buffers, if any are present. (when vc-dir-buffers (vc-dir-resynch-file file)))) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/vc.el 2013-01-06 02:58:57 +0000 @@ -659,6 +659,10 @@ (eval-when-compile (require 'dired)) +(declare-function dired-get-filename "dired" (&optional localp noerror)) +(declare-function dired-move-to-filename "dired" (&optional err eol)) +(declare-function dired-marker-regexp "dired" ()) + (unless (assoc 'vc-parent-buffer minor-mode-alist) (setq minor-mode-alist (cons '(vc-parent-buffer vc-parent-buffer-name) @@ -1072,6 +1076,17 @@ ;; among all the `files'. (model (nth 4 vc-fileset))) + ;; If a buffer has unsaved changes, a checkout would discard those + ;; changes, so treat the buffer as having unlocked changes. + (when (and (not (eq model 'implicit)) (eq state 'up-to-date)) + (let ((files files)) + (while files + (let ((buffer (get-file-buffer (car files)))) + (and buffer + (buffer-modified-p buffer) + (setq state 'unlocked-changes + files nil)))))) + ;; Do the right thing (cond ((eq state 'missing) ------------------------------------------------------------ revno: 111427 fixes bug: http://debbugs.gnu.org/13255 committer: Chong Yidong branch nick: trunk timestamp: Sun 2013-01-06 10:38:04 +0800 message: Fix echoing of replayed keys. * keyboard.c (echo_add_char): New function, factored out from echo_char. Don't add a space if the previous echo string was empty. (echo_char): Use it. (read_key_sequence): When echoing mock input, ensure that the trailing dash is properly added. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-05 21:18:01 +0000 +++ src/ChangeLog 2013-01-06 02:38:04 +0000 @@ -1,3 +1,12 @@ +2013-01-06 Chong Yidong + + * keyboard.c (echo_add_char): New function, factored out from + echo_char. Don't add a space if the previous echo string was + empty (Bug#13255). + (echo_char): Use it. + (read_key_sequence): When echoing mock input, ensure that the + trailing dash is properly added. + 2013-01-05 Eli Zaretskii * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead === modified file 'src/keyboard.c' --- src/keyboard.c 2013-01-02 16:13:04 +0000 +++ src/keyboard.c 2013-01-06 02:38:04 +0000 @@ -497,97 +497,103 @@ } -/* Add C to the echo string, if echoing is going on. - C can be a character, which is printed prettily ("M-C-x" and all that - jazz), or a symbol, whose name is printed. */ +/* Add C to the echo string, without echoing it immediately. C can be + a character, which is pretty-printed, or a symbol, whose name is + printed. */ + +static void +echo_add_char (Lisp_Object c) +{ + int size = KEY_DESCRIPTION_SIZE + 100; + char *buffer = alloca (size); + char *ptr = buffer; + Lisp_Object echo_string; + + echo_string = KVAR (current_kboard, echo_string); + + /* If someone has passed us a composite event, use its head symbol. */ + c = EVENT_HEAD (c); + + if (INTEGERP (c)) + ptr = push_key_description (XINT (c), ptr); + else if (SYMBOLP (c)) + { + Lisp_Object name = SYMBOL_NAME (c); + int nbytes = SBYTES (name); + + if (size - (ptr - buffer) < nbytes) + { + int offset = ptr - buffer; + size = max (2 * size, size + nbytes); + buffer = alloca (size); + ptr = buffer + offset; + } + + ptr += copy_text (SDATA (name), (unsigned char *) ptr, nbytes, + STRING_MULTIBYTE (name), 1); + } + + if ((NILP (echo_string) || SCHARS (echo_string) == 0) + && help_char_p (c)) + { + const char *text = " (Type ? for further options)"; + int len = strlen (text); + + if (size - (ptr - buffer) < len) + { + int offset = ptr - buffer; + size += len; + buffer = alloca (size); + ptr = buffer + offset; + } + + memcpy (ptr, text, len); + ptr += len; + } + + /* Replace a dash from echo_dash with a space, otherwise add a space + at the end as a separator between keys. */ + if (STRINGP (echo_string) && SCHARS (echo_string) > 1) + { + Lisp_Object last_char, prev_char, idx; + + idx = make_number (SCHARS (echo_string) - 2); + prev_char = Faref (echo_string, idx); + + idx = make_number (SCHARS (echo_string) - 1); + last_char = Faref (echo_string, idx); + + /* We test PREV_CHAR to make sure this isn't the echoing of a + minus-sign. */ + if (XINT (last_char) == '-' && XINT (prev_char) != ' ') + Faset (echo_string, idx, make_number (' ')); + else + echo_string = concat2 (echo_string, build_string (" ")); + } + else if (STRINGP (echo_string) && SCHARS (echo_string) > 0) + echo_string = concat2 (echo_string, build_string (" ")); + + kset_echo_string + (current_kboard, + concat2 (echo_string, make_string (buffer, ptr - buffer))); +} + +/* Add C to the echo string, if echoing is going on. C can be a + character or a symbol. */ static void echo_char (Lisp_Object c) { if (current_kboard->immediate_echo) { - int size = KEY_DESCRIPTION_SIZE + 100; - char *buffer = alloca (size); - char *ptr = buffer; - Lisp_Object echo_string; - - echo_string = KVAR (current_kboard, echo_string); - - /* If someone has passed us a composite event, use its head symbol. */ - c = EVENT_HEAD (c); - - if (INTEGERP (c)) - { - ptr = push_key_description (XINT (c), ptr); - } - else if (SYMBOLP (c)) - { - Lisp_Object name = SYMBOL_NAME (c); - int nbytes = SBYTES (name); - - if (size - (ptr - buffer) < nbytes) - { - int offset = ptr - buffer; - size = max (2 * size, size + nbytes); - buffer = alloca (size); - ptr = buffer + offset; - } - - ptr += copy_text (SDATA (name), (unsigned char *) ptr, nbytes, - STRING_MULTIBYTE (name), 1); - } - - if ((NILP (echo_string) || SCHARS (echo_string) == 0) - && help_char_p (c)) - { - const char *text = " (Type ? for further options)"; - int len = strlen (text); - - if (size - (ptr - buffer) < len) - { - int offset = ptr - buffer; - size += len; - buffer = alloca (size); - ptr = buffer + offset; - } - - memcpy (ptr, text, len); - ptr += len; - } - - /* Replace a dash from echo_dash with a space, otherwise - add a space at the end as a separator between keys. */ - if (STRINGP (echo_string) - && SCHARS (echo_string) > 1) - { - Lisp_Object last_char, prev_char, idx; - - idx = make_number (SCHARS (echo_string) - 2); - prev_char = Faref (echo_string, idx); - - idx = make_number (SCHARS (echo_string) - 1); - last_char = Faref (echo_string, idx); - - /* We test PREV_CHAR to make sure this isn't the echoing - of a minus-sign. */ - if (XINT (last_char) == '-' && XINT (prev_char) != ' ') - Faset (echo_string, idx, make_number (' ')); - else - echo_string = concat2 (echo_string, build_string (" ")); - } - else if (STRINGP (echo_string)) - echo_string = concat2 (echo_string, build_string (" ")); - - kset_echo_string - (current_kboard, - concat2 (echo_string, make_string (buffer, ptr - buffer))); - + echo_add_char (c); echo_now (); } } /* Temporarily add a dash to the end of the echo string if it's not - empty, so that it serves as a mini-prompt for the very next character. */ + empty, so that it serves as a mini-prompt for the very next + character. */ static void echo_dash (void) @@ -9218,8 +9224,12 @@ key = keybuf[t]; add_command_key (key); if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes)) - && NILP (Fzerop (Vecho_keystrokes))) - echo_char (key); + && NILP (Fzerop (Vecho_keystrokes)) + && current_kboard->immediate_echo) + { + echo_add_char (key); + echo_dash (); + } } /* If not, we should actually read a character. */ ------------------------------------------------------------ revno: 111426 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-01-05 13:18:01 -0800 message: Merge from emacs-24; up to r111143 diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-01-02 16:13:04 +0000 +++ doc/emacs/ChangeLog 2013-01-05 21:18:01 +0000 @@ -1,3 +1,7 @@ +2013-01-05 Glenn Morris + + * text.texi (HTML Mode): Remove deleted nxml C-RET binding. + 2012-12-21 Glenn Morris * emacs-xtra.texi (copying): The FSF does not sell copies of this. === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2013-01-01 09:11:05 +0000 +++ doc/emacs/text.texi 2013-01-05 19:21:17 +0000 @@ -1917,7 +1917,7 @@ The major mode for editing XML documents is called nXML mode. This is a powerful major mode that can recognize many existing XML schema and use them to provide completion of XML elements via -@kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as ``on-the-fly'' XML +@kbd{M-@key{TAB}}, as well as ``on-the-fly'' XML validation with error highlighting. To enable nXML mode in an existing buffer, type @kbd{M-x nxml-mode}, or, equivalently, @kbd{M-x xml-mode}. Emacs uses nXML mode for files which have the extension === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-01-04 19:22:37 +0000 +++ doc/lispref/ChangeLog 2013-01-05 21:18:01 +0000 @@ -1,3 +1,17 @@ +2013-01-05 Glenn Morris + + * display.texi (Overlay Properties): Mention field. (Bug#13364) + +2013-01-05 Eli Zaretskii + + * hooks.texi (Standard Hooks): Use @item, not @itemx, as the first + directive in a group of items. + +2013-01-05 Chong Yidong + + * keymaps.texi (Key Sequences): Remove obsolete sentence + (Bug#13356). + 2013-01-04 Ari Roponen (tiny change) * hash.texi (Defining Hash): Fix typo. (Bug#13345) === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-01-02 16:13:04 +0000 +++ doc/lispref/display.texi 2013-01-05 21:18:01 +0000 @@ -1559,6 +1559,14 @@ echo area, or in the tooltip window. For details see @ref{Text help-echo}. +@item field +@kindex field @r{(overlay property)} +@c Copied from Special Properties. +Consecutive characters with the same @code{field} property constitute a +@emph{field}. Some motion functions including @code{forward-word} and +@code{beginning-of-line} stop moving at a field boundary. +@xref{Fields}. + @item modification-hooks @kindex modification-hooks @r{(overlay property)} This property's value is a list of functions to be called if any === modified file 'doc/lispref/hooks.texi' --- doc/lispref/hooks.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/hooks.texi 2013-01-05 08:37:05 +0000 @@ -121,7 +121,7 @@ @item delete-terminal-functions @xref{Multiple Terminals}. -@itemx pop-up-frame-function +@item pop-up-frame-function @itemx split-window-preferred-function @xref{Choosing Window Options}. === modified file 'doc/lispref/keymaps.texi' --- doc/lispref/keymaps.texi 2013-01-02 16:13:04 +0000 +++ doc/lispref/keymaps.texi 2013-01-05 21:18:01 +0000 @@ -94,9 +94,6 @@ (kbd " SPC") @result{} [f1 32] (kbd "C-M-") @result{} [C-M-down] @end example - -This macro is not meant for use with arguments that vary---only -with string constants. @end defun @node Keymap Basics === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-01-04 19:22:37 +0000 +++ doc/misc/ChangeLog 2013-01-05 21:18:01 +0000 @@ -1,3 +1,28 @@ +2013-01-05 Andreas Schwab + + * ada-mode.texi: Remove braces from @title argument. + * eudc.texi: Likewise. + * smtpmail.texi: Likewise. + * auth.texi (VERSION): Set before first use. + * emacs-gnutls.texi (VERSION): Likewise. + * pgg.texi (VERSION): Likewise. + * ede.texi (Top): Rename from top, all uses changed. + * eshell.texi: Add missing argument to @sp. + * forms.texi (Top): Reorder menu to match structure. + * htmlfontify.texi (Customisation): Add missing @item in + @enumerate. + * org.texi (Advanced features): Add missing argument for @item. + (Property searches): Use @backslashchar{} in macro argument. + * pcl-cvs.texi: Add missing argument to @sp. + (Movement commands): Fix use of @itemx. + * vip.texi (Misc Commands, Viewing the Buffer): Likewise. + * reftex.texi (Options (Creating Citations)): Add missing newline + before @end. + * tramp.texi (Obtaining Tramp): Remove extra dots. + (Configuration): Reorder menu to match structure. + (Remote shell setup): Replace literal NUL character by \0. + * viper.texi (Marking): Add missing argument for @item. + 2013-01-04 Glenn Morris * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): === modified file 'doc/misc/ada-mode.texi' --- doc/misc/ada-mode.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/ada-mode.texi 2013-01-05 21:18:01 +0000 @@ -25,7 +25,7 @@ @titlepage @sp 10 -@title{Ada Mode} +@title Ada Mode @sp 2 @subtitle An Emacs major mode for programming in Ada @subtitle Ada Mode Version 4.00 === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/auth.texi 2013-01-05 16:19:53 +0000 @@ -2,11 +2,11 @@ @include gnus-overrides.texi +@set VERSION 0.3 + @setfilename ../../info/auth @settitle Emacs auth-source Library @value{VERSION} -@set VERSION 0.3 - @copying This file describes the Emacs auth-source library. === modified file 'doc/misc/ede.texi' --- doc/misc/ede.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/ede.texi 2013-01-05 16:19:53 +0000 @@ -63,7 +63,7 @@ @contents -@node top, EDE Project Concepts, (dir), (dir) +@node Top, EDE Project Concepts, (dir), (dir) @top EDE @comment node-name, next, previous, up @@ -91,7 +91,7 @@ * GNU Free Documentation License:: The license for this documentation. @end menu -@node EDE Project Concepts, EDE Mode, top, top +@node EDE Project Concepts, EDE Mode, Top, Top @chapter @ede{} Project Concepts @ede{} is a generic interface for managing projects. It specifies a @@ -126,7 +126,7 @@ documentation or interface files. @ede{} can provide this information. -@node EDE Mode, Quick Start, EDE Project Concepts, top +@node EDE Mode, Quick Start, EDE Project Concepts, Top @chapter @ede{} Mode @ede{} is implemented as a minor mode, which augments other modes such @@ -143,7 +143,7 @@ commands. These menu items, and their corresponding keybindings, are independent of the type of project you are actually working on. -@node Quick Start, Creating a project, EDE Mode, top +@node Quick Start, Creating a project, EDE Mode, Top @chapter Quick Start Once you have @ede{} enabled, you can create a project. This chapter @@ -439,7 +439,7 @@ If your program takes command line arguments, you can type them in when it offers the command line you want to use to run your program. -@node Creating a project, Modifying your project, Quick Start, top +@node Creating a project, Modifying your project, Quick Start, Top @chapter Creating a project To create a new project, first visit a file that you want to include @@ -497,7 +497,7 @@ the toplevel project handles subprojects in the build process is dependent on that project's type. -@node Modifying your project, Building and Debugging, Creating a project, top +@node Modifying your project, Building and Debugging, Creating a project, Top @chapter Modifying your project In this chapter, we describe the generic features for manipulating @@ -678,7 +678,7 @@ To switch between different active configurations, modify the ``configuration default'' slot. -@node Building and Debugging, Miscellaneous commands, Modifying your project, top +@node Building and Debugging, Miscellaneous commands, Modifying your project, Top @chapter Building and Debugging @ede{} provides the following ``project-aware'' compilation and @@ -697,7 +697,7 @@ These commands are also available from the @samp{Development} menu. -@node Miscellaneous commands, Extending EDE, Building and Debugging, top +@node Miscellaneous commands, Extending EDE, Building and Debugging, Top @chapter Miscellaneous commands If you opt to go in and edit @ede{} project files directly---for @@ -1093,7 +1093,7 @@ methods. See the code in @file{ede-locate.el} for GNU Global as a simple example. -@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, top +@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top @chapter Extending @ede{} This chapter is intended for users who want to write new parts or fix === modified file 'doc/misc/emacs-gnutls.texi' --- doc/misc/emacs-gnutls.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/emacs-gnutls.texi 2013-01-05 16:19:53 +0000 @@ -1,10 +1,10 @@ \input texinfo @c -*-texinfo-*- +@set VERSION 0.3 + @setfilename ../../info/emacs-gnutls @settitle Emacs GnuTLS Integration @value{VERSION} -@set VERSION 0.3 - @copying This file describes the Emacs GnuTLS integration. === modified file 'doc/misc/eshell.texi' --- doc/misc/eshell.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/eshell.texi 2013-01-05 21:18:01 +0000 @@ -32,9 +32,9 @@ @sp 4 @c The title is printed in a large font. @center @titlefont{User's Guide} -@sp +@sp 1 @center @titlefont{to} -@sp +@sp 1 @center @titlefont{Eshell: The Emacs Shell} @ignore @sp 2 === modified file 'doc/misc/eudc.texi' --- doc/misc/eudc.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/eudc.texi 2013-01-05 21:18:01 +0000 @@ -35,8 +35,8 @@ @footnotestyle end @titlepage -@title{EUDC Manual} -@subtitle{The Emacs Unified Directory Client} +@title EUDC Manual +@subtitle The Emacs Unified Directory Client @author by Oscar Figueiredo @code{1.30b} === modified file 'doc/misc/forms.texi' --- doc/misc/forms.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/forms.texi 2013-01-05 16:19:53 +0000 @@ -87,8 +87,8 @@ * Miscellaneous:: Forms mode messages and other remarks. * Error Messages:: List of error messages forms mode can produce. * Long Example:: A more complex control file example. +* Credits:: Thanks everyone. * GNU Free Documentation License:: The license for this documentation. -* Credits:: Thanks everyone. * Index:: Index to this manual. @end menu @end ifnottex === modified file 'doc/misc/htmlfontify.texi' --- doc/misc/htmlfontify.texi 2013-01-04 09:39:40 +0000 +++ doc/misc/htmlfontify.texi 2013-01-05 16:19:53 +0000 @@ -1520,9 +1520,12 @@ in order, to: @enumerate - The tag - The line - The character (point) at which the tag occurs +@item +The tag +@item +The line +@item +The character (point) at which the tag occurs @end enumerate @item hfy-index-file === modified file 'doc/misc/org.texi' --- doc/misc/org.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/org.texi 2013-01-05 21:18:01 +0000 @@ -3027,7 +3027,7 @@ Selects this line for global recalculation with @kbd{C-u C-c *}, but not for automatic recalculation. Use this when automatic recalculation slows down editing too much. -@item +@item @ Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}. All lines that should be recalculated should be marked with @samp{#} or @samp{*}. @@ -5050,7 +5050,7 @@ To create sparse trees and special lists with selection based on properties, the same commands are used as for tag searches (@pxref{Tag searches}). @table @kbd -@orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} +@orgcmdkkc{C-c / m,C-c @backslashchar{},org-match-sparse-tree} Create a sparse tree with all matching entries. With a @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. @orgcmd{C-c a m,org-tags-view} === modified file 'doc/misc/pcl-cvs.texi' --- doc/misc/pcl-cvs.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/pcl-cvs.texi 2013-01-05 21:18:01 +0000 @@ -31,9 +31,9 @@ @sp 4 @c The title is printed in a large font. @center @titlefont{User's Guide} -@sp +@sp 1 @center @titlefont{to} -@sp +@sp 1 @center @titlefont{PCL-CVS---The Emacs Front-End to CVS} @ignore @sp 2 @@ -682,7 +682,7 @@ These keys move the cursor one file forward, towards the end of the buffer (@code{cvs-mode-next-line}).@refill -@itemx p +@item p This key moves one file backward, towards the beginning of the buffer (@code{cvs-mode-previous-line}). @end table === modified file 'doc/misc/pgg.texi' --- doc/misc/pgg.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/pgg.texi 2013-01-05 16:19:53 +0000 @@ -2,11 +2,11 @@ @include gnus-overrides.texi +@set VERSION 0.1 + @setfilename ../../info/pgg @settitle PGG @value{VERSION} -@set VERSION 0.1 - @copying This file describes PGG @value{VERSION}, an Emacs interface to various PGP implementations. === modified file 'doc/misc/reftex.texi' --- doc/misc/reftex.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/reftex.texi 2013-01-05 21:18:01 +0000 @@ -4611,7 +4611,8 @@ @example nil @r{Never prompt for optional arguments} t @r{Always prompt} -maybe @r{Prompt only if @code{reftex-citation} was called with C-u prefix arg}@end example +maybe @r{Prompt only if @code{reftex-citation} was called with C-u prefix arg} +@end example Unnecessary empty optional arguments are removed before insertion into the buffer. See @code{reftex-cite-cleanup-optional-args}. @end defopt === modified file 'doc/misc/smtpmail.texi' --- doc/misc/smtpmail.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/smtpmail.texi 2013-01-05 16:19:53 +0000 @@ -24,9 +24,9 @@ @end direntry @titlepage -@title{Emacs SMTP Library} -@subtitle{An Emacs package for sending mail via SMTP} -@author{Simon Josefsson, Alex Schroeder} +@title Emacs SMTP Library +@subtitle An Emacs package for sending mail via SMTP +@author Simon Josefsson, Alex Schroeder @page @vskip 0pt plus 1filll @insertcopying === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/tramp.texi 2013-01-05 21:18:01 +0000 @@ -374,7 +374,7 @@ @value{tramp}, suitable for installation. But Emacs (22 or later) includes @value{tramp} already, and there is a @value{tramp} package for XEmacs, as well. So maybe it is easier to just use those. But if -you want the bleeding edge, read on@dots{...} +you want the bleeding edge, read on@dots{} For the especially brave, @value{tramp} is available from Git. The Git version is the latest version of the code and may contain incomplete @@ -515,8 +515,8 @@ * Connection caching:: Reusing connection related information. * Remote Programs:: How @value{tramp} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. +* Auto-save and Backup:: Auto-save and Backup. * Windows setup hints:: Issues with Cygwin ssh. -* Auto-save and Backup:: Auto-save and Backup. @end menu @@ -1899,7 +1899,7 @@ "passwort" "Passwort" ;; Fran@,{c}ais "mot de passe" "Mot de passe") t) - ".*:? *")) + ".*:\0? *")) @end lisp In parallel, it might also be necessary to adapt === modified file 'doc/misc/vip.texi' --- doc/misc/vip.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/vip.texi 2013-01-05 21:18:01 +0000 @@ -677,9 +677,9 @@ Suspend Emacs. @item Z Z Exit Emacs. -@itemx Q +@item Q Query replace. -@itemx R +@item R Replace. @end table @@ -944,11 +944,11 @@ @kindex 002 @kbd{C-b} (@code{vip-scroll-back}) Scroll text of current window downward almost full screen. You can go @i{backward} in the buffer by this command (@code{vip-scroll-back}). -@itemx C-d +@item C-d @kindex 004 @kbd{C-d} (@code{vip-scroll-up}) Scroll text of current window upward half screen. You can go @i{down} in the buffer by this command (@code{vip-scroll-down}). -@itemx C-u +@item C-u @kindex 025 @kbd{C-u} (@code{vip-scroll-down}) Scroll text of current window downward half screen. You can go @i{up} in the buffer by this command (@code{vip-scroll-up}). === modified file 'doc/misc/viper.texi' --- doc/misc/viper.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/viper.texi 2013-01-05 21:18:01 +0000 @@ -3465,7 +3465,7 @@ Exchange point and mark and go to the first CHAR on line. @item ' Go to specified Viper mark. -@item +@item ` Go to specified Viper mark and go to the first CHAR on line. @end table @kindex @kbd{m} === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-04 19:22:37 +0000 +++ src/ChangeLog 2013-01-05 21:18:01 +0000 @@ -1,3 +1,12 @@ +2013-01-05 Eli Zaretskii + + * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead + of a non-portable "t" to print ptrdiff_t values. Allow up to 9 + digits for buffer positions, before misalignment starts. Display + "0" for integer "object" field. + (dump_glyph_row): Adapt the header line to changes in dump_glyph. + Display the newline glyph more unambiguously. + 2013-01-04 YAMAMOTO Mitsuharu * nsterm.m (ns_draw_underwave): === modified file 'src/xdisp.c' --- src/xdisp.c 2013-01-02 16:13:04 +0000 +++ src/xdisp.c 2013-01-05 21:18:01 +0000 @@ -17925,18 +17925,23 @@ void dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) { - if (glyph->type == CHAR_GLYPH) + if (glyph->type == CHAR_GLYPH + || glyph->type == GLYPHLESS_GLYPH) { fprintf (stderr, - " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", + " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", glyph - row->glyphs[TEXT_AREA], - 'C', + (glyph->type == CHAR_GLYPH + ? 'C' + : 'G'), glyph->charpos, (BUFFERP (glyph->object) ? 'B' : (STRINGP (glyph->object) ? 'S' - : '-')), + : (INTEGERP (glyph->object) + ? '0' + : '-'))), glyph->pixel_width, glyph->u.ch, (glyph->u.ch < 0x80 && glyph->u.ch >= ' ' @@ -17949,7 +17954,7 @@ else if (glyph->type == STRETCH_GLYPH) { fprintf (stderr, - " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", + " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", glyph - row->glyphs[TEXT_AREA], 'S', glyph->charpos, @@ -17957,10 +17962,12 @@ ? 'B' : (STRINGP (glyph->object) ? 'S' - : '-')), + : (INTEGERP (glyph->object) + ? '0' + : '-'))), glyph->pixel_width, 0, - '.', + ' ', glyph->face_id, glyph->left_box_line_p, glyph->right_box_line_p); @@ -17968,7 +17975,7 @@ else if (glyph->type == IMAGE_GLYPH) { fprintf (stderr, - " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", + " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", glyph - row->glyphs[TEXT_AREA], 'I', glyph->charpos, @@ -17976,7 +17983,9 @@ ? 'B' : (STRINGP (glyph->object) ? 'S' - : '-')), + : (INTEGERP (glyph->object) + ? '0' + : '-'))), glyph->pixel_width, glyph->u.img_id, '.', @@ -17987,7 +17996,7 @@ else if (glyph->type == COMPOSITE_GLYPH) { fprintf (stderr, - " %5td %4c %6"pI"d %c %3d 0x%05x", + " %5"pD"d %c %9"pI"d %c %3d 0x%06x", glyph - row->glyphs[TEXT_AREA], '+', glyph->charpos, @@ -17995,7 +18004,9 @@ ? 'B' : (STRINGP (glyph->object) ? 'S' - : '-')), + : (INTEGERP (glyph->object) + ? '0' + : '-'))), glyph->pixel_width, glyph->u.cmp.id); if (glyph->u.cmp.automatic) @@ -18020,10 +18031,10 @@ { if (glyphs != 1) { - fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n"); - fprintf (stderr, "======================================================================\n"); + fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n"); + fprintf (stderr, "==============================================================================\n"); - fprintf (stderr, "%3d %5"pI"d %5"pI"d %4d %1.1d%1.1d%1.1d%1.1d\ + fprintf (stderr, "%3d %9"pI"d %9"pI"d %4d %1.1d%1.1d%1.1d%1.1d\ %1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n", vpos, MATRIX_ROW_START_CHARPOS (row), @@ -18048,13 +18059,14 @@ row->visible_height, row->ascent, row->phys_ascent); - fprintf (stderr, "%9"pD"d %5"pD"d\t%5d\n", row->start.overlay_string_index, + /* The next 3 lines should align to "Start" in the header. */ + fprintf (stderr, " %9"pD"d %9"pD"d\t%5d\n", row->start.overlay_string_index, row->end.overlay_string_index, row->continuation_lines_width); - fprintf (stderr, "%9"pI"d %5"pI"d\n", + fprintf (stderr, " %9"pI"d %9"pI"d\n", CHARPOS (row->start.string_pos), CHARPOS (row->end.string_pos)); - fprintf (stderr, "%9d %5d\n", row->start.dpvec_index, + fprintf (stderr, " %9d %9d\n", row->start.dpvec_index, row->end.dpvec_index); } @@ -18072,7 +18084,7 @@ ++glyph_end; if (glyph < glyph_end) - fprintf (stderr, " Glyph Type Pos O W Code C Face LR\n"); + fprintf (stderr, " Glyph# Type Pos O W Code C Face LR\n"); for (; glyph < glyph_end; ++glyph) dump_glyph (row, glyph, area); @@ -18084,15 +18096,24 @@ for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) { - char *s = alloca (row->used[area] + 1); + char *s = alloca (row->used[area] + 4); int i; for (i = 0; i < row->used[area]; ++i) { struct glyph *glyph = row->glyphs[area] + i; - if (glyph->type == CHAR_GLYPH - && glyph->u.ch < 0x80 - && glyph->u.ch >= ' ') + if (i == row->used[area] - 1 + && area == TEXT_AREA + && INTEGERP (glyph->object) + && glyph->type == CHAR_GLYPH + && glyph->u.ch == ' ') + { + strcpy (&s[i], "[\\n]"); + i += 4; + } + else if (glyph->type == CHAR_GLYPH + && glyph->u.ch < 0x80 + && glyph->u.ch >= ' ') s[i] = glyph->u.ch; else s[i] = '.'; ------------------------------------------------------------ revno: 111425 committer: Michael Albinus branch nick: trunk timestamp: Sat 2013-01-05 14:48:16 +0100 message: * net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls): (tramp-adb-handle-directory-files-and-attributes): Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-05 13:41:57 +0000 +++ lisp/ChangeLog 2013-01-05 13:48:16 +0000 @@ -1,3 +1,8 @@ +2013-01-05 Michael Albinus + + * net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls): + (tramp-adb-handle-directory-files-and-attributes): Fix typos. + 2013-01-05 Jürgen Hötzel * net/tramp-adb.el (tramp-adb-handle-file-attributes): More robust === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-05 13:41:57 +0000 +++ lisp/net/tramp-adb.el 2013-01-05 13:48:16 +0000 @@ -325,7 +325,7 @@ mod-string ;; fake t 1 - (tramp-get-device v)) + (tramp-get-device vec)) file-properties))) file-properties))) @@ -335,7 +335,7 @@ (when (file-directory-p directory) (with-parsed-tramp-file-name (expand-file-name directory) nil (with-tramp-file-property - v localname (format "directory-files-attributes-%s-%s-%s-s" + v localname (format "directory-files-attributes-%s-%s-%s-%s" full match id-format nosort) (tramp-adb-barf-unless-okay v (format "%s -a -l %s" @@ -343,13 +343,17 @@ (tramp-shell-quote-argument localname)) "") (with-current-buffer (tramp-get-buffer v) (tramp-adb-sh-fix-ls-output) - (let ((result (tramp-do-parse-file-attributes-with-ls v (or id-format 'integer)))) + (let ((result (tramp-do-parse-file-attributes-with-ls + v (or id-format 'integer)))) (when full - (setq result (mapcar - (lambda (x) (cons (expand-file-name (car x) directory) (cdr x))) - result))) + (setq result + (mapcar + (lambda (x) + (cons (expand-file-name (car x) directory) (cdr x))) + result))) (unless nosort - (setq result (sort result (lambda (x y) (string< (car x) (car y)))))) + (setq result + (sort result (lambda (x y) (string< (car x) (car y)))))) (delq nil (mapcar (lambda (x) (if (or (not match) (string-match match (car x))) ------------------------------------------------------------ revno: 111424 committer: Michael Albinus branch nick: trunk timestamp: Sat 2013-01-05 14:41:57 +0100 message: * net/tramp-adb.el (tramp-adb-handle-file-attributes): More robust parsing of ls output using regular expression (handle filenames with spaces). Use virtual device number. (tramp-do-parse-file-attributes-with-ls): New defun (Code cleanup). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-04 22:54:08 +0000 +++ lisp/ChangeLog 2013-01-05 13:41:57 +0000 @@ -1,3 +1,11 @@ +2013-01-05 Jürgen Hötzel + + * net/tramp-adb.el (tramp-adb-handle-file-attributes): More robust + parsing of ls output using regular expression (handle filenames + with spaces). Use virtual device number. + (tramp-do-parse-file-attributes-with-ls): New defun (Code + cleanup). + 2013-01-04 Daiki Ueno * epg.el: Silence byte-compiler warnings. === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-02 16:30:50 +0000 +++ lisp/net/tramp-adb.el 2013-01-05 13:41:57 +0000 @@ -56,6 +56,15 @@ (defconst tramp-adb-ls-date-regexp "[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]") +(defconst tramp-adb-ls-toolbox-regexp + (concat + "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions + "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username + "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group + "[[:space:]]+\\([[:digit:]]\\)" ; \4 size + "[[:space:]]+\\([-[:digit:]]+[[:space:]][:[:digit:]]+\\)" ; \5 date + "[[:space:]]+\\(.*\\)$")) ; \6 filename + ;;;###tramp-autoload (add-to-list 'tramp-methods `(,tramp-adb-method)) @@ -95,6 +104,9 @@ (expand-file-name . tramp-adb-handle-expand-file-name) (find-backup-file-name . tramp-handle-find-backup-file-name) (directory-files . tramp-handle-directory-files) + (directory-files-and-attributes + . tramp-adb-handle-directory-files-and-attributes) + (file-name-all-completions . tramp-sh-handle-file-name-all-completions) (make-directory . tramp-adb-handle-make-directory) (delete-directory . tramp-adb-handle-delete-directory) (delete-file . tramp-adb-handle-delete-file) @@ -280,30 +292,69 @@ (tramp-shell-quote-argument localname)) "") (with-current-buffer (tramp-get-buffer v) (tramp-adb-sh-fix-ls-output) - (let* ((columns (split-string (buffer-string))) - (mod-string (nth 0 columns)) - (is-dir (eq ?d (aref mod-string 0))) - (is-symlink (eq ?l (aref mod-string 0))) - (symlink-target - (and is-symlink - (cadr (split-string (buffer-string) "\\( -> \\|\n\\)")))) - (uid (nth 1 columns)) - (gid (nth 2 columns)) - (date (format "%s %s" (nth 4 columns) (nth 5 columns))) - (size (string-to-number (nth 3 columns)))) - (list - (or is-dir symlink-target) - 1 ;link-count - ;; no way to handle numeric ids in Androids ash - (if (eq id-format 'integer) 0 uid) - (if (eq id-format 'integer) 0 gid) - '(0 0) ; atime - (date-to-time date) ; mtime - '(0 0) ; ctime - size - mod-string - ;; fake - t 1 1))))))) + (cdar (tramp-do-parse-file-attributes-with-ls v id-format))))))) + +(defun tramp-do-parse-file-attributes-with-ls (vec &optional id-format) + "Parse `file-attributes' for Tramp files using the ls(1) command." + (with-current-buffer (tramp-get-buffer vec) + (goto-char (point-min)) + (let ((file-properties nil)) + (while (re-search-forward tramp-adb-ls-toolbox-regexp nil t) + (let* ((mod-string (match-string 1)) + (is-dir (eq ?d (aref mod-string 0))) + (is-symlink (eq ?l (aref mod-string 0))) + (uid (match-string 2)) + (gid (match-string 3)) + (size (string-to-number (match-string 4))) + (date (match-string 5)) + (name (match-string 6)) + (symlink-target + (and is-symlink + (cadr (split-string name "\\( -> \\|\n\\)"))))) + (push (list + name + (or is-dir symlink-target) + 1 ;link-count + ;; no way to handle numeric ids in Androids ash + (if (eq id-format 'integer) 0 uid) + (if (eq id-format 'integer) 0 gid) + '(0 0) ; atime + (date-to-time date) ; mtime + '(0 0) ; ctime + size + mod-string + ;; fake + t 1 + (tramp-get-device v)) + file-properties))) + file-properties))) + +(defun tramp-adb-handle-directory-files-and-attributes + (directory &optional full match nosort id-format) + "Like `directory-files-and-attributes' for Tramp files." + (when (file-directory-p directory) + (with-parsed-tramp-file-name (expand-file-name directory) nil + (with-tramp-file-property + v localname (format "directory-files-attributes-%s-%s-%s-s" + full match id-format nosort) + (tramp-adb-barf-unless-okay + v (format "%s -a -l %s" + (tramp-adb-get-ls-command v) + (tramp-shell-quote-argument localname)) "") + (with-current-buffer (tramp-get-buffer v) + (tramp-adb-sh-fix-ls-output) + (let ((result (tramp-do-parse-file-attributes-with-ls v (or id-format 'integer)))) + (when full + (setq result (mapcar + (lambda (x) (cons (expand-file-name (car x) directory) (cdr x))) + result))) + (unless nosort + (setq result (sort result (lambda (x y) (string< (car x) (car y)))))) + (delq nil + (mapcar (lambda (x) + (if (or (not match) (string-match match (car x))) + x)) + result)))))))) (defun tramp-adb-get-ls-command (vec) (with-tramp-connection-property vec "ls" ------------------------------------------------------------ revno: 111423 committer: Daiki Ueno branch nick: trunk timestamp: Sat 2013-01-05 07:54:08 +0900 message: * epg.el: Silence byte-compiler warnings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-04 22:51:52 +0000 +++ lisp/ChangeLog 2013-01-04 22:54:08 +0000 @@ -1,5 +1,11 @@ 2013-01-04 Daiki Ueno + * epg.el: Silence byte-compiler warnings. + (epg--start): Use delete-char instead of delete-backward-char. + (epg-wait-for-completion): Pass FRAME arg to redraw-frame. + +2013-01-04 Daiki Ueno + * epg.el (epg--start): Don't call "tty" program on W32 platforms. Suggested by Eli Zaretskii . === modified file 'lisp/epg.el' --- lisp/epg.el 2013-01-04 22:51:52 +0000 +++ lisp/epg.el 2013-01-04 22:54:08 +0000 @@ -1170,7 +1170,7 @@ (with-temp-buffer (condition-case nil (when (= (call-process "tty" "/dev/fd/0" t) 0) - (delete-backward-char 1) + (delete-char -1) (setq terminal-name (buffer-string))) (file-error)))) (when terminal-name @@ -1300,7 +1300,7 @@ (> (float-time (or (nth 5 (file-attributes epg-agent-file)) '(0 0 0 0))) (float-time epg-agent-mtime)))) - (redraw-frame)) + (redraw-frame (selected-frame))) (epg-context-set-result-for context 'error (nreverse (epg-context-result-for context 'error)))) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.