Now on revision 113536. ------------------------------------------------------------ revno: 113536 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-07-24 23:57:25 -0700 message: * make-dist: Add a --tests option, to include test/. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-24 01:03:56 +0000 +++ ChangeLog 2013-07-25 06:57:25 +0000 @@ -1,3 +1,7 @@ +2013-07-25 Glenn Morris + + * make-dist: Add a --tests option, to include test/. + 2013-07-24 Glenn Morris * configure.ac: Use self-descriptive tags for AC_CONFIG_COMMANDS. === modified file 'make-dist' --- make-dist 2013-05-18 12:04:40 +0000 +++ make-dist 2013-07-25 06:57:25 +0000 @@ -1,8 +1,7 @@ #!/bin/sh ### make-dist: create an Emacs distribution tar file from current srcdir -## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, -## Inc. +## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, Inc. ## This file is part of GNU Emacs. @@ -51,6 +50,7 @@ make_tar=no default_gzip=gzip newer="" +with_tests=no while [ $# -gt 0 ]; do case "$1" in @@ -98,6 +98,12 @@ check=no ;; + ## Include the test/ directory. + ## This option is mainly for the hydra build server. + "--tests") + with_tests=yes + ;; + "--help") echo "Usage: ${progname} [options]" echo "" @@ -110,6 +116,7 @@ echo " --no-update don't recompile or do analogous things" echo " --snapshot same as --clean-up --no-update --tar --no-check" echo " --tar make a tar file" + echo " --tests include the test/ directory" echo "" exit 0 ;; @@ -289,7 +296,7 @@ build-aux build-aux/snippet \ src src/bitmaps lib lib-src oldXMenu lwlib \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ - `find etc lisp admin -type d` \ + `find etc lisp admin test -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ info m4 msdos \ nextstep nextstep/templates \ @@ -300,6 +307,13 @@ nextstep/GNUstep/Emacs.base \ nextstep/GNUstep/Emacs.base/Resources do + + if [ "$with_tests" != "yes" ]; then + case $subdir in + test*) continue ;; + esac + fi + ## site-lisp for in-place installs (?). [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \ echo "WARNING: $subdir not found, making anyway" @@ -447,6 +461,17 @@ ln $f $tempdir/$f done +if [ "$with_tests" = "yes" ]; then + echo "Making links to \`test' and its subdirectories" + for f in `find test -type f`; do + case $f in + test/automated/flymake/warnpred/a.out) continue ;; + test/automated/Makefile) continue ;; + esac + ln $f $tempdir/$f + done +fi + echo "Making links to \`etc' and its subdirectories" for f in `find etc -type f`; do case $f in ------------------------------------------------------------ revno: 113535 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2013-07-25 02:37:56 +0200 message: lisp/desktop.el: Add workaround for bug#14949. (desktop--make-frame): Do not pass the `fullscreen' parameter to modify-frame-parameters if the value has not changed. (desktop--make-frame): On cl-delete-if call, check parameter name, not full parameter. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 16:21:44 +0000 +++ lisp/ChangeLog 2013-07-25 00:37:56 +0000 @@ -1,3 +1,11 @@ +2013-07-25 Juanma Barranquero + + * desktop.el (desktop--make-frame): Do not pass the `fullscreen' + parameter to modify-frame-parameters if the value has not changed; + this is a workaround for bug#14949. + (desktop--make-frame): On cl-delete-if call, check parameter name, + not full parameter. + 2013-07-24 Juanma Barranquero * desktop.el (desktop-restoring-frames-p): Return a true boolean. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-24 16:21:44 +0000 +++ lisp/desktop.el 2013-07-25 00:37:56 +0000 @@ -1289,7 +1289,7 @@ (visible (assq 'visibility filtered-cfg))) (setq filtered-cfg (cl-delete-if (lambda (p) (memq p '(visibility fullscreen width height))) - filtered-cfg)) + filtered-cfg :key #'car)) (when width (setq filtered-cfg (append `((user-size . t) (width . ,width)) filtered-cfg))) @@ -1302,7 +1302,11 @@ ;; Time to select or create a frame an apply the big bunch of parameters (if (setq frame (desktop--select-frame display filtered-cfg)) - (modify-frame-parameters frame filtered-cfg) + (modify-frame-parameters frame + (if (eq (frame-parameter frame 'fullscreen) fullscreen) + ;; Workaround for bug#14949 + (assq-delete-all 'fullscreen filtered-cfg) + filtered-cfg)) (setq frame (make-frame-on-display display filtered-cfg))) ;; Let's give the finishing touches (visibility, tool-bar, maximization). ------------------------------------------------------------ revno: 113534 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2013-07-25 06:39:41 +0800 message: * etc/NEWS: Typo fix. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-07-24 22:32:48 +0000 +++ etc/NEWS 2013-07-24 22:39:41 +0000 @@ -282,8 +282,8 @@ ** Ido *** Ido has a manual now. -** `ido-use-virtual-buffers' takes a new value 'auto. -** `ido-decorations' has been slightly extended to give a bit more control. +*** `ido-use-virtual-buffers' takes a new value 'auto. +*** `ido-decorations' has been slightly extended to give a bit more control. ** Image mode ------------------------------------------------------------ revno: 113533 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2013-07-25 06:32:48 +0800 message: * doc/misc/ido.texi: New file. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-07-19 14:50:21 +0000 +++ doc/misc/ChangeLog 2013-07-24 22:32:48 +0000 @@ -1,3 +1,7 @@ +2013-07-24 Xue Fuqiao + + * ido.texi: New file. + 2013-07-19 Geoff Kuenning (tiny change) * gnus.texi (Customizing Articles): Document function predicates. === added file 'doc/misc/ido.texi' --- doc/misc/ido.texi 1970-01-01 00:00:00 +0000 +++ doc/misc/ido.texi 2013-07-24 22:32:48 +0000 @@ -0,0 +1,712 @@ +\input texinfo @c -*-texinfo-*- +@setfilename ../../info/ido +@settitle Interactive Do +@include emacsver.texi + +@copying +This file documents the Ido package for GNU Emacs. + +Copyright @copyright{} 2013 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation License''. + +(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and +modify this GNU manual.'' +@end quotation +@end copying + +@dircategory Emacs lisp libraries +@direntry +* Ido: (ido). Interactively do things with buffers and files. +@end direntry + +@finalout + +@titlepage +@sp 6 +@center @titlefont{Interactive Do} +@sp 4 +@center For GNU Emacs +@sp 1 +@center as distributed with Emacs @value{EMACSVER} +@sp 5 +@center Kim F. Storm +@center storm@@cua.dk +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents + +@ifnottex +@node Top +@top Interactive Do + +@insertcopying +@end ifnottex + +@menu +* Overview:: Basics, activation. +* Matching:: Interactivity, matching, scrolling. +* Highlighting:: Highlighting of matching items. +* Hidden Buffers and Files:: Hidden buffers, files, and directories. +* Customization:: Change the Ido functionality. +* Misc:: Various other features. + +Appendices +* GNU Free Documentation License:: The license for this documentation. + +Indexes +* Variable Index:: An entry for each documented variable. + +@detailmenu + --- The Detailed Node Listing --- + +Overview + +* Activation:: How to use this package. + +Matching + +* Interactive Substring Matching:: Interactivity, matching, scrolling. +* Prefix Matching:: Standard completion. +* Flexible Matching:: More flexible matching. +* Regexp Matching:: Matching using regular expression. + +Customization + +* Changing List Order:: Changing the list of files. +* Find File At Point:: Make Ido guess the context. +* Ignoring:: Ignorance is bliss. +* Misc Customization:: Miscellaneous customization for Ido. + +Miscellaneous + +* All Matching:: Seeing all the matching buffers or files. +* Replacement:: Replacement for @code{read-buffer} and @code{read-file-name}. +* Other Packages:: Don't want to depend on @code{ido-everywhere}? + +@end detailmenu +@end menu + +@node Overview +@chapter Overview +@cindex overview + +@noindent +This document describes a set of features that can interactively do +things with buffers and files. All the features are described here +in detail. + +The @dfn{Ido} package can let you switch between buffers and visit +files and directories with a minimum of keystrokes. It is a superset +of Iswitchb, the interactive buffer switching package by Stephen +Eglen. + +@cindex author of Ido +@cindex Iswitchb +This package was originally written by Kim F. Storm, based on the + @file{iswitchb.el} package by Stephen Eglen. + +@menu +* Activation:: How to use this package. +@end menu + +@node Activation +@section Activation +@cindex activation +@cindex installation + +@noindent +This package is distributed with Emacs, so there is no need to install +any additional files in order to start using it. To activate, use +@kbd{M-x ido-mode}. + +@noindent +You may wish to add the following expressions to your initialization +file (@pxref{Init File,,The Emacs Initialization File, emacs, GNU +Emacs Manual}), if you make frequent use of features from this +package. + +@example +(require 'ido) +(ido-mode t) +@end example + +@c @node Working Directories +@c @section Working Directories +@c @cindex working directories + +@node Matching +@chapter Matching +@cindex matching + +@noindent +This section describes features of this package that have to +do with various kinds of @emph{matching}: among buffers, files, and directories. + +@menu +* Interactive Substring Matching:: Interactivity, matching, scrolling. +* Prefix Matching:: Standard completion. +* Flexible Matching:: More flexible matching. +* Regexp Matching:: Matching using regular expression. +@end menu + +@node Interactive Substring Matching +@section Interactive Substring Matching +@cindex interactive substring matching +@cindex substring, interactive matching +@cindex matching, using substring + +@noindent +As you type in a substring, the list of buffers or files currently +matching the substring are displayed as you type. The list is +ordered so that the most recent buffers or files visited come at +the start of the list. + +The buffer or file at the start of the list will be the one visited +when you press @key{RET}. By typing more of the substring, the list +is narrowed down so that gradually the buffer or file you want will be +at the top of the list. Alternatively, you can use @kbd{C-s} and +@kbd{C-r} (or the right and left arrow keys) to rotate buffer or file +names in the list until the one you want is at the top of the list. + +Completion is also available so that you can see what is common to +all of the matching buffers or files as you type. + +For example, if there are two buffers called @file{123456} and +@file{123}, with @file{123456} the most recent, when using +@code{ido-switch-buffer}, you first of all get presented with the list +of all the buffers + +@example +Buffer: @{123456 | 123@} +@end example + +If you then press @kbd{2}: + +@example +Buffer: 2[3]@{123456 | 123@} +@end example + +The list in @{...@} are the matching buffers, most recent first +(buffers visible in the current frame are put at the end of the list +by default). At any time you can select the item at the head of the +list by pressing @key{RET}. You can also put the first element at the +end of the list by pressing @kbd{C-s} or @kbd{}, or bring the +last element to the head of the list by pressing @kbd{C-r} or +@kbd{}. + +The item in [...] indicates what can be added to your input by +pressing @key{TAB} (@code{ido-complete}). In this case, you will get +"3" added to your input. + +So, press @key{TAB}: + +@example +Buffer: 23@{123456 | 123@} +@end example + +At this point, you still have two matching buffers. If you want the +first buffer in the list, you can simply press @key{RET}. If you want +the second in the list, you can press @kbd{C-s} to move it to the top +of the list and then press @kbd{RET} to select it. + +However, if you type @kbd{4}, you'll only have one match left: + +@example +Buffer: 234[123456] +@end example + +Since there is only one matching buffer left, it is given in [] and it +is shown in the @code{ido-only-match} face (ForestGreen). You can now +press @key{TAB} or @key{RET} to go to that buffer. + +If you want to create a new buffer named @file{234}, you can press +@kbd{C-j} (@code{ido-select-text}) instead of @key{TAB} or @key{RET}. + +If instead, you type @kbd{a}: + +@example +Buffer: 234a [No match] +@end example + +There are no matching buffers. If you press @key{RET} or @key{TAB}, +you can be prompted to create a new buffer called @file{234a}. + +Of course, where this function comes in really useful is when you can +specify the buffer using only a few keystrokes. In the above example, +the quickest way to get to the @file{123456} file would be just to +type @kbd{4} and then @key{RET} (assuming there isn't any newer buffer +with @kbd{4} in its name). + +Likewise, if you use @kbd{C-x C-f} (@code{ido-find-file}), the list of +files and directories in the current directory is provided in the same +fashion as the buffers above. The files and directories are normally +sorted in alphabetical order, but the most recently visited directory +is placed first to speed up navigating to directories that you have +visited recently. + +In addition to scrolling through the list using @kbd{} and +@kbd{}, you can use @kbd{} and @kbd{} to quickly +scroll the list to the next or previous subdirectory. + +To go down into a subdirectory, and continue the file selection on +the files in that directory, simply move the directory to the head +of the list and hit @key{RET}. + +To go up to the parent directory, delete any partial file name already +specified (e.g. using @key{DEL}) and hit @key{DEL}. + +@c @defun ido-delete-backward-updir + +@cindex root directory +@cindex home directory +To go to the root directory (on the current drive), enter two slashes. +On MS-DOS or Windows, to select the root of another drive, enter +@samp{X:/} where @samp{X} is the drive letter. To go to the home +directory, enter @samp{~/}. To enter Dired for this directory, use +@kbd{C-d}. + +@c TODO: a new node for ftp hosts +@cindex ftp hosts +You can also visit files on other hosts using the ange-ftp +notations @samp{/host:} and @samp{/user@@host:}. +@c @defvr {User Option} ido-record-ftp-work-directories +@c @defvr {User Option} ido-merge-ftp-work-directories +@c @defvr {User Option} ido-cache-ftp-work-directory-time +@c @defvr {User Option} ido-slow-ftp-hosts +@c @defvr {User Option} ido-slow-ftp-host-regexps + +You can type @kbd{M-p} and @kbd{M-n} to change to previous/next +directories from the history, @kbd{M-s} to search for a file matching +your input, and @kbd{M-k} to remove the current directory from the history. + +If for some reason you cannot specify the proper file using +@code{ido-find-file}, you can press @kbd{C-f} to enter the normal +@code{find-file}. You can also press @kbd{C-b} to drop into +@code{ido-switch-buffer}. + +@c @kindex C-x b +@c @findex ido-switch-buffer +@c @defun ido-switch-buffer +@c This command switch to another buffer interactively. +@c @end defun + +@c @kindex C-x C-f +@c @findex ido-find-file +@c @defun ido-find-file +@c Edit file with name obtained via minibuffer. +@c @end defun + +@c @kindex C-x d +@c @findex ido-dired +@c @defun ido-dired +@c Call Dired the Ido way. +@c @end defun + +@node Prefix Matching +@section Prefix Matching +@cindex prefix matching +@cindex matching, using prefix +@cindex standard way of completion + +@noindent +The standard way of completion with *nix shells and Emacs is to insert +a @dfn{prefix} and then hitting @key{TAB} (or another completion key). +Cause of this behavior has become second nature to a lot of Emacs +users Ido offers in addition to the default substring matching method +(look above) also the prefix matching method. The kind of matching is +the only difference to the description of the substring matching +above. + +You can toggle prefix matching with @kbd{C-p} +(@code{ido-toggle-prefix}). + +For example, if you have two buffers @file{123456} and @file{123} then +hitting @kbd{2} does not match because @kbd{2} is not a prefix in any +of the buffer names. + +@node Flexible Matching +@section Flexible Matching +@cindex flexible matching + +@defvr {User Option} ido-enable-flex-matching +If non-@code{nil}, Ido will do flexible string matching. Flexible +matching means that if the entered string does not match any item, any +item containing the entered characters in the given sequence will +match. +@end defvr + +@noindent +If @code{ido-enable-flex-matching} is non-@code{nil}, Ido will do a +more flexible matching (unless regexp matching is active) to find +possible matches among the available buffer or file names if no +matches are found using the normal prefix or substring matching. + +The flexible matching implies that any item which simply contains all +of the entered characters in the specified sequence will match. + +For example, if you have four files @file{alpha}, @file{beta}, +@file{gamma}, and @file{delta}, entering @samp{aa} will match +@file{alpha} and @file{gamma}, while @samp{ea} matches @file{beta} and +@file{delta}. If prefix matching is also active, @samp{aa} only +matches @file{alpha}, while @samp{ea} does not match any files. + +@node Regexp Matching +@section Regular Expression Matching +@cindex regexp matching +@cindex matching, using regular expression + +@noindent +There is limited provision for regexp matching within Ido, enabled +through @code{ido-enable-regexp} (toggle with @kbd{C-t}). This allows +you to type @samp{[ch]$} for example and see all file names ending in +@samp{c} or @samp{h}. + +@defvr {User Option} ido-enable-regexp +If the value of this user option is non-@code{nil}, Ido will do regexp +matching. The value of this user option can be toggled within +ido-mode using @code{ido-toggle-regexp}. +@end defvr + +@strong{Please notice:} Ido-style completion is inhibited when you +enable regexp matching. + +@node Highlighting +@chapter Highlighting +@cindex highlighting + +@noindent +The highlighting of matching items is controlled via +@code{ido-use-faces}. The faces used are @code{ido-first-match}, +@code{ido-only-match} and @code{ido-subdir}. + +Coloring of the matching item was suggested by Carsten Dominik. + +@node Hidden Buffers and Files +@chapter Hidden Buffers and Files +@cindex hidden buffers and files + +Normally, Ido does not include hidden buffers (whose name starts with +a space) and hidden files and directories (whose name starts with +@samp{.}) in the list of possible completions. However, if the +substring you enter does not match any of the visible buffers or +files, Ido will automatically look for completions among the hidden +buffers or files. + +You can toggle display of the hidden buffers and files with @kbd{C-a} +(@code{ido-toggle-ignore}). + +@c @defun ido-toggle-ignore + +@node Customization +@chapter Customization +@cindex customization + +@noindent +You can customize the @code{ido} group to change Ido functionality: + +@example +M-x customize-group RET ido RET +@end example + +@noindent +or customize a certain variable: + +@example +M-x customize-variable RET ido-xxxxx +@end example + +To modify the keybindings, use the @code{ido-setup-hook}. For example: + +@example +(add-hook 'ido-setup-hook 'ido-my-keys) + +(defun ido-my-keys () + "Add my keybindings for Ido." + (define-key ido-completion-map " " 'ido-next-match)) +@end example + +@menu +* Changing List Order:: Changing the list of files. +* Find File At Point:: Make Ido guess the context. +* Ignoring:: Ignorance is bliss. +* Misc Customization:: Miscellaneous customization for Ido. +@end menu + +@node Changing List Order +@section Changing List Order +@cindex changing order of the list + +@noindent +By default, the list of current files is most recent first, +oldest last, with the exception that the files visible in the +current frame are put at the end of the list. A hook exists to +allow other functions to order the list. For example, if you add: + +@example +(add-hook 'ido-make-buffer-list-hook 'ido-summary-buffers-to-end) +@end example + +@noindent +then all files matching "Summary" are moved to the end of the list. +(I find this handy for keeping the INBOX Summary and so on out of the +way.) It also moves files matching @samp{output\*$} to the end of the +list (these are created by AUCTeX when compiling.) Other functions +could be made available which alter the list of matching files (either +deleting or rearranging elements.) + +@node Find File At Point +@section Find File At Point +@cindex find file at point +@cindex ffap + +@noindent +Find File At Point, also known generally as ``ffap'', is an +intelligent system for opening files, and URLs. + +The following expression will make Ido guess the context: + +@example +(setq ido-use-filename-at-point 'guess) +@end example + +@c @defvr {User Option} ido-use-filename-at-point +@c If the value of this user option is non-@code{nil}, ... +@c @end defvr + +You can disable URL ffap support by toggling +@code{ido-use-url-at-point}. + +@defvr {User Option} ido-use-url-at-point +If the value of this user option is non-@code{nil}, Ido will look for +a URL at point. If found, call @code{find-file-at-point} to visit it. +@end defvr + +@node Ignoring +@section Ignoring Buffers and Files +@cindex ignoring +@cindex regexp, ignore buffers and files + +@noindent +Ido is capable of ignoring buffers, directories, files and extensions +using regular expression. + +@defvr {User Option} ido-ignore-buffers +This variable takes a list of regular expressions for buffers to +ignore in @code{ido-switch-buffer}. +@end defvr + +@defvr {User Option} ido-ignore-directories +This variable takes a list of regular expressions for (sub)directories +names to ignore in @code{ido-dired} and @code{ido-find-file}. +@end defvr + +@defvr {User Option} ido-ignore-files +This variable takes a list of regular expressions for files to ignore +in @code{ido-find-file}. +@end defvr + +@defvr {User Option} ido-ignore-unc-host-regexps +This variable takes a list of regular expressions matching UNC hosts +to ignore. The letter case will be ignored if +@code{ido-downcase-unc-hosts} is non-@code{nil}. +@end defvr + +@c @defvr {User Option} ido-work-directory-list-ignore-regexps + +To make Ido use @code{completion-ignored-extensions} you need to +enable it: + +@example +(setq ido-ignore-extensions t) +@end example + +Now you can customize @code{completion-ignored-extensions} as well. +Go ahead and add all the useless object files, backup files, shared +library files and other computing flotsam you don’t want Ido to show. + +@strong{Please notice:} Ido will still complete the ignored elements +if it would otherwise not show any other matches. So if you type out +the name of an ignored file, Ido will still let you open it just fine. + +@node Misc Customization +@section Miscellaneous Customization +@cindex miscellaneous customization for Ido + +@defvr {User Option} ido-mode +This user option determines for which functional group (buffer and +files) Ido behavior should be enabled. +@end defvr + +@defvr {User Option} ido-case-fold +If the value of this user option is non-@code{nil}, searching of +buffer and file names should ignore case. +@end defvr + +@defvr {User Option} ido-show-dot-for-dired +If the value of this user option is non-@code{nil} , always put +@samp{.} as the first item in file name lists. This allows the +current directory to be opened immediately with Dired +@end defvr + +@defvr {User Option} ido-enable-dot-prefix +If the value of this user option is non-@code{nil}, Ido will match +leading dot as prefix. I.e., hidden files and buffers will match only +if you type a dot as first char (even if @code{ido-enable-prefix} is +@code{nil}). +@end defvr + +@c @defvr {User Option} ido-confirm-unique-completion +@c @defvr {User Option} ido-cannot-complete-command +@c @defvr {User Option} ido-record-commands +@c @defvr {User Option} ido-max-file-prompt-width +@c @defvr {User Option} ido-max-window-height +@c @defvr {User Option} ido-enable-last-directory-history +@c @defvr {User Option} ido-max-work-directory-list +@c @defvr {User Option} ido-enable-tramp-completion +@c @defvr {User Option} ido-unc-hosts +@c @defvr {User Option} ido-downcase-unc-hosts +@c @defvr {User Option} ido-cache-unc-host-shares-time +@c @defvr {User Option} ido-max-work-file-list +@c @defvr {User Option} ido-work-directory-match-only +@c @defvr {User Option} ido-auto-merge-work-directories-length +@c @defvr {User Option} ido-auto-merge-delay-time +@c @defvr {User Option} ido-auto-merge-inhibit-characters-regexp +@c @defvr {User Option} ido-merged-indicator +@c @defvr {User Option} ido-max-dir-file-cache +@c @defvr {User Option} ido-max-directory-size +@c @defvr {User Option} ido-rotate-file-list-default +@c @defvr {User Option} ido-enter-matching-directory +@c @defvr {User Option} ido-create-new-buffer +@c @defvr {User Option} ido-setup-hook +@c @defvr {User Option} ido-separator +@c @defvr {User Option} ido-decorations +@c @defvr {User Option} ido-use-virtual-buffers +@c @defvr {User Option} ido-use-faces +@c @defvr {User Option} ido-make-file-list-hook +@c @defvr {User Option} ido-make-dir-list-hook +@c @defvr {User Option} ido-make-buffer-list-hook +@c @defvr {User Option} ido-rewrite-file-prompt-functions +@c @defvr {User Option} ido-completion-buffer +@c @defvr {User Option} ido-completion-buffer-all-completions +@c @defvr {User Option} ido-all-frames +@c @defvr {User Option} ido-minibuffer-setup-hook +@c @defvr {User Option} ido-save-directory-list-file +@c @defvr {User Option} ido-read-file-name-as-directory-commands +@c @defvr {User Option} ido-read-file-name-non-ido +@c @defvr {User Option} ido-before-fallback-functions +@c @defvr {User Option} ido-buffer-disable-smart-matches + +@node Misc +@chapter Miscellaneous +@cindex miscellaneous + +@noindent +After @kbd{C-x b} (@code{ido-switch-buffer}), the buffer at the head +of the list can be killed by pressing @kbd{C-k}. If the buffer needs +saving, you will be queried before the buffer is killed. + +Likewise, after @kbd{C-x C-f}, you can delete (i.e., physically +remove) the file at the head of the list with @kbd{C-k}. You will +always be asked for confirmation before deleting the file. + +If you enter @kbd{C-x b} to switch to a buffer visiting a given file, +and you find that the file you are after is not in any buffer, you can +press @kbd{C-f} to immediately drop into @code{ido-find-file}. And +you can switch back to buffer selection with @kbd{C-b}. + +@c @defun ido-magic-forward-char +@c @defun ido-magic-backward-char + +You can also use Ido in your Emacs Lisp programs: + +@example +(setq my-pkgs (list "CEDET" "Gnus" "Rcirc" "Tramp" "Org" "all-of-them")) +(ido-completing-read "What's your favorite package? " my-pkgs) +@end example + +@menu +* All Matching:: Seeing all the matching buffers or files. +* Replacement:: Replacement for @code{read-buffer} and @code{read-file-name}. +* Other Packages:: Don't want to depend on @code{ido-everywhere}? +@end menu + +@node All Matching +@section All Matching +@cindex all matching +@cindex seeing all the matching buffers or files + +@noindent +If you have many matching files, they may not all fit onto one line of +the minibuffer. Normally, the minibuffer window will grow to show you +more of the matching files (depending on the value of the variables +@code{resize-mini-windows} and @code{max-mini-window-height}). If you +want Ido to behave differently from the default minibuffer resizing +behavior, set the variable @code{ido-max-window-height}. + +Also, to improve the responsiveness of Ido, the maximum number of +matching items is limited to 12, but you can increase or removed this +limit via the @code{ido-max-prospects} user option. + +@c @defvr {User Option} ido-max-prospects + +To see a full list of all matching buffers in a separate buffer, hit +@kbd{?} or press @key{TAB} when there are no further completions to +the substring. Repeated @key{TAB} presses will scroll you through +this separate buffer. + +@node Replacement +@section Replacement + +@noindent +@code{ido-read-buffer} and @code{ido-read-file-name} have been written +to be drop in replacements for the normal buffer and file name reading +functions @code{read-buffer} and @code{read-file-name}. + +To use ido for all buffer and file selections in Emacs, customize the +variable @code{ido-everywhere}. + +@c @defun ido-everywhere +@c @defvr {User Option} ido-everywhere + +@node Other Packages +@section Other Packages +@cindex other packages +@cindex used by other packages + +@noindent +If you don't want to rely on the @code{ido-everywhere} functionality, +@code{ido-read-buffer}, @code{ido-read-file-name}, and +@code{ido-read-directory-name} can be used by other packages to read a +buffer name, a file name, or a directory name in the @emph{Ido} way. + +@c @node Cheetsheet + +@c * History and Acknowledgments:: How Ido came into being +@c @node History and Acknowledgments +@c @appendix History and Acknowledgments + +@node GNU Free Documentation License +@appendix GNU Free Documentation License +@include doclicense.texi + +@c @node Function Index +@c @unnumbered Function Index + +@c @printindex fn + +@node Variable Index +@unnumbered Variable Index + +@printindex vr + +@bye === modified file 'etc/NEWS' --- etc/NEWS 2013-07-24 06:21:07 +0000 +++ etc/NEWS 2013-07-24 22:32:48 +0000 @@ -180,9 +180,6 @@ See `remember-data-directory' and `remember-directory-file-name-format' for new options related to this function. -** `ido-use-virtual-buffers' takes a new value 'auto. -** `ido-decorations' has been slightly extended to give a bit more control. - ** More packages look for ~/.emacs.d/ additionally to ~/.. Affected files: ~/.emacs.d/timelog replaces ~/.timelog @@ -283,6 +280,11 @@ *** The icomplete-separator is customizable, and its default has changed. *** Removed icomplete-show-key-bindings. +** Ido +*** Ido has a manual now. +** `ido-use-virtual-buffers' takes a new value 'auto. +** `ido-decorations' has been slightly extended to give a bit more control. + ** Image mode *** New commands `n' (`image-next-file') and `p' (`image-previous-file') ------------------------------------------------------------ revno: 113532 fixes bug: http://debbugs.gnu.org/14780 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-07-24 20:36:42 +0300 message: Fix bug #14780 with unreachable lines near end of buffer. src/xdisp.c (redisplay_window): Instead of moving point out of scroll margin, reject the force_start method, and try scrolling. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-24 15:11:30 +0000 +++ src/ChangeLog 2013-07-24 17:36:42 +0000 @@ -1,3 +1,9 @@ +2013-07-24 Eli Zaretskii + + * xdisp.c (redisplay_window): Instead of moving point out of + scroll margin, reject the force_start method, and try scrolling + instead. (Bug#14780) + 2013-07-24 Ken Brown * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined === modified file 'src/xdisp.c' --- src/xdisp.c 2013-07-16 21:35:45 +0000 +++ src/xdisp.c 2013-07-24 17:36:42 +0000 @@ -15608,10 +15608,11 @@ the Y coordinate of the _next_ row, see the definition of MATRIX_ROW_BOTTOM_Y. */ if (w->cursor.vpos < margin + header_line) - new_vpos - = pixel_margin + (header_line - ? CURRENT_HEADER_LINE_HEIGHT (w) - : 0) + frame_line_height; + { + w->cursor.vpos = -1; + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } else { int window_height = window_box_height (w); @@ -15619,7 +15620,11 @@ if (header_line) window_height += CURRENT_HEADER_LINE_HEIGHT (w); if (w->cursor.y >= window_height - pixel_margin) - new_vpos = window_height - pixel_margin; + { + w->cursor.vpos = -1; + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } } } ------------------------------------------------------------ revno: 113531 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2013-07-24 18:21:44 +0200 message: lisp/desktop.el (desktop-restoring-frames-p): Return a true boolean. (desktop-restore-frames): Warn when deleting an existing frame failed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 15:56:24 +0000 +++ lisp/ChangeLog 2013-07-24 16:21:44 +0000 @@ -1,3 +1,8 @@ +2013-07-24 Juanma Barranquero + + * desktop.el (desktop-restoring-frames-p): Return a true boolean. + (desktop-restore-frames): Warn when deleting an existing frame failed. + 2013-07-24 Glenn Morris * ffap.el (ffap-machine-p): Handle "not known" response. (Bug#14929) === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-23 23:10:58 +0000 +++ lisp/desktop.el 2013-07-24 16:21:44 +0000 @@ -1327,7 +1327,7 @@ (defun desktop-restoring-frames-p () "True if calling `desktop-restore-frames' will actually restore frames." - (and desktop-restore-frames desktop-saved-frame-states)) + (and desktop-restore-frames desktop-saved-frame-states t)) (defun desktop-restore-frames () "Restore window/frame configuration. @@ -1405,7 +1405,10 @@ ;; Delete remaining frames, but do not fail if some resist being deleted. (unless (eq desktop-restoring-reuses-frames 'keep) (dolist (frame desktop--reuse-list) - (ignore-errors (delete-frame frame)))) + (condition-case err + (delete-frame frame) + (error + (delay-warning 'desktop (error-message-string err)))))) (setq desktop--reuse-list nil) ;; Make sure there's at least one visible frame, and select it. (unless (or (daemonp) ------------------------------------------------------------ revno: 113530 fixes bug: http://debbugs.gnu.org/14929 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-07-24 08:56:24 -0700 message: * lisp/ffap.el (ffap-machine-p): Handle "not known" response. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 13:29:15 +0000 +++ lisp/ChangeLog 2013-07-24 15:56:24 +0000 @@ -1,3 +1,7 @@ +2013-07-24 Glenn Morris + + * ffap.el (ffap-machine-p): Handle "not known" response. (Bug#14929) + 2013-07-24 Michael Albinus * filenotify.el (file-notify-supported-p): === modified file 'lisp/ffap.el' --- lisp/ffap.el 2013-02-04 12:02:25 +0000 +++ lisp/ffap.el 2013-07-24 15:56:24 +0000 @@ -459,7 +459,8 @@ (let ((mesg (car (cdr error)))) (cond ;; v18: - ((string-match "^Unknown host" mesg) nil) + ((string-match "\\(^Unknown host\\|Name or service not known$\\)" + mesg) nil) ((string-match "not responding$" mesg) mesg) ;; v19: ;; (file-error "connection failed" "permission denied" ------------------------------------------------------------ revno: 113529 committer: Ken Brown branch nick: trunk timestamp: Wed 2013-07-24 11:11:30 -0400 message: * src/alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined (Bug#14944). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-24 06:21:07 +0000 +++ src/ChangeLog 2013-07-24 15:11:30 +0000 @@ -1,3 +1,8 @@ +2013-07-24 Ken Brown + + * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined + (Bug#14944). + 2013-07-24 Paul Eggert * eval.c (Fprogn): Do not check that BODY is a proper list. === modified file 'src/alloc.c' --- src/alloc.c 2013-07-21 15:56:55 +0000 +++ src/alloc.c 2013-07-24 15:11:30 +0000 @@ -3371,7 +3371,7 @@ return val; } -#if defined HAVE_NS || defined DOS_NT +#if defined HAVE_NS || defined HAVE_NTGUI Lisp_Object make_save_ptr (void *a) { ------------------------------------------------------------ revno: 113528 committer: Michael Albinus branch nick: trunk timestamp: Wed 2013-07-24 15:56:19 +0200 message: * automated/file-notify-tests.el (file-notify--test-local-enabled): New defconst. Replaces all `file-notify-support' occurences. (file-notify--test-remote-enabled): New defun. (file-notify--deftest-remote): Use it. (file-notify-test00-availability): Rewrite. (file-notify-test00-availability-remote): New defun. (file-notify-test01-add-watch): Rewrite first erroneous check. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-07-23 19:54:01 +0000 +++ test/ChangeLog 2013-07-24 13:56:19 +0000 @@ -1,3 +1,14 @@ +2013-07-24 Michael Albinus + + * automated/file-notify-tests.el + (file-notify--test-local-enabled): New defconst. Replaces all + `file-notify-support' occurences. + (file-notify--test-remote-enabled): New defun. + (file-notify--deftest-remote): Use it. + (file-notify-test00-availability): Rewrite. + (file-notify-test00-availability-remote): New defun. + (file-notify-test01-add-watch): Rewrite first erroneous check. + 2013-07-23 Glenn Morris * automated/inotify-test.el (inotify-file-watch-simple): === modified file 'test/automated/file-notify-tests.el' --- test/automated/file-notify-tests.el 2013-07-09 07:52:25 +0000 +++ test/automated/file-notify-tests.el 2013-07-24 13:56:19 +0000 @@ -47,13 +47,21 @@ tramp-message-show-message nil) (when noninteractive (defalias 'tramp-read-passwd 'ignore)) +;; We do not want to try and fail `file-notify-add-watch'. +(defconst file-notify--test-local-enabled file-notify--library + "Whether local file notification is enabled.") + +;; We need also a check on the remote side, w/o adding a file monitor. +(defun file-notify--test-remote-enabled () + "Whether remote file notification is enabled." + (ignore-errors + (and (file-remote-p file-notify-test-remote-temporary-file-directory) + (file-directory-p file-notify-test-remote-temporary-file-directory) + (file-writable-p file-notify-test-remote-temporary-file-directory)))) + (defmacro file-notify--deftest-remote (test docstring) "Define ert `TEST-remote' for remote files." - `(when (ignore-errors - (and - (file-remote-p file-notify-test-remote-temporary-file-directory) - (file-directory-p file-notify-test-remote-temporary-file-directory) - (file-writable-p file-notify-test-remote-temporary-file-directory))) + `(when (and (file-notify--test-remote-enabled) (ert-get-test ',test)) ;; Define the test. (ert-deftest ,(intern (concat (symbol-name test) "-remote")) () ,docstring @@ -77,10 +85,16 @@ (ert-deftest file-notify-test00-availability () "Test availability of `file-notify'." - :expected-result (if file-notify-support :passed :failed) - (should (memq file-notify-support '(gfilenotify inotify w32notify)))) - -(when file-notify-support + (let (desc) + ;; Check, that different valid parameters are accepted. + (should (setq desc (file-notify-add-watch + temporary-file-directory '(change) 'ignore))) + (file-notify-rm-watch desc))) + +(file-notify--deftest-remote file-notify-test00-availability + "Test availability of `file-notify' for remote files.") + +(when file-notify--test-local-enabled (ert-deftest file-notify-test01-add-watch () "Check `file-notify-add-watch'." @@ -99,9 +113,8 @@ (file-notify-rm-watch desc) ;; Check error handling. - (should - (equal (car (should-error (file-notify-add-watch 1 2 3 4))) - 'wrong-number-of-arguments)) + (should-error (file-notify-add-watch 1 2 3 4) + :type 'wrong-number-of-arguments) (should (equal (should-error (file-notify-add-watch 1 2 3)) '(wrong-type-argument 1))) @@ -116,7 +129,7 @@ (file-notify--deftest-remote file-notify-test01-add-watch "Check `file-notify-add-watch' for remote files.") - ) ;; file-notify-support + ) ;; file-notify--test-local-enabled (defun file-notify--test-event-test () "Ert test function to be called by `file-notify--test-event-handler'. @@ -147,7 +160,7 @@ (expand-file-name (make-temp-name "file-notify-test") temporary-file-directory)) -(when file-notify-support +(when file-notify--test-local-enabled (ert-deftest file-notify-test02-events () "Check file creation/removal notifications." @@ -189,13 +202,13 @@ (file-notify--deftest-remote file-notify-test02-events "Check file creation/removal notifications for remote files.") - ) ;; file-notify-support + ) ;; file-notify--test-local-enabled ;; autorevert runs only in interactive mode. (defvar auto-revert-remote-files) (setq auto-revert-remote-files t) (require 'autorevert) -(when (and file-notify-support (null noninteractive)) +(when (and file-notify--test-local-enabled (null noninteractive)) (ert-deftest file-notify-test03-autorevert () "Check autorevert via file notification. @@ -249,12 +262,12 @@ (file-notify--deftest-remote file-notify-test03-autorevert "Check autorevert via file notification for remote files. This test is skipped in batch mode.") - ) ;; (and file-notify-support (null noninteractive)) + ) ;; (and file-notify--test-local-enabled (null noninteractive)) (defun file-notify-test-all (&optional interactive) "Run all tests for \\[file-notify]." (interactive "p") - (when file-notify-support + (when file-notify--test-local-enabled (if interactive (ert-run-tests-interactively "^file-notify-") (ert-run-tests-batch "^file-notify-")))) ------------------------------------------------------------ revno: 113527 committer: Michael Albinus branch nick: trunk timestamp: Wed 2013-07-24 15:29:15 +0200 message: * filenotify.el (file-notify-supported-p): * net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p): Remove functions. * autorevert.el (auto-revert-use-notify): (auto-revert-notify-add-watch): * net/tramp.el (tramp-file-name-for-operation): * net/tramp-adb.el (tramp-adb-file-name-handler-alist): * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * net/tramp-sh.el (tramp-sh-file-name-handler-alist): * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Remove `file-notify-supported-p' entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 08:04:39 +0000 +++ lisp/ChangeLog 2013-07-24 13:29:15 +0000 @@ -1,3 +1,18 @@ +2013-07-24 Michael Albinus + + * filenotify.el (file-notify-supported-p): + * net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p): + Remove functions. + + * autorevert.el (auto-revert-use-notify): + (auto-revert-notify-add-watch): + * net/tramp.el (tramp-file-name-for-operation): + * net/tramp-adb.el (tramp-adb-file-name-handler-alist): + * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): + * net/tramp-sh.el (tramp-sh-file-name-handler-alist): + * net/tramp-smb.el (tramp-smb-file-name-handler-alist): + Remove `file-notify-supported-p' entry. + 2013-07-24 Glenn Morris * printing.el: Replace all uses of deleted ps-windows-system, === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-07-18 10:03:49 +0000 +++ lisp/autorevert.el 2013-07-24 13:29:15 +0000 @@ -271,9 +271,7 @@ :type 'boolean :version "24.4") -(defcustom auto-revert-use-notify - ;; We use the support of the local filesystem as default. - (file-notify-supported-p temporary-file-directory) +(defcustom auto-revert-use-notify t "If non-nil Auto Revert Mode uses file notification functions. You should set this variable through Custom." :group 'auto-revert @@ -512,8 +510,7 @@ (set (make-local-variable 'auto-revert-use-notify) nil)) (when (and buffer-file-name auto-revert-use-notify - (not auto-revert-notify-watch-descriptor) - (file-notify-supported-p buffer-file-name)) + (not auto-revert-notify-watch-descriptor)) (setq auto-revert-notify-watch-descriptor (ignore-errors (file-notify-add-watch === modified file 'lisp/filenotify.el' --- lisp/filenotify.el 2013-07-18 10:03:49 +0000 +++ lisp/filenotify.el 2013-07-24 13:29:15 +0000 @@ -190,17 +190,6 @@ (funcall callback (list desc action file file1)) (funcall callback (list desc action file))))))) -(defun file-notify-supported-p (file) - "Returns non-nil if filesystem pertaining to FILE could be watched." - (unless (stringp file) - (signal 'wrong-type-argument (list file))) - (setq file (expand-file-name file)) - - (let ((handler (find-file-name-handler file 'file-notify-supported-p))) - (if handler - (funcall handler 'file-notify-supported-p file) - (and file-notify--library t)))) - (defun file-notify-add-watch (file flags callback) "Add a watch for filesystem events pertaining to FILE. This arranges for filesystem events pertaining to FILE to be reported @@ -274,10 +263,11 @@ '("No file notification package available"))) ;; Determine low-level function to be called. - (setq func (cond - ((eq file-notify--library 'gfilenotify) 'gfile-add-watch) - ((eq file-notify--library 'inotify) 'inotify-add-watch) - ((eq file-notify--library 'w32notify) 'w32notify-add-watch))) + (setq func + (cond + ((eq file-notify--library 'gfilenotify) 'gfile-add-watch) + ((eq file-notify--library 'inotify) 'inotify-add-watch) + ((eq file-notify--library 'w32notify) 'w32notify-add-watch))) ;; Determine respective flags. (if (eq file-notify--library 'gfilenotify) === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-07-23 14:06:02 +0000 +++ lisp/net/tramp-adb.el 2013-07-24 13:29:15 +0000 @@ -110,7 +110,6 @@ (file-modes . tramp-handle-file-modes) (file-notify-add-watch . tramp-handle-file-notify-add-watch) (file-notify-rm-watch . ignore) - (file-notify-supported-p . ignore) (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) === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-07-23 14:06:02 +0000 +++ lisp/net/tramp-gvfs.el 2013-07-24 13:29:15 +0000 @@ -437,7 +437,6 @@ (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-handle-file-notify-add-watch) (file-notify-rm-watch . ignore) - (file-notify-supported-p . ignore) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-gvfs-handle-file-readable-p) (file-regular-p . tramp-handle-file-regular-p) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-07-18 10:03:49 +0000 +++ lisp/net/tramp-sh.el 2013-07-24 13:29:15 +0000 @@ -867,8 +867,7 @@ (set-file-acl . tramp-sh-handle-set-file-acl) (vc-registered . tramp-sh-handle-vc-registered) (file-notify-add-watch . tramp-sh-handle-file-notify-add-watch) - (file-notify-rm-watch . tramp-sh-handle-file-notify-rm-watch) - (file-notify-supported-p . tramp-sh-handle-file-notify-supported-p)) + (file-notify-rm-watch . tramp-sh-handle-file-notify-rm-watch)) "Alist of handler functions. Operations not mentioned here will be handled by the normal Emacs functions.") @@ -3499,13 +3498,6 @@ (tramp-message proc 6 (format "Kill %S" proc)) (kill-process proc)) -(defun tramp-sh-handle-file-notify-supported-p (file-name) - "Like `file-notify-supported-p' for Tramp files." - (with-parsed-tramp-file-name (expand-file-name file-name) nil - (and (or (tramp-get-remote-gvfs-monitor-dir v) - (tramp-get-remote-inotifywait v)) - t))) - ;;; Internal Functions: (defun tramp-maybe-send-script (vec script name) === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-07-23 14:06:02 +0000 +++ lisp/net/tramp-smb.el 2013-07-24 13:29:15 +0000 @@ -211,7 +211,6 @@ (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-handle-file-notify-add-watch) (file-notify-rm-watch . ignore) - (file-notify-supported-p . ignore) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-handle-file-exists-p) (file-regular-p . tramp-handle-file-regular-p) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-07-23 14:06:02 +0000 +++ lisp/net/tramp.el 2013-07-24 13:29:15 +0000 @@ -1980,7 +1980,7 @@ ;; Emacs 22+ only. 'set-file-times ;; Emacs 24+ only. - 'file-acl 'file-notify-add-watch 'file-notify-supported-p + 'file-acl 'file-notify-add-watch 'file-selinux-context 'set-file-acl 'set-file-selinux-context ;; XEmacs only. 'abbreviate-file-name 'create-file-buffer @@ -2036,8 +2036,9 @@ default-directory) ;; PROC. ((eq operation 'file-notify-rm-watch) - (with-current-buffer (process-buffer (nth 0 args)) - default-directory)) + (when (processp (nth 0 args)) + (with-current-buffer (process-buffer (nth 0 args)) + default-directory))) ;; Unknown file primitive. (t (error "unknown file I/O primitive: %s" operation)))) ------------------------------------------------------------ revno: 113526 committer: Michael Albinus branch nick: trunk timestamp: Wed 2013-07-24 15:10:38 +0200 message: * errors.texi (Standard Errors): Fix typo. * files.texi (Magic File Names): * os.texi (File Notifications): Remove file-notify-supported-p. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-07-24 06:21:07 +0000 +++ doc/lispref/ChangeLog 2013-07-24 13:10:38 +0000 @@ -1,3 +1,10 @@ +2013-07-24 Michael Albinus + + * errors.texi (Standard Errors): Fix typo. + + * files.texi (Magic File Names): + * os.texi (File Notifications): Remove file-notify-supported-p. + 2013-07-24 Paul Eggert * eval.texi (Special Forms): Mention 'lambda'. Also, say that === modified file 'doc/lispref/errors.texi' --- doc/lispref/errors.texi 2013-07-22 09:19:00 +0000 +++ doc/lispref/errors.texi 2013-07-24 13:10:38 +0000 @@ -126,7 +126,7 @@ @c filenotify.el @item file-notify-error This is a subcategory of @code{file-error}. It happens, when a file -could not be set to be watched for changes. @xref{File Notifications}. +could not be watched for changes. @xref{File Notifications}. @c net/ange-ftp.el @item ftp-error === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2013-07-22 09:19:00 +0000 +++ doc/lispref/files.texi 2013-07-24 13:10:38 +0000 @@ -2780,7 +2780,6 @@ @code{file-name-nondirectory}, @code{file-name-sans-versions}, @code{file-newer-than-file-p}, @code{file-notify-add-watch}, @code{file-notify-rm-watch}, -@code{file-notify-supported-p}, @code{file-ownership-preserved-p}, @code{file-readable-p}, @code{file-regular-p}, @code{file-remote-p}, @code{file-selinux-context}, @@ -2834,7 +2833,6 @@ @code{file-name-nondirec@discretionary{}{}{}tory}, @code{file-name-sans-versions}, @code{file-newer-than-file-p}, @code{file-notify-add-watch}, @code{file-notify-rm-watch}, -@code{file-notify-supported-p}, @code{file-ownership-pre@discretionary{}{}{}served-p}, @code{file-readable-p}, @code{file-regular-p}, @code{file-remote-p}, @code{file-selinux-context}, === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2013-07-22 09:19:00 +0000 +++ doc/lispref/os.texi 2013-07-24 13:10:38 +0000 @@ -2529,17 +2529,6 @@ changes, there is the Emacs library @code{filenotify} which provides a unique interface. -@defun file-notify-supported-p file -This function returns non-nil if the filesystem pertaining to -@var{file} could be watched. This means, that Emacs is linked with a -respective library (for local files), or Emacs has found an applicable -file notification process on a remote machine. - -Sometimes, mounted filesystems cannot be watched for file changes. -This is not detected by this function, a non-@code{nil} return value -does not guarantee that changes on @var{file} will be notified. -@end defun - @defun file-notify-add-watch file flags callback Add a watch for filesystem events pertaining to @var{file}. This arranges for filesystem events pertaining to @var{file} to be reported @@ -2553,6 +2542,10 @@ If the @var{file} cannot be watched for some reason, this function signals a @code{file-notify-error} error. +Sometimes, mounted filesystems cannot be watched for file changes. +This is not detected by this function, a non-@code{nil} return value +does not guarantee that changes on @var{file} will be notified. + @var{flags} is a list of conditions to set what will be watched for. It can include the following symbols: ------------------------------------------------------------ revno: 113525 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-07-24 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-07-23 10:17:48 +0000 +++ autogen/configure 2013-07-24 10:17:36 +0000 @@ -28773,13 +28773,10 @@ -ac_config_commands="$ac_config_commands mkdirs" - - -ac_config_commands="$ac_config_commands epaths" - - -ac_config_commands="$ac_config_commands gdbinit" +ac_config_commands="$ac_config_commands src/epaths.h" + + +ac_config_commands="$ac_config_commands src/.gdbinit" cat >confcache <<\_ACEOF @@ -29644,9 +29641,8 @@ "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;; "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; - "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; - "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; - "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; + "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;; + "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -30365,22 +30361,15 @@ done } ;; - "mkdirs":C) -for dir in etc lisp ; do - test -d ${dir} || mkdir ${dir} -done - ;; - "epaths":C) -echo creating src/epaths.h + "src/epaths.h":C) if test "${opsys}" = "mingw32"; then ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32 else ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force fi ;; - "gdbinit":C) + "src/.gdbinit":C) if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then - echo creating src/.gdbinit echo "source $srcdir/src/.gdbinit" > src/.gdbinit fi ;; ------------------------------------------------------------ revno: 113524 [merge] committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-07-24 16:08:03 +0800 message: Merge: Doc fix for ido.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 07:16:25 +0000 +++ lisp/ChangeLog 2013-07-24 08:04:39 +0000 @@ -36,6 +36,12 @@ 2013-07-24 Xue Fuqiao + * ido.el (ido-fractionp): + (ido-cache-ftp-work-directory-time, ido-max-prospects, ido-mode) + (ido-max-file-prompt-width, ido-unc-hosts-cache) + (ido-max-directory-size, ido-max-dir-file-cache) + (ido-decorations): Doc fix. + * ansi-color.el: Fix old URL. 2013-07-23 Michael R. Mauger === modified file 'lisp/ido.el' --- lisp/ido.el 2013-07-14 05:18:48 +0000 +++ lisp/ido.el 2013-07-24 08:00:36 +0000 @@ -161,10 +161,10 @@ ;; --------------- ;; ;; The standard way of completion with Unix-shells and Emacs is to insert a -;; PREFIX and then hitting TAB (or another completion key). Cause of this -;; behavior has become second nature to a lot of emacs users `ido' offers in +;; PREFIX and then hitting TAB (or another completion key). Cause of this +;; behavior has become second nature to a lot of Emacs users `ido' offers in ;; addition to the default substring-matching-method (look above) also the -;; prefix-matching-method. The kind of matching is the only difference to +;; prefix-matching-method. The kind of matching is the only difference to ;; the description of the substring-matching above. ;; ;; You can toggle prefix matching with C-p. @@ -271,7 +271,7 @@ ;; To use ido for all buffer and file selections in Emacs, customize the ;; variable `ido-everywhere'. -;; Using ido-like behavior in other lisp packages +;; Using ido-like behavior in other Lisp packages ;; ----------------------------------------------- ;; If you don't want to rely on the `ido-everywhere' functionality, @@ -312,7 +312,7 @@ ;; so I invented a common "ido-" namespace for the merged packages. ;; ;; This version is based on ido.el version 1.57 released on -;; gnu.emacs.sources adapted for emacs 22.1 to use command remapping +;; gnu.emacs.sources adapted for Emacs 22.1 to use command remapping ;; and optionally hooking the read-buffer and read-file-name functions. ;; ;; Prefix matching was added by Klaus Berndl based on @@ -328,6 +328,7 @@ ;; These are some things you might want to change. (defun ido-fractionp (n) + "Return t if N is a fraction." (and (numberp n) (> n 0.0) (<= n 1.0))) (defgroup ido nil @@ -340,13 +341,13 @@ ;;;###autoload (defcustom ido-mode nil - "Determines for which functional group \(buffer and files) ido behavior -should be enabled. The following values are possible: -- `buffer': Turn only on ido buffer behavior \(switching, killing, + "Determines for which buffer/file Ido should be enabled. +The following values are possible: +- `buffer': Turn only on ido buffer behavior (switching, killing, displaying...) -- `file': Turn only on ido file behavior \(finding, writing, inserting...) +- `file': Turn only on ido file behavior (finding, writing, inserting...) - `both': Turn on ido buffer and file behavior. -- `nil': Turn off any ido switching. +- nil: Turn off any ido switching. Setting this variable directly does not take effect; use either \\[customize] or the function `ido-mode'." @@ -528,15 +529,20 @@ :group 'ido) (defcustom ido-max-prospects 12 - "Non-zero means that the prospect list will be limited to that number of items. -For a long list of prospects, building the full list for the minibuffer can take a -non-negligible amount of time; setting this variable reduces that time." + "Upper limit of the prospect list if non-zero. +Zero means no limit for the prospect list. +For a long list of prospects, building the full list for the +minibuffer can take a non-negligible amount of time; setting this +variable reduces that time." :type 'integer :group 'ido) (defcustom ido-max-file-prompt-width 0.35 - "Non-zero means that the prompt string be limited to that number of characters. -If value is a floating point number, it specifies a fraction of the frame width." + "Upper limit of the prompt string. +If value is an integer, it specifies the number of characters of +the string. +If value is a floating point number, it specifies a fraction of +the frame width." :type '(choice (integer :tag "Characters" :value 20) (restricted-sexp :tag "Fraction of frame width" @@ -612,7 +618,8 @@ (defcustom ido-cache-ftp-work-directory-time 1.0 "Maximum time to cache contents of an ftp directory (in hours). -Use C-l in prompt to refresh list. +\\ +Use \\[ido-reread-directory] in prompt to refresh list. If zero, ftp directories are not cached." :type 'number :group 'ido) @@ -630,7 +637,7 @@ :group 'ido) (defvar ido-unc-hosts-cache t - "Cached value from `ido-unc-hosts' function.") + "Cached value from the function `ido-unc-hosts'.") (defcustom ido-unc-hosts nil "List of known UNC host names to complete after initial //. @@ -658,7 +665,8 @@ (defcustom ido-cache-unc-host-shares-time 8.0 "Maximum time to cache shares of an UNC host (in hours). -Use C-l in prompt to refresh list. +\\ +Use \\[ido-reread-directory] in prompt to refresh list. If zero, UNC host shares are not cached." :type 'number :group 'ido) @@ -704,20 +712,22 @@ (defcustom ido-max-dir-file-cache 100 "Maximum number of working directories to be cached. +\\ This is the size of the cache of `file-name-all-completions' results. Each cache entry is time stamped with the modification time of the directory. Some systems, like Windows, have unreliable directory modification times, so you may choose to disable caching on such systems, or explicitly refresh the cache contents using the command -`ido-reread-directory' command (C-l) in the minibuffer. +`ido-reread-directory' command (\\[ido-reread-directory]) in the minibuffer. See also `ido-dir-file-cache' and `ido-save-directory-list-file'." :type 'integer :group 'ido) (defcustom ido-max-directory-size nil "Maximum size (in bytes) for directories to use ido completion. +\\ If you enter a directory with a size larger than this size, ido will -not provide the normal completion. To show the completions, use C-a." +not provide the normal completion. To show the completions, use \\[ido-toggle-ignore]." :type '(choice (const :tag "No limit" nil) (integer :tag "Size in bytes" 30000)) :group 'ido) @@ -767,7 +777,8 @@ "List of strings used by ido to display the alternatives in the minibuffer. There are between 11 and 13 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, -3rd element is the separator between prospects (ignored if `ido-separator' is set), +3rd element is the separator between prospects (ignored if +`ido-separator' is set), 4th element is the string inserted at the end of a truncated list of prospects, 5th and 6th elements are used as brackets around the common match string which can be completed using TAB, ------------------------------------------------------------ revno: 113523 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-07-24 00:16:25 -0700 message: * printing.el: Replace all uses of deleted ps-flatten-list with lpr- version. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 07:06:24 +0000 +++ lisp/ChangeLog 2013-07-24 07:16:25 +0000 @@ -1,7 +1,7 @@ 2013-07-24 Glenn Morris * printing.el: Replace all uses of deleted ps-windows-system, - ps-lp-system with lpr- versions. + ps-lp-system, ps-flatten-list with lpr- versions. 2013-07-24 Stefan Monnier === modified file 'lisp/printing.el' --- lisp/printing.el 2013-07-24 07:06:24 +0000 +++ lisp/printing.el 2013-07-24 07:16:25 +0000 @@ -5667,7 +5667,7 @@ (defun pr-switches (switches mess) (or (listp switches) (error "%S should have a list of strings" mess)) - (ps-flatten-list ; dynamic evaluation + (lpr-flatten-list ; dynamic evaluation (mapcar 'ps-eval-switch switches))) ------------------------------------------------------------ revno: 113522 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-07-24 00:06:24 -0700 message: * printing.el: Replace all uses of deleted ps-windows-system, ps-lp-system with lpr- versions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-24 05:13:24 +0000 +++ lisp/ChangeLog 2013-07-24 07:06:24 +0000 @@ -1,3 +1,8 @@ +2013-07-24 Glenn Morris + + * printing.el: Replace all uses of deleted ps-windows-system, + ps-lp-system with lpr- versions. + 2013-07-24 Stefan Monnier * emacs-lisp/pcase.el (pcase--u1): Verify if self-quoting values can be === modified file 'lisp/printing.el' --- lisp/printing.el 2013-05-21 16:13:08 +0000 +++ lisp/printing.el 2013-07-24 07:06:24 +0000 @@ -1030,7 +1030,7 @@ (defconst pr-cygwin-system - (and ps-windows-system (getenv "OSTYPE") + (and lpr-windows-system (getenv "OSTYPE") (string-match "cygwin" (getenv "OSTYPE")))) @@ -1414,7 +1414,7 @@ (eval-and-compile (cond - (ps-windows-system + (lpr-windows-system ;; GNU Emacs for Windows 9x/NT (defun pr-menu-position (entry index horizontal) (let ((pos (cdr (mouse-pixel-position)))) @@ -1614,7 +1614,7 @@ "Ensure the proper directory separator depending on the OS. That is, if Emacs is running on DOS/Windows, ensure dos/windows-style directory separator; otherwise, ensure unix-style directory separator." - (if (or pr-cygwin-system ps-windows-system) + (if (or pr-cygwin-system lpr-windows-system) (subst-char-in-string ?/ ?\\ path) (subst-char-in-string ?\\ ?/ path))) @@ -1667,7 +1667,7 @@ (defcustom pr-path-style (if (and (not pr-cygwin-system) - ps-windows-system) + lpr-windows-system) 'windows 'unix) "Specify which path style to use for external commands. @@ -1778,7 +1778,7 @@ (defcustom pr-txt-printer-alist (list (list 'default lpr-command nil (cond ((boundp 'printer-name) printer-name) - (ps-windows-system "PRN") + (lpr-windows-system "PRN") (t nil) ))) ;; Examples: @@ -1923,8 +1923,8 @@ (defcustom pr-ps-printer-alist (list (list 'default lpr-command nil - (cond (ps-windows-system nil) - (ps-lp-system "-d") + (cond (lpr-windows-system nil) + (lpr-lp-system "-d") (t "-P")) (or (getenv "PRINTER") (getenv "LPDEST") ps-printer-name))) ;; Examples: @@ -2200,7 +2200,7 @@ ;; hacked from `temporary-file-directory' variable in files.el (file-name-as-directory (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") - (cond (ps-windows-system "c:/temp") + (cond (lpr-windows-system "c:/temp") (t "/tmp") ))))) "Specify a directory for temporary files during printing. @@ -2232,7 +2232,7 @@ (defcustom pr-gv-command - (if ps-windows-system + (if lpr-windows-system "gsview32.exe" "gv") "Specify path and name of the gsview/gv utility. @@ -2273,7 +2273,7 @@ (defcustom pr-gs-command - (if ps-windows-system + (if lpr-windows-system "gswin32.exe" "gs") "Specify path and name of the ghostscript utility. @@ -2299,7 +2299,7 @@ (defcustom pr-gs-switches - (if ps-windows-system + (if lpr-windows-system '("-q -dNOPAUSE -Ic:/gs/gs5.50;c:/gs/gs5.50/fonts") '("-q -dNOPAUSE -I/usr/share/ghostscript/5.10")) "Specify ghostscript switches. See the documentation on GS for more info. @@ -2341,7 +2341,7 @@ (defcustom pr-gs-device - (if ps-windows-system + (if lpr-windows-system "mswinpr2" "uniprint") "Specify the ghostscript device switch value (-sDEVICE=). @@ -4852,8 +4852,8 @@ (ps-comment-string "pr-ps-printer-switch" pr-ps-printer-switch) (ps-comment-string "pr-ps-printer " pr-ps-printer) (ps-comment-string "pr-cygwin-system " pr-cygwin-system) - (ps-comment-string "ps-windows-system " ps-windows-system) - (ps-comment-string "ps-lp-system " ps-lp-system) + (ps-comment-string "lpr-windows-system " lpr-windows-system) + (ps-comment-string "lpr-lp-system " lpr-lp-system) nil '(14 . pr-path-style) '(14 . pr-path-alist) @@ -5235,14 +5235,14 @@ pr-ps-printer (nth 3 ps)) (or (stringp pr-ps-command) (setq pr-ps-command - (cond (ps-windows-system "print") - (ps-lp-system "lp") + (cond (lpr-windows-system "print") + (lpr-lp-system "lp") (t "lpr") ))) (or (stringp pr-ps-printer-switch) (setq pr-ps-printer-switch - (cond (ps-windows-system "/D:") - (ps-lp-system "-d") + (cond (lpr-windows-system "/D:") + (lpr-lp-system "-d") (t "-P") ))) (pr-eval-alist (nthcdr 4 ps))) @@ -5260,8 +5260,8 @@ pr-txt-printer (nth 2 txt))) (or (stringp pr-txt-command) (setq pr-txt-command - (cond (ps-windows-system "print") - (ps-lp-system "lp") + (cond (lpr-windows-system "print") + (lpr-lp-system "lp") (t "lpr") ))) (pr-update-mode-line)) @@ -5825,7 +5825,7 @@ (defun pr-find-buffer-visiting (file) (if (not (file-directory-p file)) - (find-buffer-visiting (if ps-windows-system + (find-buffer-visiting (if lpr-windows-system (downcase file) file)) (let ((truename (file-truename file)) @@ -5939,7 +5939,7 @@ (pr-dosify-file-name (or (pr-find-command command) (pr-path-command (cond (pr-cygwin-system 'cygwin) - (ps-windows-system 'windows) + (lpr-windows-system 'windows) (t 'unix)) (file-name-nondirectory command) nil) @@ -5976,7 +5976,7 @@ (defun pr-find-command (cmd) - (if ps-windows-system + (if lpr-windows-system ;; windows system (let ((ext (cons (file-name-extension cmd t) (list ".exe" ".bat" ".com"))) ------------------------------------------------------------ revno: 113521 committer: Paul Eggert branch nick: trunk timestamp: Wed 2013-07-24 07:21:07 +0100 message: * src/eval.c (Fprogn): Do not check that BODY is a proper list. This undoes the previous change. The check slows down the interpreter, and is not needed to prevent a crash. See . * doc/lispref/eval.texi (Special Forms): Mention 'lambda'. Also, say that non-well-formed expressions result in unspecified behavior, though Emacs will not crash. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-07-22 09:19:00 +0000 +++ doc/lispref/ChangeLog 2013-07-24 06:21:07 +0000 @@ -1,3 +1,9 @@ +2013-07-24 Paul Eggert + + * eval.texi (Special Forms): Mention 'lambda'. Also, say that + non-well-formed expressions result in unspecified behavior, though + Emacs will not crash. + 2013-07-22 Michael Albinus * files.texi (Magic File Names): Add file-notify-add-watch, === modified file 'doc/lispref/eval.texi' --- doc/lispref/eval.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/eval.texi 2013-07-24 06:21:07 +0000 @@ -432,6 +432,14 @@ and which are used without evaluation. Whether a particular argument is evaluated may depend on the results of evaluating other arguments. + If an expression's first symbol is that of a special form, the +expression should follow the rules of that special form; otherwise, +Emacs's behavior is not well-defined (though it will not crash). For +example, @code{((lambda (x) x . 3) 4)} contains a subexpression that +begins with @code{lambda} but is not a well-formed @code{lambda} +expression, so Emacs may signal an error, or may return 3 or 4 or +@code{nil}, or may behave in other ways. + Here is a list, in alphabetical order, of all of the special forms in Emacs Lisp with a reference to where each is described. @@ -463,6 +471,9 @@ @item interactive @pxref{Interactive Call} +@item lambda +@pxref{Lambda Expressions} + @item let @itemx let* @pxref{Local Variables} === modified file 'etc/NEWS' --- etc/NEWS 2013-07-23 07:22:16 +0000 +++ etc/NEWS 2013-07-24 06:21:07 +0000 @@ -538,14 +538,6 @@ ** `visited-file-modtime' now returns -1 for nonexistent files. Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous in the presence of files with negative time stamps. - -** Special forms with implied progn now check for proper lists. -Starting in Emacs 21.4, a special form with an implied progn of an -improper list ignored the trailing value, treating it as nil. For -example, (cond (t (message "hello") . "there")) ignored the "there". -This inadvertent change to Emacs's behavior has been reverted, and -Emacs now signals an error for these improper forms, as it did in -version 21.3 and earlier. * Lisp Changes in Emacs 24.4 === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-23 23:00:43 +0000 +++ src/ChangeLog 2013-07-24 06:21:07 +0000 @@ -1,3 +1,10 @@ +2013-07-24 Paul Eggert + + * eval.c (Fprogn): Do not check that BODY is a proper list. + This undoes the previous change. The check slows down the + interpreter, and is not needed to prevent a crash. See + . + 2013-07-23 Glenn Morris * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists. === modified file 'src/eval.c' --- src/eval.c 2013-07-23 07:22:16 +0000 +++ src/eval.c 2013-07-24 06:21:07 +0000 @@ -454,12 +454,6 @@ body = XCDR (body); } - if (!NILP (body)) - { - /* This can happen if functions like Fcond are the caller. */ - wrong_type_argument (Qlistp, body); - } - UNGCPRO; return val; } ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.