Commit 6b780a2e authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from origin/emacs-25

9ba51edf Document buffer-swap-text+save-excursion interaction
452aa949 Fix eieio vs cl-generic incompatibilities found in Rudel (bug...
248d5dd1 Include cl-generic in package--builtin-versions (bug#22817)
8f5a8b69 Improve timing in `tramp-test29-environment-variables'
05ba7a0f Add test for handling environment variables in Tramp
e393d4f4 * lisp/emacs-lisp/package.el (describe-package-1) (package-st...
5e388870 ; * lisp/net/tramp.el: Fix 2010-10-04 comment typo.  (Bug#23913)
90f21696 ; Spelling fixes
069fc05b Improve documentation of search functions
0a0144a2 Delete environment variables in Tramp when needed
f6246717 Add "New in Emacs 25" section to the FAQ
658daf93 Fix 'vertical-motion' in non-interactive sessions
686b520f Fix memory leak in imagemagick-types
4069b716 Update ELisp manual to match 'string-collate-equalp' doc string
1b2d6a6f Clarify docstring of find-feature-regexp
aac62a67 Add details to cl-lib defining macros' docstrings
d6aa4da8 Clarify doc string of 'save-buffer'
03bcf116 Un-confuse doc string of 'string-collate-equalp'
c53135b6 Clarify documentation of 'mouse-on-link-p'

# Conflicts:
#	lisp/emacs-lisp/eieio-core.el
parents 95c6606a 9ba51edf
......@@ -1211,6 +1211,12 @@ swapped as well: the positions of point and mark, all the markers, the
overlays, the text properties, the undo list, the value of the
@code{enable-multibyte-characters} flag (@pxref{Text Representations,
enable-multibyte-characters}), etc.
@strong{Warning:} If this function is called from within a
@code{save-excursion} form, the current buffer will be set to
@var{buffer} upon leaving the form, since the marker used by
@code{save-excursion} to save the position and buffer will be swapped
as well.
@end defun
If you use @code{buffer-swap-text} on a file-visiting buffer, you
......
......@@ -44,7 +44,7 @@ Searching and Replacement, emacs, The GNU Emacs Manual}.
buffer is multibyte; they convert the search string to unibyte if the
buffer is unibyte. @xref{Text Representations}.
@deffn Command search-forward string &optional limit noerror repeat
@deffn Command search-forward string &optional limit noerror count
This function searches forward from point for an exact match for
@var{string}. If successful, it sets point to the end of the occurrence
found, and returns the new value of point. If no match is found, the
......@@ -95,24 +95,24 @@ The argument @var{noerror} only affects valid searches which fail to
find a match. Invalid arguments cause errors regardless of
@var{noerror}.
If @var{repeat} is a positive number @var{n}, it serves as a repeat
count: the search is repeated @var{n} times, each time starting at the
end of the previous time's match. If these successive searches
succeed, the function succeeds, moving point and returning its new
value. Otherwise the search fails, with results depending on the
value of @var{noerror}, as described above. If @var{repeat} is a
negative number -@var{n}, it serves as a repeat count of @var{n} for a
search in the opposite (backward) direction.
If @var{count} is a positive number @var{n}, the search is done
@var{n} times; each successive search starts at the end of the
previous match. If all these successive searches succeed, the
function call succeeds, moving point and returning its new value.
Otherwise the function call fails, with results depending on the value
of @var{noerror}, as described above. If @var{count} is a negative
number -@var{n}, the search is done @var{n} times in the opposite
(backward) direction.
@end deffn
@deffn Command search-backward string &optional limit noerror repeat
@deffn Command search-backward string &optional limit noerror count
This function searches backward from point for @var{string}. It is
like @code{search-forward}, except that it searches backwards rather
than forwards. Backward searches leave point at the beginning of the
match.
@end deffn
@deffn Command word-search-forward string &optional limit noerror repeat
@deffn Command word-search-forward string &optional limit noerror count
This function searches forward from point for a word match for
@var{string}. If it finds a match, it sets point to the end of the
match found, and returns the new value of point.
......@@ -156,8 +156,10 @@ returns @code{nil} instead of signaling an error. If @var{noerror} is
neither @code{nil} nor @code{t}, it moves point to @var{limit} (or the
end of the accessible portion of the buffer) and returns @code{nil}.
If @var{repeat} is non-@code{nil}, then the search is repeated that many
times. Point is positioned at the end of the last match.
If @var{count} is a positive number, it specifies how many successive
occurrences to search for. Point is positioned at the end of the last
match. If @var{count} is a negative number, the search is backward
and point is positioned at the beginning of the last match.
@findex word-search-regexp
Internally, @code{word-search-forward} and related functions use the
......@@ -165,7 +167,7 @@ function @code{word-search-regexp} to convert @var{string} to a
regular expression that ignores punctuation.
@end deffn
@deffn Command word-search-forward-lax string &optional limit noerror repeat
@deffn Command word-search-forward-lax string &optional limit noerror count
This command is identical to @code{word-search-forward}, except that
the beginning or the end of @var{string} need not match a word
boundary, unless @var{string} begins or ends in whitespace.
......@@ -173,14 +175,14 @@ For instance, searching for @samp{ball boy} matches @samp{ball boyee},
but does not match @samp{balls boy}.
@end deffn
@deffn Command word-search-backward string &optional limit noerror repeat
@deffn Command word-search-backward string &optional limit noerror count
This function searches backward from point for a word match to
@var{string}. This function is just like @code{word-search-forward}
except that it searches backward and normally leaves point at the
beginning of the match.
@end deffn
@deffn Command word-search-backward-lax string &optional limit noerror repeat
@deffn Command word-search-backward-lax string &optional limit noerror count
This command is identical to @code{word-search-backward}, except that
the beginning or the end of @var{string} need not match a word
boundary, unless @var{string} begins or ends in whitespace.
......@@ -1005,7 +1007,7 @@ only the search functions useful in programs. The principal one is
the buffer is multibyte; they convert the regular expression to unibyte
if the buffer is unibyte. @xref{Text Representations}.
@deffn Command re-search-forward regexp &optional limit noerror repeat
@deffn Command re-search-forward regexp &optional limit noerror count
This function searches forward in the current buffer for a string of
text that is matched by the regular expression @var{regexp}. The
function skips over any amount of text that is not matched by
......@@ -1014,14 +1016,12 @@ It returns the new value of point.
If @var{limit} is non-@code{nil}, it must be a position in the current
buffer. It specifies the upper bound to the search. No match
extending after that position is accepted.
extending after that position is accepted. If @var{limit} is omitted
or @code{nil}, it defaults to the end of the accessible portion of the
buffer.
If @var{repeat} is supplied, it must be a positive number; the search
is repeated that many times; each repetition starts at the end of the
previous match. If all these successive searches succeed, the search
succeeds, moving point and returning its new value. Otherwise the
search fails. What @code{re-search-forward} does when the search
fails depends on the value of @var{noerror}:
What @code{re-search-forward} does when the search fails depends on
the value of @var{noerror}:
@table @asis
@item @code{nil}
......@@ -1033,6 +1033,19 @@ Move point to @var{limit} (or the end of the accessible portion of the
buffer) and return @code{nil}.
@end table
The argument @var{noerror} only affects valid searches which fail to
find a match. Invalid arguments cause errors regardless of
@var{noerror}.
If @var{count} is a positive number @var{n}, the search is done
@var{n} times; each successive search starts at the end of the
previous match. If all these successive searches succeed, the
function call succeeds, moving point and returning its new value.
Otherwise the function call fails, with results depending on the value
of @var{noerror}, as described above. If @var{count} is a negative
number -@var{n}, the search is done @var{n} times in the opposite
(backward) direction.
In the following example, point is initially before the @samp{T}.
Evaluating the search call moves point to the end of that line (between
the @samp{t} of @samp{hat} and the newline).
......@@ -1057,7 +1070,7 @@ comes back" twice.
@end example
@end deffn
@deffn Command re-search-backward regexp &optional limit noerror repeat
@deffn Command re-search-backward regexp &optional limit noerror count
This function searches backward in the current buffer for a string of
text that is matched by the regular expression @var{regexp}, leaving
point at the beginning of the first text found.
......@@ -1228,13 +1241,13 @@ non-greedy repetition operators (@pxref{Regexp Special, non-greedy}).
This is because POSIX backtracking conflicts with the semantics of
non-greedy repetition.
@deffn Command posix-search-forward regexp &optional limit noerror repeat
@deffn Command posix-search-forward regexp &optional limit noerror count
This is like @code{re-search-forward} except that it performs the full
backtracking specified by the POSIX standard for regular expression
matching.
@end deffn
@deffn Command posix-search-backward regexp &optional limit noerror repeat
@deffn Command posix-search-backward regexp &optional limit noerror count
This is like @code{re-search-backward} except that it performs the full
backtracking specified by the POSIX standard for regular expression
matching.
......
......@@ -503,8 +503,9 @@ the codeset part of the locale cannot be @code{"UTF-8"} on MS-Windows.
If your system does not support a locale environment, this function
behaves like @code{string-equal}.
Do @emph{not} use this function to compare file names for equality, only
for sorting them.
Do @emph{not} use this function to compare file names for equality, as
filesystems generally don't honor linguistic equivalence of strings
that collation implements.
@end defun
@defun string-prefix-p string1 string2 &optional ignore-case
......
......@@ -931,6 +931,7 @@ status of its latest version.
@menu
* Origin of the term Emacs::
* Latest version of Emacs::
* New in Emacs 25::
* New in Emacs 24::
* New in Emacs 23::
* New in Emacs 22::
......@@ -977,9 +978,9 @@ conventions}).
@cindex Bazaar repository, Emacs
Emacs @value{EMACSVER} is the current version as of this writing. A version
number with two components (e.g., @samp{22.1}) indicates a released
number with two components (e.g., @samp{24.5}) indicates a released
version; three components indicate a development
version (e.g., @samp{23.0.50} is what will eventually become @samp{23.1}).
version (e.g., @samp{26.0.50} is what will eventually become @samp{26.1}).
Emacs is under active development, hosted at
@uref{http://savannah.gnu.org/projects/emacs/, Savannah}.
......@@ -998,6 +999,106 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). As of Emacs 22,
you can give this command a prefix argument to read about which features
were new in older versions.
@node New in Emacs 25
@section What is different about Emacs 25?
@cindex Differences between Emacs 24 and Emacs 25
@cindex Emacs 25, new features in
@itemize
@cindex xwidgets
@item
Emacs can now embed native widgets inside Emacs buffers, if you have
gtk3 and webkitgtk3 installed. E.g., to access the embedded webkit
browser widget, type @kbd{M-x xwidget-webkit-browse-url}.
@cindex loadable modules
@item
Emacs can now dynamically load external modules compiled as shared
libraries.
@cindex Unicode characters, typing easily
@item
@kbd{C-x 8} has new shorthands for several popular characters, type
@kbd{C-x 8 C-h} to list shorthands.
@cindex automatic display of Lisp APIs
@item
A new minor mode @code{global-eldoc-mode} is enabled by default, and
shows in the echo area or in the mode line the argument list of the
Emacs Lisp form at point.
@cindex pasting text on text terminals
@cindex bracketed paste mode
@item
On text terminals that support the ``bracketed paste mode'' EMacs now
uses that mode by default. This mode allows Emacs to distinguish
between pasted text and text typed by the user.
@cindex Unicode 9.0.0
@item
Emacs 25 comes with data files imported from the latest Unicode
Standard version 9.0.0.
@cindex bidirectional editing
@item
The support for bidirectional editing was updated to include all the
features mandated by the latest Unicode Standard version 9.0.0.
@cindex character folding in searches
@item
Search command can now perform character folding in matches. This is
analogous to case folding, but instead of disregarding case variants,
it disregards wider classes of distinctions between similar
characters, such as matching different variants of double quote
characters, ignoring diacritics, etc.
@cindex eww
@item
The Emacs Web Browser EWW was extended to render text using
variable-pitch fonts, and got other new features.
@cindex rmail, and HTML mails
@item
Rmail can now render HTML mail messages, if Emacs is built with
libxml2 or if you have the Lynx browser installed.
@cindex support for push commands in VC
@item
VC now has basic support for @code{push} commands, implemented for
Bzr, Git, and Hg.
@cindex hide-ifdef, C/C@t{++} expressions in macros
@item
Hide-IfDef mode now support full C/C@t{++} expressions in macros,
macro argument expansion, interactive macro evaluation and automatic
scanning of @code{#define}d symbols.
@cindex xref
@item
New package Xref replaces Etags's front-end and UI. Xref provides a
generic framework and new commands to find and move to definitions of
functions, macros, data structures etc., as well as go back to the
location where you were before moving to a definition. It supersedes
and obsoletes many Etags commands, while still using the etags.el code
that reads the TAGS tables as one of its back-ends. As result, the
popular key bindings @kbd{M-.} and @kbd{M-,} have been changed to
invoke Xref commands.
@cindex project
@item
The new package Project provides generic infrastructure for dealing
with projects.
@cindex horizontal scroll bars
@item
Emacs can now draw horizontal scroll bars on some platforms that
provide toolkit scroll bars, namely Gtk+, Lucid, Motif and Windows.
@end itemize
Consult the Emacs @file{NEWS} file (@kbd{C-h n}) for the full list of
changes in Emacs 25.
@node New in Emacs 24
@section What is different about Emacs 24?
@cindex Differences between Emacs 23 and Emacs 24
......
......@@ -958,13 +958,13 @@ occurrence of the failure. So far, the failure has been observed with
GTK+ versions 3.4.2, 3.14.5 and 3.18.7. However, another 3.4.2 build
does not exhibit the bug.
Some window managers (xfce) apparently work around this failure by
Some window managers (Xfce) apparently work around this failure by
cropping the menu bar. With other windows managers, it's possible to
shrink the frame manually after the problem occurs, e.g. by dragging the
frame's border with the mouse. However, some window managers have been
reported to refuse such attempts and snap back to the width needed to
show the full menu bar (wmii) or at least cause the screen to flicker
during such resizing attempts (i3, icewm).
during such resizing attempts (i3, IceWM).
See also http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15700,
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22000,
......
......@@ -86,6 +86,11 @@
;;; Code:
;; The autoloads.el mechanism which adds package--builtin-versions
;; maintenance to loaddefs.el doesn't work for preloaded packages (such
;; as this one), so we have to do it by hand!
(push (purecopy '(cl-generic 1 0)) package--builtin-versions)
;; Note: For generic functions that dispatch on several arguments (i.e. those
;; which use the multiple-dispatch feature), we always use the same "tagcodes"
;; and the same set of arguments on which to dispatch. This works, but is
......@@ -697,6 +702,15 @@ FUN is the function that should be called when METHOD calls
(setq fun (cl-generic-call-method generic method fun)))
fun)))))
(defun cl-generic-apply (generic args)
"Like `apply' but takes a cl-generic object rather than a function."
;; Handy in cl-no-applicable-method, for example.
;; In Common Lisp, generic-function objects are funcallable. Ideally
;; we'd want the same in Elisp, but it would either require using a very
;; different (and less efficient) representation of cl--generic objects,
;; or non-trivial changes in the general infrastructure (compiler and such).
(apply (cl--generic-name generic) args))
(defun cl--generic-arg-specializer (method dispatch-arg)
(or (if (integerp dispatch-arg)
(nth dispatch-arg
......
......@@ -327,6 +327,20 @@ FORM is of the form (ARGS . BODY)."
Like normal `defun', except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (cl-block NAME ...).
The full form of a Common Lisp function argument list is
(VAR...
[&optional (VAR [INITFORM [SVAR]])...]
[&rest|&body VAR]
[&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
[&aux (VAR [INITFORM])...])
VAR maybe be replaced recursively with an argument list for
destructing, `&whole' is supported within these sublists. If
SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
written simply `VAR'. See the Info node `(cl)Argument Lists' for
more details.
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
(declare (debug
;; Same as defun but use cl-lambda-list.
......@@ -406,6 +420,21 @@ and BODY is implicitly surrounded by (cl-block NAME ...).
Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (cl-block NAME ...).
The full form of a Common Lisp macro argument list is
(VAR...
[&optional (VAR [INITFORM [SVAR]])...]
[&rest|&body VAR]
[&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
[&aux (VAR [INITFORM])...]
[&environment VAR])
VAR maybe be replaced recursively with an argument list for
destructing, `&whole' is supported within these sublists. If
SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
written simply `VAR'. See the Info node `(cl)Argument Lists' for
more details.
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
(declare (debug
(&define name cl-macro-list cl-declarations-or-string def-body))
......
......@@ -188,7 +188,8 @@ Summary:
(`no-applicable-method
(setq method 'cl-no-applicable-method)
(setq specializers `(generic ,@specializers))
(lambda (generic arg &rest args) (apply code arg generic args)))
(lambda (generic arg &rest args)
(apply code arg (cl--generic-name generic) (cons arg args))))
(_ code))))
(cl-generic-define-method
method (unless (memq kind '(nil :primary)) (list kind))
......
......@@ -971,7 +971,7 @@ If a consistent order does not exist, signal an error."
(defun eieio--class-precedence-c3 (class)
"Return all parents of CLASS in c3 order."
(let ((parents (eieio--class-parents (cl--find-class class))))
(let ((parents (eieio--class-parents class)))
(eieio--c3-merge-lists
(list class)
(append
......
......@@ -105,7 +105,7 @@ Please send improvements and fixes to the maintainer."
(defcustom find-feature-regexp
(concat ";;; Code:")
"The regexp used by `xref-find-definitions' when searching for a feature definition.
Note it must contain a `%s' at the place where `format'
Note it may contain up to one `%s' at the place where `format'
should insert the feature name."
;; We search for ";;; Code" rather than (feature '%s) because the
;; former is near the start of the code, and the latter is very
......
......@@ -2259,13 +2259,13 @@ Otherwise no newline is inserted."
(package--print-help-section "Status")
(cond (built-in
(insert (propertize (capitalize status)
'font-lock-face 'package-status-builtin-face)
'font-lock-face 'package-status-built-in)
"."))
(pkg-dir
(insert (propertize (if (member status '("unsigned" "dependency"))
"Installed"
(capitalize status))
'font-lock-face 'package-status-builtin-face))
'font-lock-face 'package-status-built-in))
(insert (substitute-command-keys " in `"))
(let ((dir (abbreviate-file-name
(file-name-as-directory
......@@ -2278,7 +2278,7 @@ Otherwise no newline is inserted."
(insert (substitute-command-keys
"',\n shadowing a ")
(propertize "built-in package"
'font-lock-face 'package-status-builtin-face))
'font-lock-face 'package-status-built-in))
(insert (substitute-command-keys "'")))
(if signed
(insert ".")
......@@ -2830,13 +2830,14 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
"Face used on package description summaries in the package menu."
:version "25.1")
;; Shame this hyphenates "built-in", when "font-lock-builtin-face" doesn't.
(defface package-status-built-in
'((t :inherit font-lock-builtin-face))
"Face used on the status and version of built-in packages."
:version "25.1")
(defface package-status-external
'((t :inherit package-status-builtin-face))
'((t :inherit package-status-built-in))
"Face used on the status and version of external packages."
:version "25.1")
......
......@@ -4700,14 +4700,20 @@ By default, makes the previous version into a backup file
Prefixed with one \\[universal-argument], marks this version
to become a backup when the next save is done.
Prefixed with two \\[universal-argument]'s,
unconditionally makes the previous version into a backup file.
makes the previous version into a backup file.
Prefixed with three \\[universal-argument]'s, marks this version
to become a backup when the next save is done,
and unconditionally makes the previous version into a backup file.
and makes the previous version into a backup file.
With a numeric prefix argument of 0, never make the previous version
into a backup file.
Note that the various variables that control backups, such
as `version-control', `backup-enable-predicate', `vc-make-backup-files',
and `backup-inhibited', to name just the more popular ones, still
control whether a backup will actually be produced, even when you
invoke this command prefixed with two or three \\[universal-argument]'s.
If a file's name is FOO, the names of its numbered backup versions are
FOO.~i~ for various integers i. A non-numbered backup file is called FOO~.
Numeric backups (rather than FOO~) will be made if value of
......
......@@ -1628,10 +1628,17 @@ Used in `word-search-forward', `word-search-backward',
"Search backward from point for STRING, ignoring differences in punctuation.
Set point to the beginning of the occurrence found, and return point.
An optional second argument bounds the search; it is a buffer position.
The match found must not extend before that position.
The match found must not begin before that position. A value of nil
means search to the beginning of the accessible portion of the buffer.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences.
If not nil and not t, position at limit of search and return nil.
Optional fourth argument COUNT, if a positive number, means to search
for COUNT successive occurrences. If COUNT is negative, search
forward, instead of backward, for -COUNT occurrences. A value of
nil means the same as 1.
With COUNT positive, the match found is the COUNTth to last one (or
last, if COUNT is 1 or nil) in the buffer located entirely before
the origin of the search; correspondingly with COUNT negative.
Relies on the function `word-search-regexp' to convert a sequence
of words in STRING to a regexp used to search words without regard
......@@ -1645,10 +1652,17 @@ has no effect on it."
"Search forward from point for STRING, ignoring differences in punctuation.
Set point to the end of the occurrence found, and return point.
An optional second argument bounds the search; it is a buffer position.
The match found must not extend after that position.
The match found must not end after that position. A value of nil
means search to the end of the accessible portion of the buffer.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences.
Optional fourth argument COUNT, if a positive number, means to search
for COUNT successive occurrences. If COUNT is negative, search
backward, instead of forward, for -COUNT occurrences. A value of
nil means the same as 1.
With COUNT positive, the match found is the COUNTth one (or first,
if COUNT is 1 or nil) in the buffer located entirely after the
origin of the search; correspondingly with COUNT negative.
Relies on the function `word-search-regexp' to convert a sequence
of words in STRING to a regexp used to search words without regard
......@@ -1666,10 +1680,17 @@ Unlike `word-search-backward', the end of STRING need not match a word
boundary, unless STRING ends in whitespace.
An optional second argument bounds the search; it is a buffer position.
The match found must not extend before that position.
The match found must not begin before that position. A value of nil
means search to the beginning of the accessible portion of the buffer.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences.
If not nil and not t, position at limit of search and return nil.
Optional fourth argument COUNT, if a positive number, means to search
for COUNT successive occurrences. If COUNT is negative, search
forward, instead of backward, for -COUNT occurrences. A value of
nil means the same as 1.
With COUNT positive, the match found is the COUNTth to last one (or
last, if COUNT is 1 or nil) in the buffer located entirely before
the origin of the search; correspondingly with COUNT negative.
Relies on the function `word-search-regexp' to convert a sequence
of words in STRING to a regexp used to search words without regard
......@@ -1687,10 +1708,17 @@ Unlike `word-search-forward', the end of STRING need not match a word
boundary, unless STRING ends in whitespace.
An optional second argument bounds the search; it is a buffer position.
The match found must not extend after that position.
The match found must not end after that position. A value of nil
means search to the end of the accessible portion of the buffer.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences.
Optional fourth argument COUNT, if a positive number, means to search
for COUNT successive occurrences. If COUNT is negative, search
backward, instead of forward, for -COUNT occurrences. A value of
nil means the same as 1.
With COUNT positive, the match found is the COUNTth one (or first,
if COUNT is 1 or nil) in the buffer located entirely after the
origin of the search; correspondingly with COUNT negative.
Relies on the function `word-search-regexp' to convert a sequence
of words in STRING to a regexp used to search words without regard
......
......@@ -744,8 +744,9 @@ its value is returned."
(defun mouse-on-link-p (pos)
"Return non-nil if POS is on a link in the current buffer.
POS must be a buffer position in the current buffer or a mouse
event location in the selected window (see `event-start').
POS must specify a buffer position in the current buffer, as a list
of the form returned by the `event-start' and `event-end' functions,
or a mouse event location in the selected window (see `event-start').
However, if `mouse-1-click-in-non-selected-windows' is non-nil,
POS may be a mouse event location in any window.
......
......@@ -2877,18 +2877,23 @@ the result will be a local, non-Tramp, file name."
tramp-initial-end-of-output))
;; We use as environment the difference to toplevel
;; `process-environment'.
env
(env
(dolist
(elt
(cons prompt (nreverse (copy-sequence process-environment)))
env)
(or (member elt (default-toplevel-value 'process-environment))
(setq env (cons elt env)))))
env uenv
(env (dolist (elt (cons prompt process-environment) env)
(or (member elt (default-toplevel-value 'process-environment))
(if (string-match "=" elt)
(setq env (append env `(,elt)))
(if (tramp-get-env-with-u-option v)
(setq env (append `("-u" ,elt) env))
(setq uenv (cons elt uenv)))))))