Now on revision 106736. ------------------------------------------------------------ revno: 106736 committer: Bill Wohler branch nick: trunk timestamp: Mon 2011-12-26 20:56:26 -0800 message: Update release notes to reflect a fixed, reported bug. diff: === modified file 'etc/MH-E-NEWS' --- etc/MH-E-NEWS 2011-11-25 07:14:48 +0000 +++ etc/MH-E-NEWS 2011-12-27 04:56:26 +0000 @@ -39,6 +39,11 @@ The `mh-showing-mode' variable is now defined with `define-minor-mode' (closes SF #482666). +*** Desktop fails to restore MH-Folder buffers + +When restoring MH folders from ".emacs.desktop", Emacs now opens them in +the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145) + * Changes in MH-E 8.2 === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2011-11-25 07:14:48 +0000 +++ lisp/mh-e/ChangeLog 2011-12-27 04:56:26 +0000 @@ -122,7 +122,7 @@ * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-folder.el: Use boundp instead of fboundp when testing - existence of desktop-buffer-mode-handlers. + existence of desktop-buffer-mode-handlers (closes SF #1510145). 2011-05-10 Jim Meyering ------------------------------------------------------------ revno: 106735 fixes bug(s): http://debbugs.gnu.org/10361 committer: Jan D. branch nick: trunk timestamp: Mon 2011-12-26 19:00:38 +0100 message: * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus can scroll. (create_and_show_popup_menu): Always use menu_position_func for Gtk3. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-12-25 09:06:42 +0000 +++ src/ChangeLog 2011-12-26 18:00:38 +0000 @@ -1,3 +1,10 @@ +2011-12-26 Jan Djärv + + * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus + can scroll. + (create_and_show_popup_menu): Always use menu_position_func for + Gtk3 (Bug#10361). + 2011-12-24 Andreas Schwab * callint.c (Fcall_interactively): Don't truncate prompt string. === modified file 'src/xmenu.c' --- src/xmenu.c 2011-11-19 09:18:31 +0000 +++ src/xmenu.c 2011-12-26 18:00:38 +0000 @@ -102,6 +102,9 @@ #ifdef USE_GTK #include "gtkutil.h" +#ifdef HAVE_GTK3 +#include "xgselect.h" +#endif #endif #include "menu.h" @@ -408,7 +411,15 @@ else ntp = &next_time; +#ifdef HAVE_GTK3 + /* Gtk3 have arrows on menus when they don't fit. When the pointer is + over an arrow, a timeout scrolls it a bit. Use xg_select so that + timeout gets triggered. */ + + xg_select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp); +#else select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp); +#endif } } #endif /* ! MSDOS */ @@ -1435,6 +1446,13 @@ GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */ struct next_popup_x_y popup_x_y; int specpdl_count = SPECPDL_INDEX (); + int use_pos_func = ! for_click; + +#ifdef HAVE_GTK3 + /* Always use position function for Gtk3. Otherwise menus may become + too small to show anything. */ + use_pos_func = 1; +#endif if (! FRAME_X_P (f)) abort (); @@ -1446,7 +1464,7 @@ G_CALLBACK (menu_highlight_callback)); xg_crazy_callback_abort = 0; - if (! for_click) + if (use_pos_func) { /* Not invoked by a click. pop up at x/y. */ pos_func = menu_position_func; @@ -1461,7 +1479,8 @@ i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */ } - else + + if (for_click) { for (i = 0; i < 5; i++) if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) ------------------------------------------------------------ revno: 106734 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-12-26 18:36:41 +0800 message: Update Abbrevs and Dired chapters of Emacs manual. * dired.texi (Dired Enter, Misc Dired Features): Document dired-use-ls-dired changes. Mention quit-window. (Dired Navigation): Add index entries. (Dired Visiting): Fix View Mode xref. (Marks vs Flags): Prefer C-/ binding for undo. (Subdirectories in Dired): Add xrefs. (Misc Dired Features): Document some Emacs 24 changes. Add index entries. * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode variable, since it is explained in Minor Modes node. (Defining Abbrevs): Copyedits. (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the C-/ binding for undo. (Dabbrev Customization): Add xrefs for case-fold-search and case-replace. * dired-xtra.texi (Subdir Switches): Add xref. * maintaining.texi (VC Directory Commands): Mention quit-window. diff: === modified file 'admin/FOR-RELEASE' --- admin/FOR-RELEASE 2011-12-25 14:16:00 +0000 +++ admin/FOR-RELEASE 2011-12-26 10:36:41 +0000 @@ -124,7 +124,7 @@ ** Check the manual. -abbrevs.texi +abbrevs.texi cyd ack.texi anti.texi arevert-xtra.texi cyd @@ -136,7 +136,7 @@ cmdargs.texi commands.texi cyd custom.texi -dired.texi +dired.texi cyd dired-xtra.texi display.texi cyd emacs.texi === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-12-25 14:16:00 +0000 +++ doc/emacs/ChangeLog 2011-12-26 10:36:41 +0000 @@ -1,3 +1,26 @@ +2011-12-26 Chong Yidong + + * dired.texi (Dired Enter, Misc Dired Features): Document + dired-use-ls-dired changes. Mention quit-window. + (Dired Navigation): Add index entries. + (Dired Visiting): Fix View Mode xref. + (Marks vs Flags): Prefer C-/ binding for undo. + (Subdirectories in Dired): Add xrefs. + (Misc Dired Features): Document some Emacs 24 changes. Add index + entries. + + * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode + variable, since it is explained in Minor Modes node. + (Defining Abbrevs): Copyedits. + (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the + C-/ binding for undo. + (Dabbrev Customization): Add xrefs for case-fold-search and + case-replace. + + * dired-xtra.texi (Subdir Switches): Add xref. + + * maintaining.texi (VC Directory Commands): Mention quit-window. + 2011-12-25 Chong Yidong * maintaining.texi (Tags): Mention Semantic. === modified file 'doc/emacs/abbrevs.texi' --- doc/emacs/abbrevs.texi 2011-10-25 07:25:45 +0000 +++ doc/emacs/abbrevs.texi 2011-12-26 10:36:41 +0000 @@ -45,17 +45,14 @@ outer otter.} into the buffer by typing @kbd{f o o .}. @findex abbrev-mode -@vindex abbrev-mode @cindex Abbrev mode @cindex mode, Abbrev - Abbrevs expand only when Abbrev mode (a minor mode) is enabled. -Disabling Abbrev mode does not cause abbrev definitions to be forgotten, -but they do not expand until Abbrev mode is enabled again. The command -@kbd{M-x abbrev-mode} toggles Abbrev mode; with a numeric argument, it -turns Abbrev mode on if the argument is positive, off otherwise. -@xref{Minor Modes}. @code{abbrev-mode} is also a variable; Abbrev mode is -on when the variable is non-@code{nil}. The variable @code{abbrev-mode} -automatically becomes local to the current buffer when it is set. + Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is +enabled. Disabling Abbrev mode does not cause abbrev definitions to +be forgotten, but they do not expand until Abbrev mode is enabled +again. The command @kbd{M-x abbrev-mode} toggles Abbrev mode; with a +numeric argument, it turns Abbrev mode on if the argument is positive, +off otherwise. @xref{Minor Modes}. Abbrevs can have @dfn{mode-specific} definitions, active only in one major mode. Abbrevs can also have @dfn{global} definitions that are active in @@ -108,22 +105,18 @@ @kindex C-x a l @findex add-mode-abbrev The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but -defines a mode-specific abbrev. Mode-specific abbrevs are active only in a -particular major mode. @kbd{C-x a l} defines an abbrev for the major mode -in effect at the time @kbd{C-x a l} is typed. The arguments work the same -as for @kbd{C-x a g}. +defines a mode-specific abbrev for the current major mode. The +arguments work the same as for @kbd{C-x a g}. @kindex C-x a i g @findex inverse-add-global-abbrev @kindex C-x a i l @findex inverse-add-mode-abbrev - If the abbrev text itself is already in the buffer, you can use the -commands @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and -@kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) to define it as an -abbrev by specify the expansion in the minibuffer. These commands are -called ``inverse'' because they invert the meaning of the two text -strings they use (one from the buffer and one read with the -minibuffer). + @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and @kbd{C-x a i +l} (@code{inverse-add-mode-abbrev}) perform the opposite task: if the +abbrev text is already in the buffer, you use these commands to define +an abbrev by specifying the expansion in the minibuffer. These +commands will expand the abbrev text used for the definition. @findex define-mode-abbrev @findex define-global-abbrev @@ -132,8 +125,8 @@ It reads two arguments---the abbrev, and its expansion. The command @code{define-mode-abbrev} does likewise for a mode-specific abbrev. - To change the definition of an abbrev, just define a new definition. -When the abbrev has a prior definition, the abbrev definition commands + To change the definition of an abbrev, just make a new definition. +When an abbrev has a prior definition, the abbrev definition commands ask for confirmation before replacing it. @findex kill-all-abbrevs @@ -155,11 +148,11 @@ punctuation or whitespace character to expand it. @vindex abbrev-all-caps - Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find -outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into -@samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the -variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies -@samp{FIND OUTER OTTER}). + Abbrev expansion preserves case: @samp{foo} expands to @samp{find +outer otter}, and @samp{Foo} to @samp{Find outer otter}. @samp{FOO} +expands to @samp{Find Outer Otter} by default, but if you change the +variable @code{abbrev-all-caps} to a non-@code{nil} value, it expands +to @samp{FIND OUTER OTTER}. These commands are used to control abbrev expansion: @@ -196,14 +189,14 @@ the buffer, not expanding it. @findex unexpand-abbrev - If you expand an abbrev by mistake, you can undo the expansion and -bring back the abbrev itself by typing @kbd{C-_} to undo (@pxref{Undo}). -This also undoes the insertion of the non-word character that expanded -the abbrev. If the result you want is the terminating non-word -character plus the unexpanded abbrev, you must reinsert the terminating -character, quoting it with @kbd{C-q}. You can also use the command -@kbd{M-x unexpand-abbrev} to cancel the last expansion without -deleting the terminating character. + If you expand an abbrev by mistake, you can undo the expansion by +typing @kbd{C-/} (@code{undo}). @xref{Undo}. This undoes the +insertion of the abbrev expansion and brings back the abbrev text. If +the result you want is the terminating non-word character plus the +unexpanded abbrev, you must reinsert the terminating character, +quoting it with @kbd{C-q}. You can also use the command @kbd{M-x +unexpand-abbrev} to cancel the last expansion without deleting the +terminating character. @findex expand-region-abbrevs @kbd{M-x expand-region-abbrevs} searches through the region for defined @@ -409,12 +402,11 @@ @vindex dabbrev-case-fold-search This feature is controlled by the variable -@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored in -this search; if it is @code{nil}, the word and the expansion must match -in case. If the value of @code{dabbrev-case-fold-search} is -@code{case-fold-search}, which is true by default, then the variable -@code{case-fold-search} controls whether to ignore case while searching -for expansions. +@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored +in this search; if it is @code{nil}, the word and the expansion must +match in case. If the value is @code{case-fold-search} (the default), +then the variable @code{case-fold-search} controls whether to ignore +case while searching for expansions (@pxref{Search Case}). @vindex dabbrev-case-replace Normally, dynamic abbrev expansion preserves the case pattern @@ -425,10 +417,10 @@ The variable @code{dabbrev-case-replace} controls whether to preserve the case pattern of the dynamic abbrev. If it is @code{t}, the dynamic abbrev's case pattern is preserved in most cases; if it is -@code{nil}, the expansion is always copied verbatim. If the value of -@code{dabbrev-case-replace} is @code{case-replace}, which is true by -default, then the variable @code{case-replace} controls whether to -copy the expansion verbatim. +@code{nil}, the expansion is always copied verbatim. If the value is +@code{case-replace} (the default), then the variable +@code{case-replace} controls whether to copy the expansion verbatim +(@pxref{Replacement and Case}). However, if the expansion contains a complex mixed case pattern, and the dynamic abbrev matches this pattern as far as it goes, then the === modified file 'doc/emacs/dired-xtra.texi' --- doc/emacs/dired-xtra.texi 2011-01-26 08:36:39 +0000 +++ doc/emacs/dired-xtra.texi 2011-12-26 10:36:41 +0000 @@ -7,24 +7,24 @@ @node Subdir Switches @section Subdirectory Switches in Dired -You can insert subdirectories with specified @code{ls} switches in -Dired buffers using @kbd{C-u i}. You can change the @code{ls} +You can insert subdirectories with specified @command{ls} switches in +Dired buffers using @kbd{C-u i}. You can change the @command{ls} switches of an already inserted subdirectory using @kbd{C-u l}. Dired preserves the switches if you revert the buffer. Deleting a subdirectory forgets about its switches. -Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) -to reinsert or delete subdirectories that were inserted with explicit -switches can bypass Dired's machinery for remembering (or forgetting) -switches. Deleting a subdirectory using @code{dired-undo} does not -forget its switches. When later reinserted using @kbd{i}, it will be -reinserted using its old switches. Using @code{dired-undo} to -reinsert a subdirectory that was deleted using the regular -Dired commands (not @code{dired-undo}) will originally insert it with -its old switches. Reverting the buffer, however, will relist it using -the buffer's default switches. If any of this yields problems, you -can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. +Using @code{dired-undo} (@pxref{Marks vs Flags}) to reinsert or delete +subdirectories that were inserted with explicit switches can bypass +Dired's machinery for remembering (or forgetting) switches. Deleting +a subdirectory using @code{dired-undo} does not forget its switches. +When later reinserted using @kbd{i}, it will be reinserted using its +old switches. Using @code{dired-undo} to reinsert a subdirectory that +was deleted using the regular Dired commands (not @code{dired-undo}) +will originally insert it with its old switches. Reverting the +buffer, however, will relist it using the buffer's default switches. +If any of this yields problems, you can easily correct the situation +using @kbd{C-u i} or @kbd{C-u l}. Dired does not remember the @code{R} switch. Inserting a subdirectory with switches that include the @code{R} switch is equivalent to === modified file 'doc/emacs/dired.texi' --- doc/emacs/dired.texi 2011-10-13 16:03:49 +0000 +++ doc/emacs/dired.texi 2011-12-26 10:36:41 +0000 @@ -73,32 +73,45 @@ a directory name. The variable @code{dired-listing-switches} specifies the options to -give to @code{ls} for listing the directory; this string @emph{must} -contain @samp{-l}. If you use a prefix argument with the @code{dired} -command, you can specify the @code{ls} switches with the minibuffer -before you enter the directory specification. No matter how they are -specified, the @code{ls} switches can include short options (that is, -single characters) requiring no arguments, and long options (starting -with @samp{--}) whose arguments are specified with @samp{=}. +give to @command{ls} for listing the directory; this string +@emph{must} contain @samp{-l}. If you use a prefix argument with the +@code{dired} command, you can specify the @command{ls} switches with the +minibuffer before you enter the directory specification. No matter +how they are specified, the @command{ls} switches can include short +options (that is, single characters) requiring no arguments, and long +options (starting with @samp{--}) whose arguments are specified with +@samp{=}. @vindex dired-use-ls-dired - Note that Dired automatically adds the option @samp{--dired}, if -your @code{ls} program supports it, unless you explicitly set -the variable @code{dired-use-ls-dired} to @code{nil}. Without this -option, Dired will have trouble parsing some @samp{unusual} file-names. -See the documentation of @code{dired-use-ls-dired} for more details. + If your @command{ls} program supports the @samp{--dired} option, +Dired automatically passes it that option; this causes @command{ls} to +emit special escape sequences for certain unusual file names, without +which Dired will not be able to parse those names. The first time you +run Dired in an Emacs session, it checks whether @command{ls} supports +the @samp{--dired} option by calling it once with that option. If the +exit code is 0, Dired will subsequently use the @samp{--dired} option; +otherwise it will not. You can inhibit this check by customizing the +variable @code{dired-use-ls-dired}. The value @code{unspecified} (the +default) means to perform the check; any other non-@code{nil} value +means to use the @samp{--dired} option; and @code{nil} means not to +use the @samp{--dired} option. - On MS-Windows and MS-DOS systems, Emacs @emph{emulates} @code{ls}; -see @ref{ls in Lisp}, for options and peculiarities of that emulation. + On MS-Windows and MS-DOS systems, Emacs emulates @command{ls}. +@xref{ls in Lisp}, for options and peculiarities of this emulation. @findex dired-other-window @kindex C-x 4 d @findex dired-other-frame @kindex C-x 5 d - To display the Dired buffer in another window rather than in the -selected window, use @kbd{C-x 4 d} (@code{dired-other-window}) instead -of @kbd{C-x d}. @kbd{C-x 5 d} (@code{dired-other-frame}) uses a -separate frame to display the Dired buffer. + To display the Dired buffer in another window, use @kbd{C-x 4 d} +(@code{dired-other-window}) instead of @kbd{C-x d}. @kbd{C-x 5 d} +(@code{dired-other-frame}) displays the Dired buffer in a separate +frame. + +@kindex q @r{(Dired)} +@findex quit-window + Typing @kbd{q} (@code{quit-window}) buries the Dired buffer, and +deletes its window if the window was created just for that buffer. @node Dired Navigation @section Navigation in the Dired Buffer @@ -124,7 +137,11 @@ that file. @cindex searching Dired buffers +@findex dired-isearch-filenames @vindex dired-isearch-filenames +@findex dired-isearch-filenames-regexp +@kindex M-s f C-s @r{(Dired)} +@kindex M-s f M-C-s @r{(Dired)} @kbd{M-s f C-s} (@code{dired-isearch-filenames}) performs a forward incremental search in the Dired buffer, looking for matches only amongst the file names and ignoring the rest of the text in the @@ -331,18 +348,16 @@ @item Mouse-1 @itemx Mouse-2 @findex dired-mouse-find-file-other-window -Visit the file named by the line you click on +Visit the file whose name you clicked on (@code{dired-mouse-find-file-other-window}). This uses another window to display the file, like the @kbd{o} command. @item v @kindex v @r{(Dired)} @findex dired-view-file -View the file described on the current line, using @kbd{M-x view-file} -(@code{dired-view-file}). Viewing a file with @code{view-file} is -like visiting it, but is slanted toward moving around in the file -conveniently and does not allow changing the file. @xref{Misc File -Ops, View File, Miscellaneous File Operations}. +View the file described on the current line, with View mode +(@code{dired-view-file}). View mode provides convenient commands to +navigate the buffer but forbids changing it; @xref{View Mode}. @item ^ @kindex ^ @r{(Dired)} @@ -520,9 +535,9 @@ @kbd{% m}, except that it searches the file contents instead of the file name. -@item C-x u +@item C-/ +@itemx C-x u @itemx C-_ -@itemx C-/ @kindex C-_ @r{(Dired)} @findex dired-undo Undo changes in the Dired buffer, such as adding or removing @@ -615,7 +630,7 @@ Rename the specified files (@code{dired-do-rename}). If you rename a single file, the argument @var{new} is the new name of the file. If you rename several files, the argument @var{new} is the directory into -which to move the files (this is like the shell command @code{mv}). +which to move the files (this is like the shell command @command{mv}). Dired automatically changes the visited file name of buffers associated with renamed files so that they refer to the new names. @@ -625,7 +640,7 @@ @cindex hard links (in Dired) @item H @var{new} @key{RET} Make hard links to the specified files (@code{dired-do-hardlink}). -This is like the shell command @code{ln}. The argument @var{new} is +This is like the shell command @command{ln}. The argument @var{new} is the directory to make the links in, or (if making just one link) the name to give the link. @@ -642,9 +657,10 @@ @kindex M @r{(Dired)} @cindex changing file permissions (in Dired) @item M @var{modespec} @key{RET} -Change the mode (also called ``permission bits'') of the specified files -(@code{dired-do-chmod}). @var{modespec} can be in octal or symbolic -notation like arguments handled by the @code{chmod} program. +Change the mode (also called @dfn{permission bits}) of the specified +files (@code{dired-do-chmod}). @var{modespec} can be in octal or +symbolic notation, like arguments handled by the @command{chmod} +program. @findex dired-do-chgrp @kindex G @r{(Dired)} @@ -663,8 +679,8 @@ @vindex dired-chown-program The variable @code{dired-chown-program} specifies the name of the -program to use to do the work (different systems put @code{chown} in -different places). +program to use to do the work (different systems put @command{chown} +in different places). @findex dired-do-touch @kindex T @r{(Dired)} @@ -952,17 +968,17 @@ @cindex subdirectories in Dired @cindex expanding subdirectories in Dired - A Dired buffer displays just one directory in the normal case; -but you can optionally include its subdirectories as well. + A Dired buffer usually displays just one directory, but you can +optionally include its subdirectories as well. The simplest way to include multiple directories in one Dired buffer is -to specify the options @samp{-lR} for running @code{ls}. (If you give a +to specify the options @samp{-lR} for running @command{ls}. (If you give a numeric argument when you run Dired, then you can specify these options in the minibuffer.) That produces a recursive directory listing showing all subdirectories at all levels. More often, you will want to show only specific subdirectories. You -can do this with the @kbd{i} command: +can do this with @kbd{i} (@code{dired-maybe-insert-subdir}): @table @kbd @findex dired-maybe-insert-subdir @@ -973,25 +989,27 @@ Insert the contents of a subdirectory later in the buffer. @end table -Use the @kbd{i} (@code{dired-maybe-insert-subdir}) command on a line -that describes a file which is a directory. It inserts the contents of -that directory into the same Dired buffer, and moves there. Inserted -subdirectory contents follow the top-level directory of the Dired -buffer, just as they do in @samp{ls -lR} output. - -If the subdirectory's contents are already present in the buffer, the -@kbd{i} command just moves to it. - -In either case, @kbd{i} sets the Emacs mark before moving, so @kbd{C-u -C-@key{SPC}} takes you back to the old position in the buffer (the line -describing that subdirectory). You can also use @samp{^} to return -to the parent directory in the same Dired buffer. - -Use the @kbd{l} command (@code{dired-do-redisplay}) to update the -subdirectory's contents. Use @kbd{C-u k} on the subdirectory header -line to remove the subdirectory listing (@pxref{Dired Updating}). You -can also hide and show inserted subdirectories (@pxref{Hiding -Subdirectories}). +@noindent +If you use this command on a line that describes a file which is a +directory, it inserts the contents of that directory into the same +Dired buffer, and moves there. Inserted subdirectory contents follow +the top-level directory of the Dired buffer, just as they do in +@samp{ls -lR} output. + + If the subdirectory's contents are already present in the buffer, +the @kbd{i} command just moves to it. + + In either case, @kbd{i} sets the Emacs mark before moving, so +@kbd{C-u C-@key{SPC}} returns to your previous position in the Dired +buffer (@pxref{Setting Mark}). You can also use @samp{^} to return to +the parent directory in the same Dired buffer (@pxref{Dired +Visiting}). + + Use the @kbd{l} command (@code{dired-do-redisplay}) to update the +subdirectory's contents, and use @kbd{C-u k} on the subdirectory +header line to remove the subdirectory listing (@pxref{Dired +Updating}). You can also hide and show inserted subdirectories +(@pxref{Hiding Subdirectories}). @ifnottex @include dired-xtra.texi @@ -1209,10 +1227,10 @@ need to know how to use @command{find}. @vindex find-ls-option - The format of listing produced by these commands is controlled by the -variable @code{find-ls-option}, whose default value specifies using -options @samp{-ld} for @code{ls}. If your listings are corrupted, you -may need to change the value of this variable. + The format of listing produced by these commands is controlled by +the variable @code{find-ls-option}, whose default value specifies +using options @samp{-ld} for @command{ls}. If your listings are +corrupted, you may need to change the value of this variable. @findex locate @findex locate-with-filter @@ -1338,10 +1356,14 @@ @kindex + @r{(Dired)} @findex dired-create-directory The command @kbd{+} (@code{dired-create-directory}) reads a -directory name, and creates the directory if it does not already -exist. +directory name, and creates that directory. It signals an error if +the directory already exists. @cindex searching multiple files via Dired +@kindex M-s a C-s @r{(Dired)} +@kindex M-s a M-C-s @r{(Dired)} +@findex dired-do-isearch +@findex dired-do-isearch-regexp The command @kbd{M-s a C-s} (@code{dired-do-isearch}) begins a ``multi-file'' incremental search on the marked files. If a search fails at the end of a file, typing @kbd{C-s} advances to the next === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2011-12-25 14:16:00 +0000 +++ doc/emacs/maintaining.texi 2011-12-26 10:36:41 +0000 @@ -1183,6 +1183,12 @@ (@code{vc-dir-mark-all-files}). With a prefix argument, mark all listed files and directories. +@kindex q @r{(VC Directory)} +@findex quit-window +@item q +Bury the VC Directory buffer, and delete its window if the window was +created just for that buffer. + @item u Unmark the file or directory on the current line. If the region is active, unmark all the files in the region (@code{vc-dir-unmark}). === modified file 'etc/NEWS' --- etc/NEWS 2011-12-25 14:16:00 +0000 +++ etc/NEWS 2011-12-26 10:36:41 +0000 @@ -665,7 +665,7 @@ on a D-Bus without simultaneously registering a property or a method. ** Dired-x - +--- *** dired-jump and dired-jump-other-window called with a prefix argument read a file name from the minibuffer instead of using buffer-file-name. ------------------------------------------------------------ revno: 106733 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-12-25 22:16:00 +0800 message: More updates to Maintaining chapter of Emacs manual. * files.texi (Misc File Ops): Mention vc-delete-file. * maintaining.texi (Tags): Mention Semantic. (Create Tags Table, Etags Regexps): Copyedits. (Find Tag): Mention minibuffer completion. (List Tags): Mention completion-at-point. Completion is actually available in M-x list-tags. * programs.texi (Symbol Completion): Mention completion-at-point explicitly. * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC. Document vc-delete-file. diff: === modified file 'admin/FOR-RELEASE' --- admin/FOR-RELEASE 2011-12-19 07:25:46 +0000 +++ admin/FOR-RELEASE 2011-12-25 14:16:00 +0000 @@ -153,7 +153,7 @@ killing.texi cyd kmacro.texi cyd macos.texi -maintaining.texi +maintaining.texi cyd major.texi mark.texi cyd mini.texi @@ -172,8 +172,8 @@ sending.texi text.texi cyd trouble.texi -vc-xtra.texi -vc1-xtra.texi +vc-xtra.texi cyd +vc1-xtra.texi cyd windows.texi cyd xresources.texi === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-12-22 10:14:41 +0000 +++ doc/emacs/ChangeLog 2011-12-25 14:16:00 +0000 @@ -1,3 +1,19 @@ +2011-12-25 Chong Yidong + + * maintaining.texi (Tags): Mention Semantic. + (Create Tags Table, Etags Regexps): Copyedits. + (Find Tag): Mention minibuffer completion. + (List Tags): Mention completion-at-point. Completion is actually + available in M-x list-tags. + + * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC. + Document vc-delete-file. + + * files.texi (Misc File Ops): Mention vc-delete-file. + + * programs.texi (Symbol Completion): Mention completion-at-point + explicitly. + 2011-12-22 Chong Yidong * maintaining.texi (Change Log Commands): Don't specially mention === modified file 'doc/emacs/emacs.texi' --- doc/emacs/emacs.texi 2011-12-21 08:39:32 +0000 +++ doc/emacs/emacs.texi 2011-12-25 14:16:00 +0000 @@ -782,9 +782,8 @@ Miscellaneous Commands and Features of VC * Change Logs and VC:: Generating a change log file from log entries. -* Renaming and VC:: A command to rename both the source and master - file correctly. -* Revision Tags:: Symbolic names for revisions. +* VC Delete/Rename:: Deleting and renaming version-controlled files. +* Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. Customizing VC === modified file 'doc/emacs/files.texi' --- doc/emacs/files.texi 2011-12-21 08:39:32 +0000 +++ doc/emacs/files.texi 2011-12-25 14:16:00 +0000 @@ -1485,6 +1485,12 @@ them delete outright, instead of using the Trash, regardless of @code{delete-by-moving-to-trash}. +@ifnottex + If a file is under version control (@pxref{Version Control}), you +should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x +delete-file}. @xref{VC Delete/Rename}. +@end ifnottex + @findex copy-file @cindex copying files @kbd{M-x copy-file} reads the file @var{old} and writes a new file @@ -1514,10 +1520,9 @@ ask for confirmation when the new file name already exists, too. @ifnottex - Note that if a file is under version control (@pxref{Version -Control}), you normally ought to rename it via the version control -system instead, using @kbd{M-x vc-rename-file}. @xref{Renaming and -VC}. + If a file is under version control (@pxref{Version Control}), you +should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x +rename-file}. @xref{VC Delete/Rename}. @end ifnottex @findex add-name-to-file === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2011-12-22 10:14:41 +0000 +++ doc/emacs/maintaining.texi 2011-12-25 14:16:00 +0000 @@ -1188,7 +1188,7 @@ active, unmark all the files in the region (@code{vc-dir-unmark}). @item U -If point is on a file entry, umark all files with the same status; if +If point is on a file entry, unmark all files with the same status; if point is on a directory entry, unmark all files in that directory tree (@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all files and directories. @@ -1567,8 +1567,8 @@ @cindex tags and tag tables A @dfn{tag} is a reference to a subunit in a program or in a -document. In program source code, tags reference syntactic elements -of the program: functions, subroutines, data types, macros, etc. In a +document. In source code, tags reference syntactic elements of the +program: functions, subroutines, data types, macros, etc. In a document, tags reference chapters, sections, appendices, etc. Each tag specifies the name of the file where the corresponding subunit is defined, and the position of the subunit's definition in that file. @@ -1582,34 +1582,36 @@ C files; and Fortran files produced by preprocessing @file{.fpp} source files. - To produce a tags table, you use the @samp{etags} command, -submitting it a document or the source code of a program. -@samp{etags} writes the tags to a @dfn{tags table file}, or @dfn{tags -file} in short. The conventional name for a tags file is @file{TAGS}. +@cindex etags + To produce a tags table, you run the @command{etags} shell command +on a document or the source code file. The @samp{etags} program +writes the tags to a @dfn{tags table file}, or @dfn{tags file} in +short. The conventional name for a tags file is @file{TAGS}. +@xref{Create Tags Table}. - Emacs uses the information recorded in tags tables in commands that -search or replace through multiple source files: these commands use -the names of the source files recorded in the tags table to know which -files to search. Other commands, such as @kbd{M-.}, which finds the -definition of a function, use the recorded information about the -function names and positions to find the source file and the position -within that file where the function is defined. + Emacs provides many commands for searching and replacing using the +information recorded in tags tables. For instance, the @kbd{M-.} +(@code{find-tag}) jumps to the location of a specified function +definition in its source file. @xref{Find Tag}. @cindex C++ class browser, tags @cindex tags, C++ @cindex class browser, C++ @cindex Ebrowse - See also the Ebrowse facility, which is tailored for C++. -@xref{Top,, Ebrowse, ebrowse, Ebrowse User's Manual}. + The Ebrowse facility is similar to @command{etags} but specifically +tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's +Manual}. The Semantic package provides another way to generate and +use tags, separate from the @command{etags} facility. +@xref{Semantic}. @menu * Tag Syntax:: Tag syntax for various types of code and text files. -* Create Tags Table:: Creating a tags table with @code{etags}. +* Create Tags Table:: Creating a tags table with @command{etags}. * Etags Regexps:: Create arbitrary tags using regular expressions. * Select Tags Table:: How to visit a tags table. * Find Tag:: Commands to find the definition of a specific tag. * Tags Search:: Using a tags table for searching and replacing. -* List Tags:: Listing and finding tags defined in a file. +* List Tags:: Using tags for completion, and listing them. @end menu @node Tag Syntax @@ -1631,7 +1633,7 @@ You can tag function declarations and external variables in addition to function definitions by giving the @samp{--declarations} option to -@code{etags}. +@command{etags}. @item In C++ code, in addition to all the tag constructs of C code, member @@ -1648,15 +1650,15 @@ @samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. @item -In La@TeX{} text, the argument of any of the commands @code{\chapter}, +In La@TeX{} documents, the arguments for @code{\chapter}, @code{\section}, @code{\subsection}, @code{\subsubsection}, @code{\eqno}, @code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry}, @code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand}, -@code{\newenvironment} or @code{\renewenvironment} is a tag.@refill +@code{\newenvironment} and @code{\renewenvironment} are tags. Other commands can make tags as well, if you specify them in the -environment variable @env{TEXTAGS} before invoking @code{etags}. The +environment variable @env{TEXTAGS} before invoking @command{etags}. The value of this environment variable should be a colon-separated list of command names. For example, @@ -1788,9 +1790,9 @@ @node Create Tags Table @subsection Creating Tags Tables -@cindex @code{etags} program +@cindex @command{etags} program - The @code{etags} program is used to create a tags table file. It knows + The @command{etags} program is used to create a tags table file. It knows the syntax of several languages, as described in @iftex the previous section. @@ -1798,53 +1800,46 @@ @ifnottex @ref{Tag Syntax}. @end ifnottex -Here is how to run @code{etags}: +Here is how to run @command{etags}: @example etags @var{inputfiles}@dots{} @end example @noindent -The @code{etags} program reads the specified files, and writes a tags +The @command{etags} program reads the specified files, and writes a tags table named @file{TAGS} in the current working directory. You can optionally specify a different file name for the tags table by using the @samp{--output=@var{file}} option; specifying @file{-} as a file name prints the tags table to standard output. - If the specified files don't exist, @code{etags} looks for + If the specified files don't exist, @command{etags} looks for compressed versions of them and uncompresses them to read them. Under -MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz} +MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz} if it is given @samp{mycode.c} on the command line and @file{mycode.c} does not exist. - @code{etags} recognizes the language used in an input file based on -its file name and contents. You can specify the language with the -@samp{--language=@var{name}} option, described below. - - If the tags table data become outdated due to changes in the files -described in the table, the way to update the tags table is the same -way it was made in the first place. If the tags table fails to record -a tag, or records it for the wrong file, then Emacs cannot possibly -find its definition until you update the tags table. However, if the -position recorded in the tags table becomes a little bit wrong (due to -other editing), the worst consequence is a slight delay in finding the -tag. Even if the stored position is very far wrong, Emacs will still -find the tag, after searching most of the file for it. That delay is -hardly noticeable with today's computers. + If the tags table becomes outdated due to changes in the files +described in it, you can update it by running the @command{etags} +program again. If the tags table does not record a tag, or records it +for the wrong file, then Emacs will not be able to find that +definition until you update the tags table. But if the position +recorded in the tags table becomes a little bit wrong (due to other +editing), Emacs will still be able to find the right position, with a +slight delay. Thus, there is no need to update the tags table after each edit. You should update a tags table when you define new tags that you want to have listed, or when you move tag definitions from one file to another, or when changes become substantial. - One tags table can virtually include another. Specify the included -tags file name with the @samp{--include=@var{file}} option when -creating the file that is to include it. The latter file then acts as -if it covered all the source files specified in the included file, as -well as the files it directly contains. + You can make a tags table @dfn{include} another tags table, by +passing the @samp{--include=@var{file}} option to @command{etags}. It +then covers all the files covered by the included tags file, as well +as its own. If you specify the source files with relative file names when you run -@code{etags}, the tags file will contain file names relative to the +@command{etags}, the tags file will contain file names relative to the directory where the tags file was initially written. This way, you can move an entire directory tree containing both the tags file and the source files, and the tags file will still refer correctly to the source @@ -1857,40 +1852,41 @@ pointing to a tags file in a different directory, because this would generally render the file names invalid. - If you specify absolute file names as arguments to @code{etags}, then + If you specify absolute file names as arguments to @command{etags}, then the tags file will contain absolute file names. This way, the tags file will still refer to the same files even if you move it, as long as the source files remain in the same place. Absolute file names start with @samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows. - When you want to make a tags table from a great number of files, you -may have problems listing them on the command line, because some systems -have a limit on its length. The simplest way to circumvent this limit -is to tell @code{etags} to read the file names from its standard input, -by typing a dash in place of the file names, like this: + When you want to make a tags table from a great number of files, +you may have problems listing them on the command line, because some +systems have a limit on its length. You can circumvent this limit by +telling @command{etags} to read the file names from its standard +input, by typing a dash in place of the file names, like this: @smallexample find . -name "*.[chCH]" -print | etags - @end smallexample - Use the option @samp{--language=@var{name}} to specify the language -explicitly. You can intermix these options with file names; each one -applies to the file names that follow it. Specify -@samp{--language=auto} to tell @code{etags} to resume guessing the -language from the file names and file contents. Specify -@samp{--language=none} to turn off language-specific processing -entirely; then @code{etags} recognizes tags by regexp matching alone -(@pxref{Etags Regexps}). + @command{etags} recognizes the language used in an input file based +on its file name and contents. You can specify the language +explicitly with the @samp{--language=@var{name}} option. You can +intermix these options with file names; each one applies to the file +names that follow it. Specify @samp{--language=auto} to tell +@command{etags} to resume guessing the language from the file names +and file contents. Specify @samp{--language=none} to turn off +language-specific processing entirely; then @command{etags} recognizes +tags by regexp matching alone (@pxref{Etags Regexps}). The option @samp{--parse-stdin=@var{file}} is mostly useful when -calling @code{etags} from programs. It can be used (only once) in -place of a file name on the command line. @code{Etags} will read from +calling @command{etags} from programs. It can be used (only once) in +place of a file name on the command line. @command{etags} will read from standard input and mark the produced tags as belonging to the file @var{file}. - @samp{etags --help} outputs the list of the languages @code{etags} + @samp{etags --help} outputs the list of the languages @command{etags} knows, and the file name rules for guessing the language. It also prints -a list of all the available @code{etags} options, together with a short +a list of all the available @command{etags} options, together with a short explanation. If followed by one or more @samp{--language=@var{lang}} options, it outputs detailed information about how tags are generated for @var{lang}. @@ -1898,21 +1894,22 @@ @node Etags Regexps @subsection Etags Regexps - The @samp{--regex} option provides a general way of recognizing tags -based on regexp matching. You can freely intermix this option with -file names, and each one applies to the source files that follow it. -If you specify multiple @samp{--regex} options, all of them are used -in parallel. The syntax is: + The @samp{--regex} option to @command{etags} allows tags to be +recognized by regular expression matching. You can intermix this +option with file names; each one applies to the source files that +follow it. If you specify multiple @samp{--regex} options, all of +them are used in parallel. The syntax is: @smallexample --regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} @end smallexample - The essential part of the option value is @var{tagregexp}, the -regexp for matching tags. It is always used anchored, that is, it -only matches at the beginning of a line. If you want to allow -indented tags, use a regexp that matches initial whitespace; start it -with @samp{[ \t]*}. +@noindent +The essential part of the option value is @var{tagregexp}, the regexp +for matching tags. It is always used anchored, that is, it only +matches at the beginning of a line. If you want to allow indented +tags, use a regexp that matches initial whitespace; start it with +@samp{[ \t]*}. In these regular expressions, @samp{\} quotes the next character, and all the GCC character escape sequences are supported (@samp{\a} for @@ -1929,7 +1926,7 @@ below. The @var{modifiers} are a sequence of zero or more characters that -modify the way @code{etags} does the matching. A regexp with no +modify the way @command{etags} does the matching. A regexp with no modifiers is applied sequentially to each line of the input file, in a case-sensitive way. The modifiers and their meanings are: @@ -1954,22 +1951,22 @@ @end smallexample @noindent -Here @code{etags} chooses the parsing language for @file{voo.doo} and -@file{bar.ber} according to their contents. @code{etags} also uses +Here @command{etags} chooses the parsing language for @file{voo.doo} and +@file{bar.ber} according to their contents. @command{etags} also uses @var{reg1} to recognize additional tags in @file{voo.doo}, and both @var{reg1} and @var{reg2} to recognize additional tags in @file{bar.ber}. @var{reg1} is checked against each line of @file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while @var{reg2} is checked against the whole @file{bar.ber} file, -permitting multi-line matches, in a case-sensitive way. @code{etags} +permitting multi-line matches, in a case-sensitive way. @command{etags} uses only the Lisp tags rules, with no user-specified regexp matching, to recognize tags in @file{los.er}. You can restrict a @samp{--regex} option to match only files of a given language by using the optional prefix @var{@{language@}}. (@samp{etags --help} prints the list of languages recognized by -@code{etags}.) This is particularly useful when storing many -predefined regular expressions for @code{etags} in a file. The +@command{etags}.) This is particularly useful when storing many +predefined regular expressions for @command{etags} in a file. The following example tags the @code{DEFVAR} macros in the Emacs source files, for the C language only: @@ -1979,7 +1976,7 @@ @noindent When you have complex regular expressions, you can store the list of -them in a file. The following option syntax instructs @code{etags} to +them in a file. The following option syntax instructs @command{etags} to read two files of regular expressions. The regular expressions contained in the second file are matched without regard to case. @@ -1988,9 +1985,9 @@ @end smallexample @noindent -A regex file for @code{etags} contains one regular expression per +A regex file for @command{etags} contains one regular expression per line. Empty lines, and lines beginning with space or tab are ignored. -When the first character in a line is @samp{@@}, @code{etags} assumes +When the first character in a line is @samp{@@}, @command{etags} assumes that the rest of the line is the name of another file of regular expressions; thus, one such file can include another file. All the other lines are taken to be regular expressions. If the first @@ -2053,14 +2050,14 @@ @node Select Tags Table @subsection Selecting a Tags Table -@vindex tags-file-name @findex visit-tags-table - Emacs has at any time one @dfn{selected} tags table, and all the + Emacs has at any time one @dfn{selected} tags table. All the commands for working with tags tables use the selected one. To select a tags table, type @kbd{M-x visit-tags-table}, which reads the tags table file name as an argument, with @file{TAGS} in the default directory as the default. +@vindex tags-file-name Emacs does not actually read in the tags table contents until you try to use them; all @code{visit-tags-table} does is store the file name in the variable @code{tags-file-name}, and setting the variable @@ -2124,27 +2121,25 @@ @kindex M-. @findex find-tag - @kbd{M-.}@: (@code{find-tag}) is the command to find the definition of -a specified tag. It searches through the tags table for that tag, as a -string, and then uses the tags table info to determine the file that the -definition is in and the approximate character position in the file of -the definition. Then @code{find-tag} visits that file, moves point to -the approximate character position, and searches ever-increasing -distances away to find the tag definition. + @kbd{M-.}@: (@code{find-tag}) prompts for a tag name and jumps to +its source definition. It works by searching through the tags table +for that tag's file and approximate character position, visiting that +file, and searching for the tag definition at ever-increasing +distances away from the recorded approximate position. - If an empty argument is given (just type @key{RET}), the balanced -expression in the buffer before or around point is used as the -@var{tag} argument. @xref{Expressions}. + When entering the tag argument to @kbd{M-.}, the usual minibuffer +completion commands can be used (@pxref{Completion}), with the tag +names in the selected tags table as completion candidates. If you +specify an empty argument, the balanced expression in the buffer +before or around point is the default argument. @xref{Expressions}. You don't need to give @kbd{M-.} the full name of the tag; a part -will do. This is because @kbd{M-.} finds tags in the table which -contain @var{tag} as a substring. However, it prefers an exact match -to a substring match. To find other tags that match the same -substring, give @code{find-tag} a numeric argument, as in @kbd{C-u -M-.}; this does not read a tag name, but continues searching the tags -table's text for another tag containing the same substring last used. -If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier -alternative to @kbd{C-u M-.}. +will do. @kbd{M-.} finds tags which contain that argument as a +substring. However, it prefers an exact match to a substring match. +To find other tags that match the same substring, give @code{find-tag} +a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does +not read a tag name, but continues searching the tags table's text for +another tag containing the same substring last used. @kindex C-x 4 . @findex find-tag-other-window @@ -2152,23 +2147,23 @@ @findex find-tag-other-frame Like most commands that can switch buffers, @code{find-tag} has a variant that displays the new buffer in another window, and one that -makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes -the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}}, -which invokes @code{find-tag-other-frame}. +makes a new frame for it. The former is @w{@kbd{C-x 4 .}} +(@code{find-tag-other-window}), and the latter is @w{@kbd{C-x 5 .}} +(@code{find-tag-other-frame}). - To move back to places you've found tags recently, use @kbd{C-u - -M-.}; more generally, @kbd{M-.} with a negative numeric argument. This -command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative -argument finds the previous tag location in another window. + To move back to previous tag definitions, use @kbd{C-u - M-.}; more +generally, @kbd{M-.} with a negative numeric argument. Similarly, +@w{@kbd{C-x 4 .}} with a negative argument finds the previous tag +location in another window. @kindex M-* @findex pop-tag-mark @vindex find-tag-marker-ring-length - As well as going back to places you've found tags recently, you can go -back to places @emph{from where} you found them. Use @kbd{M-*}, which -invokes the command @code{pop-tag-mark}, for this. Typically you would -find and study the definition of something with @kbd{M-.} and then -return to where you were with @kbd{M-*}. + As well as going back to places you've found tags recently, you can +go back to places @emph{from where} you found them, using @kbd{M-*} +(@code{pop-tag-mark}). Thus you can find and examine the definition +of something with @kbd{M-.} and then return to where you were with +@kbd{M-*}. Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to a depth determined by the variable @code{find-tag-marker-ring-length}. @@ -2212,10 +2207,10 @@ @kindex M-, @findex tags-loop-continue - Having found one match, you probably want to find all the rest. To find -one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the -@code{tags-search}. This searches the rest of the current buffer, followed -by the remaining files of the tags table.@refill + Having found one match, you probably want to find all the rest. +Type @kbd{M-,} (@code{tags-loop-continue}) to resume the +@code{tags-search}, finding one more match. This searches the rest of +the current buffer, followed by the remaining files of the tags table. @findex tags-query-replace @kbd{M-x tags-query-replace} performs a single @@ -2252,56 +2247,56 @@ Buffers in which no match is found are quickly killed; the others continue to exist. - It may have struck you that @code{tags-search} is a lot like -@code{grep}. You can also run @code{grep} itself as an inferior of -Emacs and have Emacs show you the matching lines one by one. + As an alternative to @code{tags-search}, you can run @command{grep} +as a subprocess and have Emacs show you the matching lines one by one. @xref{Grep Searching}. @node List Tags @subsection Tags Table Inquiries @table @kbd +@item C-M-i +@itemx M-@key{TAB} +Perform completion on the text around point, using the selected tags +table if one is loaded (@code{completion-at-point}). @item M-x list-tags @key{RET} @var{file} @key{RET} Display a list of the tags defined in the program file @var{file}. @item M-x tags-apropos @key{RET} @var{regexp} @key{RET} Display a list of all tags matching @var{regexp}. @end table +@cindex completion (symbol names) + In most programming language modes, you can type @kbd{C-M-i} or +@kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol +at point. If there is a selected tags table, this command can use it +to generate completion candidates. @xref{Symbol Completion}. + @findex list-tags - @kbd{M-x list-tags} reads the name of one of the files described by -the selected tags table, and displays a list of all the tags defined in -that file. The ``file name'' argument is really just a string to -compare against the file names recorded in the tags table; it is read as -a string rather than as a file name. Therefore, completion and -defaulting are not available, and you must enter the file name the same -way it appears in the tags table. Do not include a directory as part of -the file name unless the file name recorded in the tags table includes a -directory. + @kbd{M-x list-tags} reads the name of one of the files covered by +the selected tags table, and displays a list of tags defined in that +file. Do not include a directory as part of the file name unless the +file name recorded in the tags table includes a directory. @findex tags-apropos @vindex tags-apropos-verbose +@vindex tags-tag-face +@vindex tags-apropos-additional-actions @kbd{M-x tags-apropos} is like @code{apropos} for tags -(@pxref{Apropos}). It finds all the tags in the selected tags table -whose entries match @var{regexp}, and displays them. If the variable +(@pxref{Apropos}). It displays a list of tags in the selected tags +table whose entries match @var{regexp}. If the variable @code{tags-apropos-verbose} is non-@code{nil}, it displays the names -of the tags files together with the tag names. - -@vindex tags-tag-face -@vindex tags-apropos-additional-actions - You can customize the appearance of the output by setting the -variable @code{tags-tag-face} to a face. You can display additional -output with @kbd{M-x tags-apropos} by customizing the variable -@code{tags-apropos-additional-actions}---see its documentation for -details. - - You can also use the collection of tag names to complete a symbol -name in the buffer. @xref{Symbol Completion}. - - You can use @kbd{M-x next-file} to visit the files in the selected -tags table. The first time this command is called, it visits the -first file in the tags table. Each subsequent call visits the next -file in the table, unless a prefix argument is supplied, in which case -it returns to the first file. +of the tags files together with the tag names. You can customize the +appearance of the output by setting the variable @code{tags-tag-face} +to a face. You can display additional output by customizing the +variable @code{tags-apropos-additional-actions}; see its documentation +for details. + +@findex next-file + @kbd{M-x next-file} visits files covered by the selected tags table. +The first time it is called, it visits the first file covered by the +table. Each subsequent call visits the next covered file, unless a +prefix argument is supplied, in which case it returns to the first +file. @node EDE @section Emacs Development Environment === modified file 'doc/emacs/programs.texi' --- doc/emacs/programs.texi 2011-12-21 08:39:32 +0000 +++ doc/emacs/programs.texi 2011-12-25 14:16:00 +0000 @@ -1291,18 +1291,18 @@ @kbd{@key{ESC} @key{TAB}} instead. @cindex tags-based completion - In-buffer symbol completion generates its completion list in a -number of different ways. If Semantic mode is enabled, Emacs tries to -use the Semantic parser data for completion (@pxref{Semantic}). If -Semantic mode is not enabled or it fails at performing completion, -Emacs normally tries to complete using a tags table (@pxref{Tags}). - +@findex completion-at-point @cindex Lisp symbol completion @cindex completion (Lisp symbols) - In Emacs Lisp mode, completion is performed using the function, -variable, and property names defined in the current Emacs session. If -there is an open parenthesis immediately before the beginning of the -partial symbol, only symbols with function definitions are considered. + In most programming language modes, @kbd{C-M-i} (or +@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point}, +which generates its completion list in a flexible way. If Semantic +mode is enabled, it tries to use the Semantic parser data for +completion (@pxref{Semantic}). If Semantic mode is not enabled or +fails at performing completion, it tries to complete using the +selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it +performs completion using the function, variable, or property names +defined in the current Emacs session. In all other respects, in-buffer symbol completion behaves like minibuffer completion. For instance, if Emacs cannot complete to a === modified file 'doc/emacs/vc1-xtra.texi' --- doc/emacs/vc1-xtra.texi 2011-12-22 10:14:41 +0000 +++ doc/emacs/vc1-xtra.texi 2011-12-25 14:16:00 +0000 @@ -12,8 +12,7 @@ @menu * Change Logs and VC:: Generating a change log file from log entries. -* Renaming and VC:: A command to rename both the source and master - file correctly. +* VC Delete/Rename:: Deleting and renaming version-controlled files. * Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. @end menu @@ -104,33 +103,48 @@ such files all have the same text, it coalesces them into a single entry. -@node Renaming and VC -@subsubsection Renaming VC Work Files and Master Files +@node VC Delete/Rename +@subsubsection Deleting and Renaming Version-Controlled Files @cindex renaming version-controlled files @table @kbd +@item M-x vc-delete-file +Prompt for a file name, delete the file from the working tree, and +schedule the deletion for committing. + @item M-x vc-rename-file -Prompt for two file names, @var{VAR} and @var{OLD}, and rename them in -the version-controlled working tree. +Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the +working tree, and schedule the renaming for committing. @end table +@findex vc-delete-file + If you wish to delete a version-controlled file, use the command +@kbd{M-x vc-delete-file}. This prompts for the file name, and deletes +it via the version control system. The file is removed from the +working tree, and in the VC Directory buffer +@iftex +(@pxref{VC Directory Mode}), +@end iftex +@ifnottex +(@pxref{VC Directory Mode}), +@end ifnottex +it is displayed with the @samp{removed} status. When you commit it, +the deletion takes effect in the repository. + @findex vc-rename-file - If you wish to rename a registered file in a version-controlled -working tree, use the command @kbd{M-x vc-rename-file}. This prompts -for two arguments: the file you wish to rename, followed by the new -name; then it performs the renaming through the version control -system. + To rename a version-controlled file, type @kbd{M-x vc-rename-file}. +This prompts for two arguments: the name of the file you wish to +rename, and the new name; then it performs the renaming via the +version control system. The renaming takes effect immediately in the +working tree, and takes effect in the repository when you commit the +renamed file. On modern version control systems that have built-in support for -renaming, the renaming operation takes effect immediately in the -working tree, and takes effect in the repository when you commit the -renamed file. The renamed file retains the full change history of the -original file. - - On CVS and older version control systems, the @code{vc-rename-file} -command actually works by creating a copy of the old file under the -new name, registering it, and deleting the old file. In this case, -the change history is not preserved. +renaming, the renamed file retains the full change history of the +original file. On CVS and older version control systems, the +@code{vc-rename-file} command actually works by creating a copy of the +old file under the new name, registering it, and deleting the old +file. In this case, the change history is not preserved. @node Revision Tags @subsubsection Revision Tags === modified file 'etc/NEWS' --- etc/NEWS 2011-12-22 23:30:10 +0000 +++ etc/NEWS 2011-12-25 14:16:00 +0000 @@ -97,10 +97,10 @@ ** Completion *** shell-mode uses pcomplete rules, with the standard completion UI. - ++++ *** Many packages have been changed to use `completion-at-point' rather than their own completion code. - ++++ *** `completion-at-point' now handles tags and semantic completion. --- *** Completion in a non-minibuffer now tries to detect the end of completion