+2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
+
+ * mini.texi (Completion Options): Add a link to Shell Options.
+ * misc.texi (Shell Mode): Move documentation of
+ shell-completion-fignore from Shell Mode to Shell Options.
+
2013-12-26 João Távora <joaotavora@gmail.com>
* emacs.texi (Matching): Describe new features of Electric Pair
mode.
disregards @code{completion-ignored-extensions} when showing
completion alternatives in the completion list.
+ Shell completion is an extended version of filename completion,
+@pxref{Shell Options}.
+
@vindex completion-auto-help
If @code{completion-auto-help} is set to @code{nil}, the completion
commands never display the completion list buffer; you must type
@item @key{TAB}
@kindex TAB @r{(Shell mode)}
@findex completion-at-point
+@cindex shell completion
Complete the command name or file name before point in the shell
buffer (@code{completion-at-point}). This uses the usual Emacs
completion rules (@pxref{Completion}), with the completion
alternatives being file names, environment variable names, the shell
command history, and history references (@pxref{History References}).
-
-@vindex shell-completion-fignore
-@vindex comint-completion-fignore
-The variable @code{shell-completion-fignore} specifies a list of file
-name extensions to ignore in Shell mode completion. The default
-setting is @code{nil}, but some users prefer @code{("~" "#" "%")} to
-ignore file names ending in @samp{~}, @samp{#} or @samp{%}. Other
-related Comint modes use the variable @code{comint-completion-fignore}
-instead.
+For options controlling the completion, @pxref{Shell Options}.
@item M-?
@kindex M-? @r{(Shell mode)}
If you set @code{shell-completion-execonly} to @code{nil},
it considers nonexecutable files as well.
+@vindex shell-completion-fignore
+@vindex comint-completion-fignore
+The variable @code{shell-completion-fignore} specifies a list of file
+name extensions to ignore in Shell mode completion. The default
+setting is @code{nil}, but some users prefer @code{("~" "#" "%")} to
+ignore file names ending in @samp{~}, @samp{#} or @samp{%}. Other
+related Comint modes use the variable @code{comint-completion-fignore}
+instead.
+
+@findex shell-dynamic-complete-command
+Some implementation details of the shell command completion may also be found
+in the lisp documentation of the @code{shell-dynamic-complete-command}
+function.
+
@findex shell-pushd-tohome
@findex shell-pushd-dextract
@findex shell-pushd-dunique
+2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
+
+ * shell.el Shell completion now matches executable filenames from
+ the current buffer's directory, on systems in which this behaviour
+ is the default (windows-nt, ms-dos).
+
2013-12-27 Glenn Morris <rgm@gnu.org>
* emacs-lisp/lisp-mode.el (lisp-mode-variables): Unbreak bootstrap.
(defun shell-dynamic-complete-command ()
"Dynamically complete the command at point.
This function is similar to `comint-dynamic-complete-filename', except that it
-searches `exec-path' (minus the trailing Emacs library path) for completion
+searches `exec-path' (minus trailing `exec-directory') for completion
candidates. Note that this may not be the same as the shell's idea of the
path.
-Completion is dependent on the value of `shell-completion-execonly', plus
-those that effect file completion.
+Completion is dependent on the value of `shell-completion-execonly',
+`shell-completion-fignore', plus those that affect file completion. See Info
+node `Shell Options'.
Returns t if successful."
(interactive)
(start (if (zerop (length filename)) (point) (match-beginning 0)))
(end (if (zerop (length filename)) (point) (match-end 0)))
(filenondir (file-name-nondirectory filename))
- (path-dirs (cdr (reverse exec-path))) ;FIXME: Why `cdr'?
+ ; why cdr? see `shell-dynamic-complete-command'
+ (path-dirs (append (cdr (reverse exec-path))
+ (if (memq system-type '(windows-nt ms-dos)) '("."))))
(cwd (file-name-as-directory (expand-file-name default-directory)))
(ignored-extensions
(and comint-completion-fignore
+2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
+
+ * callproc.c (Vexec_path): Document that exec-directory is in it.
+
2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
* nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
DEFVAR_LISP ("exec-path", Vexec_path,
doc: /* List of directories to search programs to run in subprocesses.
-Each element is a string (directory name) or nil (try default directory). */);
+Each element is a string (directory name) or nil (try default directory).
+
+By default the last element of this list is `exec-directory'. The
+last element is not always used, for example in shell completion
+(`shell-dynamic-complete-command'). */);
DEFVAR_LISP ("exec-suffixes", Vexec_suffixes,
doc: /* List of suffixes to try to find executable file names.