diff options
| author | Paul Eggert | 2016-08-05 14:09:08 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-08-05 14:09:08 -0700 |
| commit | 6b780a2e97c032d1749f190e0f5cfbbce99d0a60 (patch) | |
| tree | 18287633d9eb2d63d8badf035144e8a3143c00db | |
| parent | 95c6606a477e017ed7b418fcc81fd937895fee20 (diff) | |
| parent | 9ba51edf62b25c678508a316ec78a09b18d3bf9e (diff) | |
| download | emacs-6b780a2e97c032d1749f190e0f5cfbbce99d0a60.tar.gz emacs-6b780a2e97c032d1749f190e0f5cfbbce99d0a60.zip | |
Merge from origin/emacs-25
9ba51ed Document buffer-swap-text+save-excursion interaction
452aa94 Fix eieio vs cl-generic incompatibilities found in Rudel (bug...
248d5dd Include cl-generic in package--builtin-versions (bug#22817)
8f5a8b6 Improve timing in `tramp-test29-environment-variables'
05ba7a0 Add test for handling environment variables in Tramp
e393d4f * lisp/emacs-lisp/package.el (describe-package-1) (package-st...
5e38887 ; * lisp/net/tramp.el: Fix 2010-10-04 comment typo. (Bug#23913)
90f2169 ; Spelling fixes
069fc05 Improve documentation of search functions
0a0144a Delete environment variables in Tramp when needed
f624671 Add "New in Emacs 25" section to the FAQ
658daf9 Fix 'vertical-motion' in non-interactive sessions
686b520 Fix memory leak in imagemagick-types
4069b71 Update ELisp manual to match 'string-collate-equalp' doc string
1b2d6a6 Clarify docstring of find-feature-regexp
aac62a6 Add details to cl-lib defining macros' docstrings
d6aa4da Clarify doc string of 'save-buffer'
03bcf11 Un-confuse doc string of 'string-collate-equalp'
c53135b Clarify documentation of 'mouse-on-link-p'
# Conflicts:
# lisp/emacs-lisp/eieio-core.el
| -rw-r--r-- | doc/lispref/buffers.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/searching.texi | 67 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 5 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 105 | ||||
| -rw-r--r-- | etc/PROBLEMS | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 14 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 29 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-compat.el | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-core.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 9 | ||||
| -rw-r--r-- | lisp/files.el | 10 | ||||
| -rw-r--r-- | lisp/isearch.el | 48 | ||||
| -rw-r--r-- | lisp/mouse.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 48 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 2 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/fns.c | 3 | ||||
| -rw-r--r-- | src/image.c | 8 | ||||
| -rw-r--r-- | src/indent.c | 1 | ||||
| -rw-r--r-- | src/search.c | 85 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 126 |
22 files changed, 467 insertions, 119 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 1f7f263fb21..740d7cfd8a1 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -1211,6 +1211,12 @@ swapped as well: the positions of point and mark, all the markers, the | |||
| 1211 | overlays, the text properties, the undo list, the value of the | 1211 | overlays, the text properties, the undo list, the value of the |
| 1212 | @code{enable-multibyte-characters} flag (@pxref{Text Representations, | 1212 | @code{enable-multibyte-characters} flag (@pxref{Text Representations, |
| 1213 | enable-multibyte-characters}), etc. | 1213 | enable-multibyte-characters}), etc. |
| 1214 | |||
| 1215 | @strong{Warning:} If this function is called from within a | ||
| 1216 | @code{save-excursion} form, the current buffer will be set to | ||
| 1217 | @var{buffer} upon leaving the form, since the marker used by | ||
| 1218 | @code{save-excursion} to save the position and buffer will be swapped | ||
| 1219 | as well. | ||
| 1214 | @end defun | 1220 | @end defun |
| 1215 | 1221 | ||
| 1216 | If you use @code{buffer-swap-text} on a file-visiting buffer, you | 1222 | If you use @code{buffer-swap-text} on a file-visiting buffer, you |
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 644716a95c7..a04e6938cef 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -44,7 +44,7 @@ Searching and Replacement, emacs, The GNU Emacs Manual}. | |||
| 44 | buffer is multibyte; they convert the search string to unibyte if the | 44 | buffer is multibyte; they convert the search string to unibyte if the |
| 45 | buffer is unibyte. @xref{Text Representations}. | 45 | buffer is unibyte. @xref{Text Representations}. |
| 46 | 46 | ||
| 47 | @deffn Command search-forward string &optional limit noerror repeat | 47 | @deffn Command search-forward string &optional limit noerror count |
| 48 | This function searches forward from point for an exact match for | 48 | This function searches forward from point for an exact match for |
| 49 | @var{string}. If successful, it sets point to the end of the occurrence | 49 | @var{string}. If successful, it sets point to the end of the occurrence |
| 50 | found, and returns the new value of point. If no match is found, the | 50 | 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 | |||
| 95 | find a match. Invalid arguments cause errors regardless of | 95 | find a match. Invalid arguments cause errors regardless of |
| 96 | @var{noerror}. | 96 | @var{noerror}. |
| 97 | 97 | ||
| 98 | If @var{repeat} is a positive number @var{n}, it serves as a repeat | 98 | If @var{count} is a positive number @var{n}, the search is done |
| 99 | count: the search is repeated @var{n} times, each time starting at the | 99 | @var{n} times; each successive search starts at the end of the |
| 100 | end of the previous time's match. If these successive searches | 100 | previous match. If all these successive searches succeed, the |
| 101 | succeed, the function succeeds, moving point and returning its new | 101 | function call succeeds, moving point and returning its new value. |
| 102 | value. Otherwise the search fails, with results depending on the | 102 | Otherwise the function call fails, with results depending on the value |
| 103 | value of @var{noerror}, as described above. If @var{repeat} is a | 103 | of @var{noerror}, as described above. If @var{count} is a negative |
| 104 | negative number -@var{n}, it serves as a repeat count of @var{n} for a | 104 | number -@var{n}, the search is done @var{n} times in the opposite |
| 105 | search in the opposite (backward) direction. | 105 | (backward) direction. |
| 106 | @end deffn | 106 | @end deffn |
| 107 | 107 | ||
| 108 | @deffn Command search-backward string &optional limit noerror repeat | 108 | @deffn Command search-backward string &optional limit noerror count |
| 109 | This function searches backward from point for @var{string}. It is | 109 | This function searches backward from point for @var{string}. It is |
| 110 | like @code{search-forward}, except that it searches backwards rather | 110 | like @code{search-forward}, except that it searches backwards rather |
| 111 | than forwards. Backward searches leave point at the beginning of the | 111 | than forwards. Backward searches leave point at the beginning of the |
| 112 | match. | 112 | match. |
| 113 | @end deffn | 113 | @end deffn |
| 114 | 114 | ||
| 115 | @deffn Command word-search-forward string &optional limit noerror repeat | 115 | @deffn Command word-search-forward string &optional limit noerror count |
| 116 | This function searches forward from point for a word match for | 116 | This function searches forward from point for a word match for |
| 117 | @var{string}. If it finds a match, it sets point to the end of the | 117 | @var{string}. If it finds a match, it sets point to the end of the |
| 118 | match found, and returns the new value of point. | 118 | 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 | |||
| 156 | neither @code{nil} nor @code{t}, it moves point to @var{limit} (or the | 156 | neither @code{nil} nor @code{t}, it moves point to @var{limit} (or the |
| 157 | end of the accessible portion of the buffer) and returns @code{nil}. | 157 | end of the accessible portion of the buffer) and returns @code{nil}. |
| 158 | 158 | ||
| 159 | If @var{repeat} is non-@code{nil}, then the search is repeated that many | 159 | If @var{count} is a positive number, it specifies how many successive |
| 160 | times. Point is positioned at the end of the last match. | 160 | occurrences to search for. Point is positioned at the end of the last |
| 161 | match. If @var{count} is a negative number, the search is backward | ||
| 162 | and point is positioned at the beginning of the last match. | ||
| 161 | 163 | ||
| 162 | @findex word-search-regexp | 164 | @findex word-search-regexp |
| 163 | Internally, @code{word-search-forward} and related functions use the | 165 | 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 | |||
| 165 | regular expression that ignores punctuation. | 167 | regular expression that ignores punctuation. |
| 166 | @end deffn | 168 | @end deffn |
| 167 | 169 | ||
| 168 | @deffn Command word-search-forward-lax string &optional limit noerror repeat | 170 | @deffn Command word-search-forward-lax string &optional limit noerror count |
| 169 | This command is identical to @code{word-search-forward}, except that | 171 | This command is identical to @code{word-search-forward}, except that |
| 170 | the beginning or the end of @var{string} need not match a word | 172 | the beginning or the end of @var{string} need not match a word |
| 171 | boundary, unless @var{string} begins or ends in whitespace. | 173 | boundary, unless @var{string} begins or ends in whitespace. |
| @@ -173,14 +175,14 @@ For instance, searching for @samp{ball boy} matches @samp{ball boyee}, | |||
| 173 | but does not match @samp{balls boy}. | 175 | but does not match @samp{balls boy}. |
| 174 | @end deffn | 176 | @end deffn |
| 175 | 177 | ||
| 176 | @deffn Command word-search-backward string &optional limit noerror repeat | 178 | @deffn Command word-search-backward string &optional limit noerror count |
| 177 | This function searches backward from point for a word match to | 179 | This function searches backward from point for a word match to |
| 178 | @var{string}. This function is just like @code{word-search-forward} | 180 | @var{string}. This function is just like @code{word-search-forward} |
| 179 | except that it searches backward and normally leaves point at the | 181 | except that it searches backward and normally leaves point at the |
| 180 | beginning of the match. | 182 | beginning of the match. |
| 181 | @end deffn | 183 | @end deffn |
| 182 | 184 | ||
| 183 | @deffn Command word-search-backward-lax string &optional limit noerror repeat | 185 | @deffn Command word-search-backward-lax string &optional limit noerror count |
| 184 | This command is identical to @code{word-search-backward}, except that | 186 | This command is identical to @code{word-search-backward}, except that |
| 185 | the beginning or the end of @var{string} need not match a word | 187 | the beginning or the end of @var{string} need not match a word |
| 186 | boundary, unless @var{string} begins or ends in whitespace. | 188 | boundary, unless @var{string} begins or ends in whitespace. |
| @@ -1005,7 +1007,7 @@ only the search functions useful in programs. The principal one is | |||
| 1005 | the buffer is multibyte; they convert the regular expression to unibyte | 1007 | the buffer is multibyte; they convert the regular expression to unibyte |
| 1006 | if the buffer is unibyte. @xref{Text Representations}. | 1008 | if the buffer is unibyte. @xref{Text Representations}. |
| 1007 | 1009 | ||
| 1008 | @deffn Command re-search-forward regexp &optional limit noerror repeat | 1010 | @deffn Command re-search-forward regexp &optional limit noerror count |
| 1009 | This function searches forward in the current buffer for a string of | 1011 | This function searches forward in the current buffer for a string of |
| 1010 | text that is matched by the regular expression @var{regexp}. The | 1012 | text that is matched by the regular expression @var{regexp}. The |
| 1011 | function skips over any amount of text that is not matched by | 1013 | function skips over any amount of text that is not matched by |
| @@ -1014,14 +1016,12 @@ It returns the new value of point. | |||
| 1014 | 1016 | ||
| 1015 | If @var{limit} is non-@code{nil}, it must be a position in the current | 1017 | If @var{limit} is non-@code{nil}, it must be a position in the current |
| 1016 | buffer. It specifies the upper bound to the search. No match | 1018 | buffer. It specifies the upper bound to the search. No match |
| 1017 | extending after that position is accepted. | 1019 | extending after that position is accepted. If @var{limit} is omitted |
| 1020 | or @code{nil}, it defaults to the end of the accessible portion of the | ||
| 1021 | buffer. | ||
| 1018 | 1022 | ||
| 1019 | If @var{repeat} is supplied, it must be a positive number; the search | 1023 | What @code{re-search-forward} does when the search fails depends on |
| 1020 | is repeated that many times; each repetition starts at the end of the | 1024 | the value of @var{noerror}: |
| 1021 | previous match. If all these successive searches succeed, the search | ||
| 1022 | succeeds, moving point and returning its new value. Otherwise the | ||
| 1023 | search fails. What @code{re-search-forward} does when the search | ||
| 1024 | fails depends on the value of @var{noerror}: | ||
| 1025 | 1025 | ||
| 1026 | @table @asis | 1026 | @table @asis |
| 1027 | @item @code{nil} | 1027 | @item @code{nil} |
| @@ -1033,6 +1033,19 @@ Move point to @var{limit} (or the end of the accessible portion of the | |||
| 1033 | buffer) and return @code{nil}. | 1033 | buffer) and return @code{nil}. |
| 1034 | @end table | 1034 | @end table |
| 1035 | 1035 | ||
| 1036 | The argument @var{noerror} only affects valid searches which fail to | ||
| 1037 | find a match. Invalid arguments cause errors regardless of | ||
| 1038 | @var{noerror}. | ||
| 1039 | |||
| 1040 | If @var{count} is a positive number @var{n}, the search is done | ||
| 1041 | @var{n} times; each successive search starts at the end of the | ||
| 1042 | previous match. If all these successive searches succeed, the | ||
| 1043 | function call succeeds, moving point and returning its new value. | ||
| 1044 | Otherwise the function call fails, with results depending on the value | ||
| 1045 | of @var{noerror}, as described above. If @var{count} is a negative | ||
| 1046 | number -@var{n}, the search is done @var{n} times in the opposite | ||
| 1047 | (backward) direction. | ||
| 1048 | |||
| 1036 | In the following example, point is initially before the @samp{T}. | 1049 | In the following example, point is initially before the @samp{T}. |
| 1037 | Evaluating the search call moves point to the end of that line (between | 1050 | Evaluating the search call moves point to the end of that line (between |
| 1038 | the @samp{t} of @samp{hat} and the newline). | 1051 | the @samp{t} of @samp{hat} and the newline). |
| @@ -1057,7 +1070,7 @@ comes back" twice. | |||
| 1057 | @end example | 1070 | @end example |
| 1058 | @end deffn | 1071 | @end deffn |
| 1059 | 1072 | ||
| 1060 | @deffn Command re-search-backward regexp &optional limit noerror repeat | 1073 | @deffn Command re-search-backward regexp &optional limit noerror count |
| 1061 | This function searches backward in the current buffer for a string of | 1074 | This function searches backward in the current buffer for a string of |
| 1062 | text that is matched by the regular expression @var{regexp}, leaving | 1075 | text that is matched by the regular expression @var{regexp}, leaving |
| 1063 | point at the beginning of the first text found. | 1076 | point at the beginning of the first text found. |
| @@ -1228,13 +1241,13 @@ non-greedy repetition operators (@pxref{Regexp Special, non-greedy}). | |||
| 1228 | This is because POSIX backtracking conflicts with the semantics of | 1241 | This is because POSIX backtracking conflicts with the semantics of |
| 1229 | non-greedy repetition. | 1242 | non-greedy repetition. |
| 1230 | 1243 | ||
| 1231 | @deffn Command posix-search-forward regexp &optional limit noerror repeat | 1244 | @deffn Command posix-search-forward regexp &optional limit noerror count |
| 1232 | This is like @code{re-search-forward} except that it performs the full | 1245 | This is like @code{re-search-forward} except that it performs the full |
| 1233 | backtracking specified by the POSIX standard for regular expression | 1246 | backtracking specified by the POSIX standard for regular expression |
| 1234 | matching. | 1247 | matching. |
| 1235 | @end deffn | 1248 | @end deffn |
| 1236 | 1249 | ||
| 1237 | @deffn Command posix-search-backward regexp &optional limit noerror repeat | 1250 | @deffn Command posix-search-backward regexp &optional limit noerror count |
| 1238 | This is like @code{re-search-backward} except that it performs the full | 1251 | This is like @code{re-search-backward} except that it performs the full |
| 1239 | backtracking specified by the POSIX standard for regular expression | 1252 | backtracking specified by the POSIX standard for regular expression |
| 1240 | matching. | 1253 | matching. |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 4e4c239291e..0b9529460f3 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -503,8 +503,9 @@ the codeset part of the locale cannot be @code{"UTF-8"} on MS-Windows. | |||
| 503 | If your system does not support a locale environment, this function | 503 | If your system does not support a locale environment, this function |
| 504 | behaves like @code{string-equal}. | 504 | behaves like @code{string-equal}. |
| 505 | 505 | ||
| 506 | Do @emph{not} use this function to compare file names for equality, only | 506 | Do @emph{not} use this function to compare file names for equality, as |
| 507 | for sorting them. | 507 | filesystems generally don't honor linguistic equivalence of strings |
| 508 | that collation implements. | ||
| 508 | @end defun | 509 | @end defun |
| 509 | 510 | ||
| 510 | @defun string-prefix-p string1 string2 &optional ignore-case | 511 | @defun string-prefix-p string1 string2 &optional ignore-case |
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 8eee9e1d869..72a90a1ff21 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -931,6 +931,7 @@ status of its latest version. | |||
| 931 | @menu | 931 | @menu |
| 932 | * Origin of the term Emacs:: | 932 | * Origin of the term Emacs:: |
| 933 | * Latest version of Emacs:: | 933 | * Latest version of Emacs:: |
| 934 | * New in Emacs 25:: | ||
| 934 | * New in Emacs 24:: | 935 | * New in Emacs 24:: |
| 935 | * New in Emacs 23:: | 936 | * New in Emacs 23:: |
| 936 | * New in Emacs 22:: | 937 | * New in Emacs 22:: |
| @@ -977,9 +978,9 @@ conventions}). | |||
| 977 | @cindex Bazaar repository, Emacs | 978 | @cindex Bazaar repository, Emacs |
| 978 | 979 | ||
| 979 | Emacs @value{EMACSVER} is the current version as of this writing. A version | 980 | Emacs @value{EMACSVER} is the current version as of this writing. A version |
| 980 | number with two components (e.g., @samp{22.1}) indicates a released | 981 | number with two components (e.g., @samp{24.5}) indicates a released |
| 981 | version; three components indicate a development | 982 | version; three components indicate a development |
| 982 | version (e.g., @samp{23.0.50} is what will eventually become @samp{23.1}). | 983 | version (e.g., @samp{26.0.50} is what will eventually become @samp{26.1}). |
| 983 | 984 | ||
| 984 | Emacs is under active development, hosted at | 985 | Emacs is under active development, hosted at |
| 985 | @uref{http://savannah.gnu.org/projects/emacs/, Savannah}. | 986 | @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, | |||
| 998 | you can give this command a prefix argument to read about which features | 999 | you can give this command a prefix argument to read about which features |
| 999 | were new in older versions. | 1000 | were new in older versions. |
| 1000 | 1001 | ||
| 1002 | @node New in Emacs 25 | ||
| 1003 | @section What is different about Emacs 25? | ||
| 1004 | @cindex Differences between Emacs 24 and Emacs 25 | ||
| 1005 | @cindex Emacs 25, new features in | ||
| 1006 | |||
| 1007 | @itemize | ||
| 1008 | @cindex xwidgets | ||
| 1009 | @item | ||
| 1010 | Emacs can now embed native widgets inside Emacs buffers, if you have | ||
| 1011 | gtk3 and webkitgtk3 installed. E.g., to access the embedded webkit | ||
| 1012 | browser widget, type @kbd{M-x xwidget-webkit-browse-url}. | ||
| 1013 | |||
| 1014 | @cindex loadable modules | ||
| 1015 | @item | ||
| 1016 | Emacs can now dynamically load external modules compiled as shared | ||
| 1017 | libraries. | ||
| 1018 | |||
| 1019 | @cindex Unicode characters, typing easily | ||
| 1020 | @item | ||
| 1021 | @kbd{C-x 8} has new shorthands for several popular characters, type | ||
| 1022 | @kbd{C-x 8 C-h} to list shorthands. | ||
| 1023 | |||
| 1024 | @cindex automatic display of Lisp APIs | ||
| 1025 | @item | ||
| 1026 | A new minor mode @code{global-eldoc-mode} is enabled by default, and | ||
| 1027 | shows in the echo area or in the mode line the argument list of the | ||
| 1028 | Emacs Lisp form at point. | ||
| 1029 | |||
| 1030 | @cindex pasting text on text terminals | ||
| 1031 | @cindex bracketed paste mode | ||
| 1032 | @item | ||
| 1033 | On text terminals that support the ``bracketed paste mode'' EMacs now | ||
| 1034 | uses that mode by default. This mode allows Emacs to distinguish | ||
| 1035 | between pasted text and text typed by the user. | ||
| 1036 | |||
| 1037 | @cindex Unicode 9.0.0 | ||
| 1038 | @item | ||
| 1039 | Emacs 25 comes with data files imported from the latest Unicode | ||
| 1040 | Standard version 9.0.0. | ||
| 1041 | |||
| 1042 | @cindex bidirectional editing | ||
| 1043 | @item | ||
| 1044 | The support for bidirectional editing was updated to include all the | ||
| 1045 | features mandated by the latest Unicode Standard version 9.0.0. | ||
| 1046 | |||
| 1047 | @cindex character folding in searches | ||
| 1048 | @item | ||
| 1049 | Search command can now perform character folding in matches. This is | ||
| 1050 | analogous to case folding, but instead of disregarding case variants, | ||
| 1051 | it disregards wider classes of distinctions between similar | ||
| 1052 | characters, such as matching different variants of double quote | ||
| 1053 | characters, ignoring diacritics, etc. | ||
| 1054 | |||
| 1055 | @cindex eww | ||
| 1056 | @item | ||
| 1057 | The Emacs Web Browser EWW was extended to render text using | ||
| 1058 | variable-pitch fonts, and got other new features. | ||
| 1059 | |||
| 1060 | @cindex rmail, and HTML mails | ||
| 1061 | @item | ||
| 1062 | Rmail can now render HTML mail messages, if Emacs is built with | ||
| 1063 | libxml2 or if you have the Lynx browser installed. | ||
| 1064 | |||
| 1065 | @cindex support for push commands in VC | ||
| 1066 | @item | ||
| 1067 | VC now has basic support for @code{push} commands, implemented for | ||
| 1068 | Bzr, Git, and Hg. | ||
| 1069 | |||
| 1070 | @cindex hide-ifdef, C/C@t{++} expressions in macros | ||
| 1071 | @item | ||
| 1072 | Hide-IfDef mode now support full C/C@t{++} expressions in macros, | ||
| 1073 | macro argument expansion, interactive macro evaluation and automatic | ||
| 1074 | scanning of @code{#define}d symbols. | ||
| 1075 | |||
| 1076 | @cindex xref | ||
| 1077 | @item | ||
| 1078 | New package Xref replaces Etags's front-end and UI. Xref provides a | ||
| 1079 | generic framework and new commands to find and move to definitions of | ||
| 1080 | functions, macros, data structures etc., as well as go back to the | ||
| 1081 | location where you were before moving to a definition. It supersedes | ||
| 1082 | and obsoletes many Etags commands, while still using the etags.el code | ||
| 1083 | that reads the TAGS tables as one of its back-ends. As result, the | ||
| 1084 | popular key bindings @kbd{M-.} and @kbd{M-,} have been changed to | ||
| 1085 | invoke Xref commands. | ||
| 1086 | |||
| 1087 | @cindex project | ||
| 1088 | @item | ||
| 1089 | The new package Project provides generic infrastructure for dealing | ||
| 1090 | with projects. | ||
| 1091 | |||
| 1092 | @cindex horizontal scroll bars | ||
| 1093 | @item | ||
| 1094 | Emacs can now draw horizontal scroll bars on some platforms that | ||
| 1095 | provide toolkit scroll bars, namely Gtk+, Lucid, Motif and Windows. | ||
| 1096 | |||
| 1097 | @end itemize | ||
| 1098 | |||
| 1099 | Consult the Emacs @file{NEWS} file (@kbd{C-h n}) for the full list of | ||
| 1100 | changes in Emacs 25. | ||
| 1101 | |||
| 1001 | @node New in Emacs 24 | 1102 | @node New in Emacs 24 |
| 1002 | @section What is different about Emacs 24? | 1103 | @section What is different about Emacs 24? |
| 1003 | @cindex Differences between Emacs 23 and Emacs 24 | 1104 | @cindex Differences between Emacs 23 and Emacs 24 |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 5c9553bcb94..ebce3e0d46a 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -958,13 +958,13 @@ occurrence of the failure. So far, the failure has been observed with | |||
| 958 | GTK+ versions 3.4.2, 3.14.5 and 3.18.7. However, another 3.4.2 build | 958 | GTK+ versions 3.4.2, 3.14.5 and 3.18.7. However, another 3.4.2 build |
| 959 | does not exhibit the bug. | 959 | does not exhibit the bug. |
| 960 | 960 | ||
| 961 | Some window managers (xfce) apparently work around this failure by | 961 | Some window managers (Xfce) apparently work around this failure by |
| 962 | cropping the menu bar. With other windows managers, it's possible to | 962 | cropping the menu bar. With other windows managers, it's possible to |
| 963 | shrink the frame manually after the problem occurs, e.g. by dragging the | 963 | shrink the frame manually after the problem occurs, e.g. by dragging the |
| 964 | frame's border with the mouse. However, some window managers have been | 964 | frame's border with the mouse. However, some window managers have been |
| 965 | reported to refuse such attempts and snap back to the width needed to | 965 | reported to refuse such attempts and snap back to the width needed to |
| 966 | show the full menu bar (wmii) or at least cause the screen to flicker | 966 | show the full menu bar (wmii) or at least cause the screen to flicker |
| 967 | during such resizing attempts (i3, icewm). | 967 | during such resizing attempts (i3, IceWM). |
| 968 | 968 | ||
| 969 | See also http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15700, | 969 | See also http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15700, |
| 970 | http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22000, | 970 | http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22000, |
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index d5612f4eb13..61186e1a881 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el | |||
| @@ -86,6 +86,11 @@ | |||
| 86 | 86 | ||
| 87 | ;;; Code: | 87 | ;;; Code: |
| 88 | 88 | ||
| 89 | ;; The autoloads.el mechanism which adds package--builtin-versions | ||
| 90 | ;; maintenance to loaddefs.el doesn't work for preloaded packages (such | ||
| 91 | ;; as this one), so we have to do it by hand! | ||
| 92 | (push (purecopy '(cl-generic 1 0)) package--builtin-versions) | ||
| 93 | |||
| 89 | ;; Note: For generic functions that dispatch on several arguments (i.e. those | 94 | ;; Note: For generic functions that dispatch on several arguments (i.e. those |
| 90 | ;; which use the multiple-dispatch feature), we always use the same "tagcodes" | 95 | ;; which use the multiple-dispatch feature), we always use the same "tagcodes" |
| 91 | ;; and the same set of arguments on which to dispatch. This works, but is | 96 | ;; 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 | |||
| 697 | (setq fun (cl-generic-call-method generic method fun))) | 702 | (setq fun (cl-generic-call-method generic method fun))) |
| 698 | fun))))) | 703 | fun))))) |
| 699 | 704 | ||
| 705 | (defun cl-generic-apply (generic args) | ||
| 706 | "Like `apply' but takes a cl-generic object rather than a function." | ||
| 707 | ;; Handy in cl-no-applicable-method, for example. | ||
| 708 | ;; In Common Lisp, generic-function objects are funcallable. Ideally | ||
| 709 | ;; we'd want the same in Elisp, but it would either require using a very | ||
| 710 | ;; different (and less efficient) representation of cl--generic objects, | ||
| 711 | ;; or non-trivial changes in the general infrastructure (compiler and such). | ||
| 712 | (apply (cl--generic-name generic) args)) | ||
| 713 | |||
| 700 | (defun cl--generic-arg-specializer (method dispatch-arg) | 714 | (defun cl--generic-arg-specializer (method dispatch-arg) |
| 701 | (or (if (integerp dispatch-arg) | 715 | (or (if (integerp dispatch-arg) |
| 702 | (nth dispatch-arg | 716 | (nth dispatch-arg |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 56170e6a71b..37244f5c350 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -327,6 +327,20 @@ FORM is of the form (ARGS . BODY)." | |||
| 327 | Like normal `defun', except ARGLIST allows full Common Lisp conventions, | 327 | Like normal `defun', except ARGLIST allows full Common Lisp conventions, |
| 328 | and BODY is implicitly surrounded by (cl-block NAME ...). | 328 | and BODY is implicitly surrounded by (cl-block NAME ...). |
| 329 | 329 | ||
| 330 | The full form of a Common Lisp function argument list is | ||
| 331 | |||
| 332 | (VAR... | ||
| 333 | [&optional (VAR [INITFORM [SVAR]])...] | ||
| 334 | [&rest|&body VAR] | ||
| 335 | [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] | ||
| 336 | [&aux (VAR [INITFORM])...]) | ||
| 337 | |||
| 338 | VAR maybe be replaced recursively with an argument list for | ||
| 339 | destructing, `&whole' is supported within these sublists. If | ||
| 340 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be | ||
| 341 | written simply `VAR'. See the Info node `(cl)Argument Lists' for | ||
| 342 | more details. | ||
| 343 | |||
| 330 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" | 344 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" |
| 331 | (declare (debug | 345 | (declare (debug |
| 332 | ;; Same as defun but use cl-lambda-list. | 346 | ;; Same as defun but use cl-lambda-list. |
| @@ -406,6 +420,21 @@ and BODY is implicitly surrounded by (cl-block NAME ...). | |||
| 406 | Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, | 420 | Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, |
| 407 | and BODY is implicitly surrounded by (cl-block NAME ...). | 421 | and BODY is implicitly surrounded by (cl-block NAME ...). |
| 408 | 422 | ||
| 423 | The full form of a Common Lisp macro argument list is | ||
| 424 | |||
| 425 | (VAR... | ||
| 426 | [&optional (VAR [INITFORM [SVAR]])...] | ||
| 427 | [&rest|&body VAR] | ||
| 428 | [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] | ||
| 429 | [&aux (VAR [INITFORM])...] | ||
| 430 | [&environment VAR]) | ||
| 431 | |||
| 432 | VAR maybe be replaced recursively with an argument list for | ||
| 433 | destructing, `&whole' is supported within these sublists. If | ||
| 434 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be | ||
| 435 | written simply `VAR'. See the Info node `(cl)Argument Lists' for | ||
| 436 | more details. | ||
| 437 | |||
| 409 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" | 438 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" |
| 410 | (declare (debug | 439 | (declare (debug |
| 411 | (&define name cl-macro-list cl-declarations-or-string def-body)) | 440 | (&define name cl-macro-list cl-declarations-or-string def-body)) |
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el index 7ee897093b2..413b94f01a8 100644 --- a/lisp/emacs-lisp/eieio-compat.el +++ b/lisp/emacs-lisp/eieio-compat.el | |||
| @@ -188,7 +188,8 @@ Summary: | |||
| 188 | (`no-applicable-method | 188 | (`no-applicable-method |
| 189 | (setq method 'cl-no-applicable-method) | 189 | (setq method 'cl-no-applicable-method) |
| 190 | (setq specializers `(generic ,@specializers)) | 190 | (setq specializers `(generic ,@specializers)) |
| 191 | (lambda (generic arg &rest args) (apply code arg generic args))) | 191 | (lambda (generic arg &rest args) |
| 192 | (apply code arg (cl--generic-name generic) (cons arg args)))) | ||
| 192 | (_ code)))) | 193 | (_ code)))) |
| 193 | (cl-generic-define-method | 194 | (cl-generic-define-method |
| 194 | method (unless (memq kind '(nil :primary)) (list kind)) | 195 | method (unless (memq kind '(nil :primary)) (list kind)) |
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 0567c87dd39..52577adefac 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el | |||
| @@ -971,7 +971,7 @@ If a consistent order does not exist, signal an error." | |||
| 971 | 971 | ||
| 972 | (defun eieio--class-precedence-c3 (class) | 972 | (defun eieio--class-precedence-c3 (class) |
| 973 | "Return all parents of CLASS in c3 order." | 973 | "Return all parents of CLASS in c3 order." |
| 974 | (let ((parents (eieio--class-parents (cl--find-class class)))) | 974 | (let ((parents (eieio--class-parents class))) |
| 975 | (eieio--c3-merge-lists | 975 | (eieio--c3-merge-lists |
| 976 | (list class) | 976 | (list class) |
| 977 | (append | 977 | (append |
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 4a7b7109106..cbb134e95d5 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -105,7 +105,7 @@ Please send improvements and fixes to the maintainer." | |||
| 105 | (defcustom find-feature-regexp | 105 | (defcustom find-feature-regexp |
| 106 | (concat ";;; Code:") | 106 | (concat ";;; Code:") |
| 107 | "The regexp used by `xref-find-definitions' when searching for a feature definition. | 107 | "The regexp used by `xref-find-definitions' when searching for a feature definition. |
| 108 | Note it must contain a `%s' at the place where `format' | 108 | Note it may contain up to one `%s' at the place where `format' |
| 109 | should insert the feature name." | 109 | should insert the feature name." |
| 110 | ;; We search for ";;; Code" rather than (feature '%s) because the | 110 | ;; We search for ";;; Code" rather than (feature '%s) because the |
| 111 | ;; former is near the start of the code, and the latter is very | 111 | ;; former is near the start of the code, and the latter is very |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 540a0e90273..e721b553eae 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2259,13 +2259,13 @@ Otherwise no newline is inserted." | |||
| 2259 | (package--print-help-section "Status") | 2259 | (package--print-help-section "Status") |
| 2260 | (cond (built-in | 2260 | (cond (built-in |
| 2261 | (insert (propertize (capitalize status) | 2261 | (insert (propertize (capitalize status) |
| 2262 | 'font-lock-face 'package-status-builtin-face) | 2262 | 'font-lock-face 'package-status-built-in) |
| 2263 | ".")) | 2263 | ".")) |
| 2264 | (pkg-dir | 2264 | (pkg-dir |
| 2265 | (insert (propertize (if (member status '("unsigned" "dependency")) | 2265 | (insert (propertize (if (member status '("unsigned" "dependency")) |
| 2266 | "Installed" | 2266 | "Installed" |
| 2267 | (capitalize status)) | 2267 | (capitalize status)) |
| 2268 | 'font-lock-face 'package-status-builtin-face)) | 2268 | 'font-lock-face 'package-status-built-in)) |
| 2269 | (insert (substitute-command-keys " in `")) | 2269 | (insert (substitute-command-keys " in `")) |
| 2270 | (let ((dir (abbreviate-file-name | 2270 | (let ((dir (abbreviate-file-name |
| 2271 | (file-name-as-directory | 2271 | (file-name-as-directory |
| @@ -2278,7 +2278,7 @@ Otherwise no newline is inserted." | |||
| 2278 | (insert (substitute-command-keys | 2278 | (insert (substitute-command-keys |
| 2279 | "',\n shadowing a ") | 2279 | "',\n shadowing a ") |
| 2280 | (propertize "built-in package" | 2280 | (propertize "built-in package" |
| 2281 | 'font-lock-face 'package-status-builtin-face)) | 2281 | 'font-lock-face 'package-status-built-in)) |
| 2282 | (insert (substitute-command-keys "'"))) | 2282 | (insert (substitute-command-keys "'"))) |
| 2283 | (if signed | 2283 | (if signed |
| 2284 | (insert ".") | 2284 | (insert ".") |
| @@ -2830,13 +2830,14 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])." | |||
| 2830 | "Face used on package description summaries in the package menu." | 2830 | "Face used on package description summaries in the package menu." |
| 2831 | :version "25.1") | 2831 | :version "25.1") |
| 2832 | 2832 | ||
| 2833 | ;; Shame this hyphenates "built-in", when "font-lock-builtin-face" doesn't. | ||
| 2833 | (defface package-status-built-in | 2834 | (defface package-status-built-in |
| 2834 | '((t :inherit font-lock-builtin-face)) | 2835 | '((t :inherit font-lock-builtin-face)) |
| 2835 | "Face used on the status and version of built-in packages." | 2836 | "Face used on the status and version of built-in packages." |
| 2836 | :version "25.1") | 2837 | :version "25.1") |
| 2837 | 2838 | ||
| 2838 | (defface package-status-external | 2839 | (defface package-status-external |
| 2839 | '((t :inherit package-status-builtin-face)) | 2840 | '((t :inherit package-status-built-in)) |
| 2840 | "Face used on the status and version of external packages." | 2841 | "Face used on the status and version of external packages." |
| 2841 | :version "25.1") | 2842 | :version "25.1") |
| 2842 | 2843 | ||
diff --git a/lisp/files.el b/lisp/files.el index abf6b0c8184..55a7afe7875 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4700,14 +4700,20 @@ By default, makes the previous version into a backup file | |||
| 4700 | Prefixed with one \\[universal-argument], marks this version | 4700 | Prefixed with one \\[universal-argument], marks this version |
| 4701 | to become a backup when the next save is done. | 4701 | to become a backup when the next save is done. |
| 4702 | Prefixed with two \\[universal-argument]'s, | 4702 | Prefixed with two \\[universal-argument]'s, |
| 4703 | unconditionally makes the previous version into a backup file. | 4703 | makes the previous version into a backup file. |
| 4704 | Prefixed with three \\[universal-argument]'s, marks this version | 4704 | Prefixed with three \\[universal-argument]'s, marks this version |
| 4705 | to become a backup when the next save is done, | 4705 | to become a backup when the next save is done, |
| 4706 | and unconditionally makes the previous version into a backup file. | 4706 | and makes the previous version into a backup file. |
| 4707 | 4707 | ||
| 4708 | With a numeric prefix argument of 0, never make the previous version | 4708 | With a numeric prefix argument of 0, never make the previous version |
| 4709 | into a backup file. | 4709 | into a backup file. |
| 4710 | 4710 | ||
| 4711 | Note that the various variables that control backups, such | ||
| 4712 | as `version-control', `backup-enable-predicate', `vc-make-backup-files', | ||
| 4713 | and `backup-inhibited', to name just the more popular ones, still | ||
| 4714 | control whether a backup will actually be produced, even when you | ||
| 4715 | invoke this command prefixed with two or three \\[universal-argument]'s. | ||
| 4716 | |||
| 4711 | If a file's name is FOO, the names of its numbered backup versions are | 4717 | If a file's name is FOO, the names of its numbered backup versions are |
| 4712 | FOO.~i~ for various integers i. A non-numbered backup file is called FOO~. | 4718 | FOO.~i~ for various integers i. A non-numbered backup file is called FOO~. |
| 4713 | Numeric backups (rather than FOO~) will be made if value of | 4719 | Numeric backups (rather than FOO~) will be made if value of |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 25261d8d4a8..b50379a250b 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1628,10 +1628,17 @@ Used in `word-search-forward', `word-search-backward', | |||
| 1628 | "Search backward from point for STRING, ignoring differences in punctuation. | 1628 | "Search backward from point for STRING, ignoring differences in punctuation. |
| 1629 | Set point to the beginning of the occurrence found, and return point. | 1629 | Set point to the beginning of the occurrence found, and return point. |
| 1630 | An optional second argument bounds the search; it is a buffer position. | 1630 | An optional second argument bounds the search; it is a buffer position. |
| 1631 | The match found must not extend before that position. | 1631 | The match found must not begin before that position. A value of nil |
| 1632 | means search to the beginning of the accessible portion of the buffer. | ||
| 1632 | Optional third argument, if t, means if fail just return nil (no error). | 1633 | Optional third argument, if t, means if fail just return nil (no error). |
| 1633 | If not nil and not t, move to limit of search and return nil. | 1634 | If not nil and not t, position at limit of search and return nil. |
| 1634 | Optional fourth argument is repeat count--search for successive occurrences. | 1635 | Optional fourth argument COUNT, if a positive number, means to search |
| 1636 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 1637 | forward, instead of backward, for -COUNT occurrences. A value of | ||
| 1638 | nil means the same as 1. | ||
| 1639 | With COUNT positive, the match found is the COUNTth to last one (or | ||
| 1640 | last, if COUNT is 1 or nil) in the buffer located entirely before | ||
| 1641 | the origin of the search; correspondingly with COUNT negative. | ||
| 1635 | 1642 | ||
| 1636 | Relies on the function `word-search-regexp' to convert a sequence | 1643 | Relies on the function `word-search-regexp' to convert a sequence |
| 1637 | of words in STRING to a regexp used to search words without regard | 1644 | of words in STRING to a regexp used to search words without regard |
| @@ -1645,10 +1652,17 @@ has no effect on it." | |||
| 1645 | "Search forward from point for STRING, ignoring differences in punctuation. | 1652 | "Search forward from point for STRING, ignoring differences in punctuation. |
| 1646 | Set point to the end of the occurrence found, and return point. | 1653 | Set point to the end of the occurrence found, and return point. |
| 1647 | An optional second argument bounds the search; it is a buffer position. | 1654 | An optional second argument bounds the search; it is a buffer position. |
| 1648 | The match found must not extend after that position. | 1655 | The match found must not end after that position. A value of nil |
| 1656 | means search to the end of the accessible portion of the buffer. | ||
| 1649 | Optional third argument, if t, means if fail just return nil (no error). | 1657 | Optional third argument, if t, means if fail just return nil (no error). |
| 1650 | If not nil and not t, move to limit of search and return nil. | 1658 | If not nil and not t, move to limit of search and return nil. |
| 1651 | Optional fourth argument is repeat count--search for successive occurrences. | 1659 | Optional fourth argument COUNT, if a positive number, means to search |
| 1660 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 1661 | backward, instead of forward, for -COUNT occurrences. A value of | ||
| 1662 | nil means the same as 1. | ||
| 1663 | With COUNT positive, the match found is the COUNTth one (or first, | ||
| 1664 | if COUNT is 1 or nil) in the buffer located entirely after the | ||
| 1665 | origin of the search; correspondingly with COUNT negative. | ||
| 1652 | 1666 | ||
| 1653 | Relies on the function `word-search-regexp' to convert a sequence | 1667 | Relies on the function `word-search-regexp' to convert a sequence |
| 1654 | of words in STRING to a regexp used to search words without regard | 1668 | 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 | |||
| 1666 | boundary, unless STRING ends in whitespace. | 1680 | boundary, unless STRING ends in whitespace. |
| 1667 | 1681 | ||
| 1668 | An optional second argument bounds the search; it is a buffer position. | 1682 | An optional second argument bounds the search; it is a buffer position. |
| 1669 | The match found must not extend before that position. | 1683 | The match found must not begin before that position. A value of nil |
| 1684 | means search to the beginning of the accessible portion of the buffer. | ||
| 1670 | Optional third argument, if t, means if fail just return nil (no error). | 1685 | Optional third argument, if t, means if fail just return nil (no error). |
| 1671 | If not nil and not t, move to limit of search and return nil. | 1686 | If not nil and not t, position at limit of search and return nil. |
| 1672 | Optional fourth argument is repeat count--search for successive occurrences. | 1687 | Optional fourth argument COUNT, if a positive number, means to search |
| 1688 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 1689 | forward, instead of backward, for -COUNT occurrences. A value of | ||
| 1690 | nil means the same as 1. | ||
| 1691 | With COUNT positive, the match found is the COUNTth to last one (or | ||
| 1692 | last, if COUNT is 1 or nil) in the buffer located entirely before | ||
| 1693 | the origin of the search; correspondingly with COUNT negative. | ||
| 1673 | 1694 | ||
| 1674 | Relies on the function `word-search-regexp' to convert a sequence | 1695 | Relies on the function `word-search-regexp' to convert a sequence |
| 1675 | of words in STRING to a regexp used to search words without regard | 1696 | 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 | |||
| 1687 | boundary, unless STRING ends in whitespace. | 1708 | boundary, unless STRING ends in whitespace. |
| 1688 | 1709 | ||
| 1689 | An optional second argument bounds the search; it is a buffer position. | 1710 | An optional second argument bounds the search; it is a buffer position. |
| 1690 | The match found must not extend after that position. | 1711 | The match found must not end after that position. A value of nil |
| 1712 | means search to the end of the accessible portion of the buffer. | ||
| 1691 | Optional third argument, if t, means if fail just return nil (no error). | 1713 | Optional third argument, if t, means if fail just return nil (no error). |
| 1692 | If not nil and not t, move to limit of search and return nil. | 1714 | If not nil and not t, move to limit of search and return nil. |
| 1693 | Optional fourth argument is repeat count--search for successive occurrences. | 1715 | Optional fourth argument COUNT, if a positive number, means to search |
| 1716 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 1717 | backward, instead of forward, for -COUNT occurrences. A value of | ||
| 1718 | nil means the same as 1. | ||
| 1719 | With COUNT positive, the match found is the COUNTth one (or first, | ||
| 1720 | if COUNT is 1 or nil) in the buffer located entirely after the | ||
| 1721 | origin of the search; correspondingly with COUNT negative. | ||
| 1694 | 1722 | ||
| 1695 | Relies on the function `word-search-regexp' to convert a sequence | 1723 | Relies on the function `word-search-regexp' to convert a sequence |
| 1696 | of words in STRING to a regexp used to search words without regard | 1724 | of words in STRING to a regexp used to search words without regard |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 4b4749bb45d..2a9a62feae8 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -744,8 +744,9 @@ its value is returned." | |||
| 744 | 744 | ||
| 745 | (defun mouse-on-link-p (pos) | 745 | (defun mouse-on-link-p (pos) |
| 746 | "Return non-nil if POS is on a link in the current buffer. | 746 | "Return non-nil if POS is on a link in the current buffer. |
| 747 | POS must be a buffer position in the current buffer or a mouse | 747 | POS must specify a buffer position in the current buffer, as a list |
| 748 | event location in the selected window (see `event-start'). | 748 | of the form returned by the `event-start' and `event-end' functions, |
| 749 | or a mouse event location in the selected window (see `event-start'). | ||
| 749 | However, if `mouse-1-click-in-non-selected-windows' is non-nil, | 750 | However, if `mouse-1-click-in-non-selected-windows' is non-nil, |
| 750 | POS may be a mouse event location in any window. | 751 | POS may be a mouse event location in any window. |
| 751 | 752 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f79394ac9b7..80e8375b944 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2877,18 +2877,23 @@ the result will be a local, non-Tramp, file name." | |||
| 2877 | tramp-initial-end-of-output)) | 2877 | tramp-initial-end-of-output)) |
| 2878 | ;; We use as environment the difference to toplevel | 2878 | ;; We use as environment the difference to toplevel |
| 2879 | ;; `process-environment'. | 2879 | ;; `process-environment'. |
| 2880 | env | 2880 | env uenv |
| 2881 | (env | 2881 | (env (dolist (elt (cons prompt process-environment) env) |
| 2882 | (dolist | 2882 | (or (member elt (default-toplevel-value 'process-environment)) |
| 2883 | (elt | 2883 | (if (string-match "=" elt) |
| 2884 | (cons prompt (nreverse (copy-sequence process-environment))) | 2884 | (setq env (append env `(,elt))) |
| 2885 | env) | 2885 | (if (tramp-get-env-with-u-option v) |
| 2886 | (or (member elt (default-toplevel-value 'process-environment)) | 2886 | (setq env (append `("-u" ,elt) env)) |
| 2887 | (setq env (cons elt env))))) | 2887 | (setq uenv (cons elt uenv))))))) |
| 2888 | (command | 2888 | (command |
| 2889 | (when (stringp program) | 2889 | (when (stringp program) |
| 2890 | (format "cd %s && exec %s env %s %s" | 2890 | (format "cd %s && %s exec %s env %s %s" |
| 2891 | (tramp-shell-quote-argument localname) | 2891 | (tramp-shell-quote-argument localname) |
| 2892 | (if uenv | ||
| 2893 | (format | ||
| 2894 | "unset %s &&" | ||
| 2895 | (mapconcat 'tramp-shell-quote-argument uenv " ")) | ||
| 2896 | "") | ||
| 2892 | (if heredoc (format "<<'%s'" tramp-end-of-heredoc) "") | 2897 | (if heredoc (format "<<'%s'" tramp-end-of-heredoc) "") |
| 2893 | (mapconcat 'tramp-shell-quote-argument env " ") | 2898 | (mapconcat 'tramp-shell-quote-argument env " ") |
| 2894 | (if heredoc | 2899 | (if heredoc |
| @@ -2974,20 +2979,28 @@ the result will be a local, non-Tramp, file name." | |||
| 2974 | (error "Implementation does not handle immediate return")) | 2979 | (error "Implementation does not handle immediate return")) |
| 2975 | 2980 | ||
| 2976 | (with-parsed-tramp-file-name default-directory nil | 2981 | (with-parsed-tramp-file-name default-directory nil |
| 2977 | (let (command env input tmpinput stderr tmpstderr outbuf ret) | 2982 | (let (command env uenv input tmpinput stderr tmpstderr outbuf ret) |
| 2978 | ;; Compute command. | 2983 | ;; Compute command. |
| 2979 | (setq command (mapconcat 'tramp-shell-quote-argument | 2984 | (setq command (mapconcat 'tramp-shell-quote-argument |
| 2980 | (cons program args) " ")) | 2985 | (cons program args) " ")) |
| 2981 | ;; We use as environment the difference to toplevel `process-environment'. | 2986 | ;; We use as environment the difference to toplevel `process-environment'. |
| 2982 | (setq env | 2987 | (dolist (elt process-environment) |
| 2983 | (dolist (elt (nreverse (copy-sequence process-environment)) env) | 2988 | (or (member elt (default-toplevel-value 'process-environment)) |
| 2984 | (or (member elt (default-toplevel-value 'process-environment)) | 2989 | (if (string-match "=" elt) |
| 2985 | (setq env (cons elt env))))) | 2990 | (setq env (append env `(,elt))) |
| 2991 | (if (tramp-get-env-with-u-option v) | ||
| 2992 | (setq env (append `("-u" ,elt) env)) | ||
| 2993 | (setq uenv (cons elt uenv)))))) | ||
| 2986 | (when env | 2994 | (when env |
| 2987 | (setq command | 2995 | (setq command |
| 2988 | (format | 2996 | (format |
| 2989 | "env %s %s" | 2997 | "env %s %s" |
| 2990 | (mapconcat 'tramp-shell-quote-argument env " ") command))) | 2998 | (mapconcat 'tramp-shell-quote-argument env " ") command))) |
| 2999 | (when uenv | ||
| 3000 | (setq command | ||
| 3001 | (format | ||
| 3002 | "unset %s && %s" | ||
| 3003 | (mapconcat 'tramp-shell-quote-argument uenv " ") command))) | ||
| 2991 | ;; Determine input. | 3004 | ;; Determine input. |
| 2992 | (if (null infile) | 3005 | (if (null infile) |
| 2993 | (setq input "/dev/null") | 3006 | (setq input "/dev/null") |
| @@ -5528,6 +5541,13 @@ Return ATTR." | |||
| 5528 | tramp-unknown-id-string) | 5541 | tramp-unknown-id-string) |
| 5529 | (t res))))) | 5542 | (t res))))) |
| 5530 | 5543 | ||
| 5544 | (defun tramp-get-env-with-u-option (vec) | ||
| 5545 | (with-tramp-connection-property vec "env-u-option" | ||
| 5546 | (tramp-message vec 5 "Checking, whether `env -u' works") | ||
| 5547 | ;; Option "-u" is a GNU extension. | ||
| 5548 | (tramp-send-command-and-check | ||
| 5549 | vec "env FOO=foo env -u FOO 2>/dev/null | grep -qv FOO" t))) | ||
| 5550 | |||
| 5531 | ;; Some predefined connection properties. | 5551 | ;; Some predefined connection properties. |
| 5532 | (defun tramp-get-inline-compress (vec prop size) | 5552 | (defun tramp-get-inline-compress (vec prop size) |
| 5533 | "Return the compress command related to PROP. | 5553 | "Return the compress command related to PROP. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index d80006abbca..34e3054721d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3524,7 +3524,7 @@ connection buffer." | |||
| 3524 | (with-current-buffer (tramp-get-connection-buffer vec) | 3524 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3525 | (let (buffer-read-only) (delete-region pos (point)))))))) | 3525 | (let (buffer-read-only) (delete-region pos (point)))))))) |
| 3526 | 3526 | ||
| 3527 | :;; Utility functions: | 3527 | ;;; Utility functions: |
| 3528 | 3528 | ||
| 3529 | (defun tramp-accept-process-output (&optional proc timeout timeout-msecs) | 3529 | (defun tramp-accept-process-output (&optional proc timeout timeout-msecs) |
| 3530 | "Like `accept-process-output' for Tramp processes. | 3530 | "Like `accept-process-output' for Tramp processes. |
diff --git a/src/buffer.c b/src/buffer.c index 8756cbbbd7d..24c997fcdbd 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2224,7 +2224,9 @@ advance_to_char_boundary (ptrdiff_t byte_pos) | |||
| 2224 | 2224 | ||
| 2225 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | 2225 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, |
| 2226 | 1, 1, 0, | 2226 | 1, 1, 0, |
| 2227 | doc: /* Swap the text between current buffer and BUFFER. */) | 2227 | doc: /* Swap the text between current buffer and BUFFER. |
| 2228 | Using this function from `save-excursion' might produce surprising | ||
| 2229 | results, see Info node `(elisp)Swapping Text'. */) | ||
| 2228 | (Lisp_Object buffer) | 2230 | (Lisp_Object buffer) |
| 2229 | { | 2231 | { |
| 2230 | struct buffer *other_buffer; | 2232 | struct buffer *other_buffer; |
| @@ -449,8 +449,7 @@ the codeset part of the locale cannot be \"UTF-8\" on MS-Windows. | |||
| 449 | If your system does not support a locale environment, this function | 449 | If your system does not support a locale environment, this function |
| 450 | behaves like `string-equal'. | 450 | behaves like `string-equal'. |
| 451 | 451 | ||
| 452 | Do NOT use this function to compare file names for equality, only | 452 | Do NOT use this function to compare file names for equality. */) |
| 453 | for sorting them. */) | ||
| 454 | (Lisp_Object s1, Lisp_Object s2, Lisp_Object locale, Lisp_Object ignore_case) | 453 | (Lisp_Object s1, Lisp_Object s2, Lisp_Object locale, Lisp_Object ignore_case) |
| 455 | { | 454 | { |
| 456 | #if defined __STDC_ISO_10646__ || defined WINDOWSNT | 455 | #if defined __STDC_ISO_10646__ || defined WINDOWSNT |
diff --git a/src/image.c b/src/image.c index 1770de7e8ff..7a554ef1b63 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8910,13 +8910,13 @@ and `imagemagick-types-inhibit'. */) | |||
| 8910 | { | 8910 | { |
| 8911 | Lisp_Object typelist = Qnil; | 8911 | Lisp_Object typelist = Qnil; |
| 8912 | size_t numf = 0; | 8912 | size_t numf = 0; |
| 8913 | ExceptionInfo ex; | 8913 | ExceptionInfo *ex; |
| 8914 | char **imtypes; | 8914 | char **imtypes; |
| 8915 | size_t i; | 8915 | size_t i; |
| 8916 | 8916 | ||
| 8917 | GetExceptionInfo(&ex); | 8917 | ex = AcquireExceptionInfo (); |
| 8918 | imtypes = GetMagickList ("*", &numf, &ex); | 8918 | imtypes = GetMagickList ("*", &numf, ex); |
| 8919 | DestroyExceptionInfo(&ex); | 8919 | DestroyExceptionInfo (ex); |
| 8920 | 8920 | ||
| 8921 | for (i = 0; i < numf; i++) | 8921 | for (i = 0; i < numf; i++) |
| 8922 | { | 8922 | { |
diff --git a/src/indent.c b/src/indent.c index 1015259cedd..f8c180d3e2b 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2030,6 +2030,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2030 | struct position pos; | 2030 | struct position pos; |
| 2031 | pos = *vmotion (PT, PT_BYTE, XINT (lines), w); | 2031 | pos = *vmotion (PT, PT_BYTE, XINT (lines), w); |
| 2032 | SET_PT_BOTH (pos.bufpos, pos.bytepos); | 2032 | SET_PT_BOTH (pos.bufpos, pos.bytepos); |
| 2033 | it.vpos = pos.vpos; | ||
| 2033 | } | 2034 | } |
| 2034 | else | 2035 | else |
| 2035 | { | 2036 | { |
diff --git a/src/search.c b/src/search.c index 7c4a02491db..3d4846644ee 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2157,12 +2157,17 @@ DEFUN ("search-backward", Fsearch_backward, Ssearch_backward, 1, 4, | |||
| 2157 | doc: /* Search backward from point for STRING. | 2157 | doc: /* Search backward from point for STRING. |
| 2158 | Set point to the beginning of the occurrence found, and return point. | 2158 | Set point to the beginning of the occurrence found, and return point. |
| 2159 | An optional second argument bounds the search; it is a buffer position. | 2159 | An optional second argument bounds the search; it is a buffer position. |
| 2160 | The match found must not extend before that position. | 2160 | The match found must not begin before that position. A value of nil |
| 2161 | means search to the beginning of the accessible portion of the buffer. | ||
| 2161 | Optional third argument, if t, means if fail just return nil (no error). | 2162 | Optional third argument, if t, means if fail just return nil (no error). |
| 2162 | If not nil and not t, position at limit of search and return nil. | 2163 | If not nil and not t, position at limit of search and return nil. |
| 2163 | Optional fourth argument COUNT, if non-nil, means to search for COUNT | 2164 | Optional fourth argument COUNT, if a positive number, means to search |
| 2164 | successive occurrences. If COUNT is negative, search forward, | 2165 | for COUNT successive occurrences. If COUNT is negative, search |
| 2165 | instead of backward, for -COUNT occurrences. | 2166 | forward, instead of backward, for -COUNT occurrences. A value of |
| 2167 | nil means the same as 1. | ||
| 2168 | With COUNT positive, the match found is the COUNTth to last one (or | ||
| 2169 | last, if COUNT is 1 or nil) in the buffer located entirely before | ||
| 2170 | the origin of the search; correspondingly with COUNT negative. | ||
| 2166 | 2171 | ||
| 2167 | Search case-sensitivity is determined by the value of the variable | 2172 | Search case-sensitivity is determined by the value of the variable |
| 2168 | `case-fold-search', which see. | 2173 | `case-fold-search', which see. |
| @@ -2177,13 +2182,17 @@ DEFUN ("search-forward", Fsearch_forward, Ssearch_forward, 1, 4, "MSearch: ", | |||
| 2177 | doc: /* Search forward from point for STRING. | 2182 | doc: /* Search forward from point for STRING. |
| 2178 | Set point to the end of the occurrence found, and return point. | 2183 | Set point to the end of the occurrence found, and return point. |
| 2179 | An optional second argument bounds the search; it is a buffer position. | 2184 | An optional second argument bounds the search; it is a buffer position. |
| 2180 | The match found must not extend after that position. A value of nil is | 2185 | The match found must not end after that position. A value of nil |
| 2181 | equivalent to (point-max). | 2186 | means search to the end of the accessible portion of the buffer. |
| 2182 | Optional third argument, if t, means if fail just return nil (no error). | 2187 | Optional third argument, if t, means if fail just return nil (no error). |
| 2183 | If not nil and not t, move to limit of search and return nil. | 2188 | If not nil and not t, move to limit of search and return nil. |
| 2184 | Optional fourth argument COUNT, if non-nil, means to search for COUNT | 2189 | Optional fourth argument COUNT, if a positive number, means to search |
| 2185 | successive occurrences. If COUNT is negative, search backward, | 2190 | for COUNT successive occurrences. If COUNT is negative, search |
| 2186 | instead of forward, for -COUNT occurrences. | 2191 | backward, instead of forward, for -COUNT occurrences. A value of |
| 2192 | nil means the same as 1. | ||
| 2193 | With COUNT positive, the match found is the COUNTth one (or first, | ||
| 2194 | if COUNT is 1 or nil) in the buffer located entirely after the | ||
| 2195 | origin of the search; correspondingly with COUNT negative. | ||
| 2187 | 2196 | ||
| 2188 | Search case-sensitivity is determined by the value of the variable | 2197 | Search case-sensitivity is determined by the value of the variable |
| 2189 | `case-fold-search', which see. | 2198 | `case-fold-search', which see. |
| @@ -2197,14 +2206,19 @@ See also the functions `match-beginning', `match-end' and `replace-match'. */) | |||
| 2197 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, | 2206 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, |
| 2198 | "sRE search backward: ", | 2207 | "sRE search backward: ", |
| 2199 | doc: /* Search backward from point for match for regular expression REGEXP. | 2208 | doc: /* Search backward from point for match for regular expression REGEXP. |
| 2200 | Set point to the beginning of the match, and return point. | 2209 | Set point to the beginning of the occurrence found, and return point. |
| 2201 | The match found is the one starting last in the buffer | ||
| 2202 | and yet ending before the origin of the search. | ||
| 2203 | An optional second argument bounds the search; it is a buffer position. | 2210 | An optional second argument bounds the search; it is a buffer position. |
| 2204 | The match found must start at or after that position. | 2211 | The match found must not begin before that position. A value of nil |
| 2212 | means search to the beginning of the accessible portion of the buffer. | ||
| 2205 | Optional third argument, if t, means if fail just return nil (no error). | 2213 | Optional third argument, if t, means if fail just return nil (no error). |
| 2206 | If not nil and not t, move to limit of search and return nil. | 2214 | If not nil and not t, position at limit of search and return nil. |
| 2207 | Optional fourth argument is repeat count--search for successive occurrences. | 2215 | Optional fourth argument COUNT, if a positive number, means to search |
| 2216 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 2217 | forward, instead of backward, for -COUNT occurrences. A value of | ||
| 2218 | nil means the same as 1. | ||
| 2219 | With COUNT positive, the match found is the COUNTth to last one (or | ||
| 2220 | last, if COUNT is 1 or nil) in the buffer located entirely before | ||
| 2221 | the origin of the search; correspondingly with COUNT negative. | ||
| 2208 | 2222 | ||
| 2209 | Search case-sensitivity is determined by the value of the variable | 2223 | Search case-sensitivity is determined by the value of the variable |
| 2210 | `case-fold-search', which see. | 2224 | `case-fold-search', which see. |
| @@ -2221,10 +2235,17 @@ DEFUN ("re-search-forward", Fre_search_forward, Sre_search_forward, 1, 4, | |||
| 2221 | doc: /* Search forward from point for regular expression REGEXP. | 2235 | doc: /* Search forward from point for regular expression REGEXP. |
| 2222 | Set point to the end of the occurrence found, and return point. | 2236 | Set point to the end of the occurrence found, and return point. |
| 2223 | An optional second argument bounds the search; it is a buffer position. | 2237 | An optional second argument bounds the search; it is a buffer position. |
| 2224 | The match found must not extend after that position. | 2238 | The match found must not end after that position. A value of nil |
| 2239 | means search to the end of the accessible portion of the buffer. | ||
| 2225 | Optional third argument, if t, means if fail just return nil (no error). | 2240 | Optional third argument, if t, means if fail just return nil (no error). |
| 2226 | If not nil and not t, move to limit of search and return nil. | 2241 | If not nil and not t, move to limit of search and return nil. |
| 2227 | Optional fourth argument is repeat count--search for successive occurrences. | 2242 | Optional fourth argument COUNT, if a positive number, means to search |
| 2243 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 2244 | backward, instead of forward, for -COUNT occurrences. A value of | ||
| 2245 | nil means the same as 1. | ||
| 2246 | With COUNT positive, the match found is the COUNTth one (or first, | ||
| 2247 | if COUNT is 1 or nil) in the buffer located entirely after the | ||
| 2248 | origin of the search; correspondingly with COUNT negative. | ||
| 2228 | 2249 | ||
| 2229 | Search case-sensitivity is determined by the value of the variable | 2250 | Search case-sensitivity is determined by the value of the variable |
| 2230 | `case-fold-search', which see. | 2251 | `case-fold-search', which see. |
| @@ -2240,14 +2261,19 @@ DEFUN ("posix-search-backward", Fposix_search_backward, Sposix_search_backward, | |||
| 2240 | "sPosix search backward: ", | 2261 | "sPosix search backward: ", |
| 2241 | doc: /* Search backward from point for match for regular expression REGEXP. | 2262 | doc: /* Search backward from point for match for regular expression REGEXP. |
| 2242 | Find the longest match in accord with Posix regular expression rules. | 2263 | Find the longest match in accord with Posix regular expression rules. |
| 2243 | Set point to the beginning of the match, and return point. | 2264 | Set point to the beginning of the occurrence found, and return point. |
| 2244 | The match found is the one starting last in the buffer | ||
| 2245 | and yet ending before the origin of the search. | ||
| 2246 | An optional second argument bounds the search; it is a buffer position. | 2265 | An optional second argument bounds the search; it is a buffer position. |
| 2247 | The match found must start at or after that position. | 2266 | The match found must not begin before that position. A value of nil |
| 2267 | means search to the beginning of the accessible portion of the buffer. | ||
| 2248 | Optional third argument, if t, means if fail just return nil (no error). | 2268 | Optional third argument, if t, means if fail just return nil (no error). |
| 2249 | If not nil and not t, move to limit of search and return nil. | 2269 | If not nil and not t, position at limit of search and return nil. |
| 2250 | Optional fourth argument is repeat count--search for successive occurrences. | 2270 | Optional fourth argument COUNT, if a positive number, means to search |
| 2271 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 2272 | forward, instead of backward, for -COUNT occurrences. A value of | ||
| 2273 | nil means the same as 1. | ||
| 2274 | With COUNT positive, the match found is the COUNTth to last one (or | ||
| 2275 | last, if COUNT is 1 or nil) in the buffer located entirely before | ||
| 2276 | the origin of the search; correspondingly with COUNT negative. | ||
| 2251 | 2277 | ||
| 2252 | Search case-sensitivity is determined by the value of the variable | 2278 | Search case-sensitivity is determined by the value of the variable |
| 2253 | `case-fold-search', which see. | 2279 | `case-fold-search', which see. |
| @@ -2265,10 +2291,17 @@ DEFUN ("posix-search-forward", Fposix_search_forward, Sposix_search_forward, 1, | |||
| 2265 | Find the longest match in accord with Posix regular expression rules. | 2291 | Find the longest match in accord with Posix regular expression rules. |
| 2266 | Set point to the end of the occurrence found, and return point. | 2292 | Set point to the end of the occurrence found, and return point. |
| 2267 | An optional second argument bounds the search; it is a buffer position. | 2293 | An optional second argument bounds the search; it is a buffer position. |
| 2268 | The match found must not extend after that position. | 2294 | The match found must not end after that position. A value of nil |
| 2295 | means search to the end of the accessible portion of the buffer. | ||
| 2269 | Optional third argument, if t, means if fail just return nil (no error). | 2296 | Optional third argument, if t, means if fail just return nil (no error). |
| 2270 | If not nil and not t, move to limit of search and return nil. | 2297 | If not nil and not t, move to limit of search and return nil. |
| 2271 | Optional fourth argument is repeat count--search for successive occurrences. | 2298 | Optional fourth argument COUNT, if a positive number, means to search |
| 2299 | for COUNT successive occurrences. If COUNT is negative, search | ||
| 2300 | backward, instead of forward, for -COUNT occurrences. A value of | ||
| 2301 | nil means the same as 1. | ||
| 2302 | With COUNT positive, the match found is the COUNTth one (or first, | ||
| 2303 | if COUNT is 1 or nil) in the buffer located entirely after the | ||
| 2304 | origin of the search; correspondingly with COUNT negative. | ||
| 2272 | 2305 | ||
| 2273 | Search case-sensitivity is determined by the value of the variable | 2306 | Search case-sensitivity is determined by the value of the variable |
| 2274 | `case-fold-search', which see. | 2307 | `case-fold-search', which see. |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index a1ae78ab5c3..e05786fa070 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -1702,7 +1702,99 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1702 | ;; Cleanup. | 1702 | ;; Cleanup. |
| 1703 | (ignore-errors (delete-file tmp-name))))) | 1703 | (ignore-errors (delete-file tmp-name))))) |
| 1704 | 1704 | ||
| 1705 | (ert-deftest tramp-test29-vc-registered () | 1705 | (defun tramp-test--shell-command-to-string-asynchronously (command) |
| 1706 | "Like `shell-command-to-string', but for asynchronous processes." | ||
| 1707 | (with-temp-buffer | ||
| 1708 | (async-shell-command command (current-buffer)) | ||
| 1709 | ;; Suppress nasty messages. | ||
| 1710 | (set-process-sentinel (get-buffer-process (current-buffer)) nil) | ||
| 1711 | (while (get-buffer-process (current-buffer)) | ||
| 1712 | (accept-process-output (get-buffer-process (current-buffer)) 0.1)) | ||
| 1713 | (accept-process-output) | ||
| 1714 | (buffer-substring-no-properties (point-min) (point-max)))) | ||
| 1715 | |||
| 1716 | ;; This test is inspired by Bug#23952. | ||
| 1717 | (ert-deftest tramp-test29-environment-variables () | ||
| 1718 | "Check that remote processes set / unset environment variables properly." | ||
| 1719 | :tags '(:expensive-test) | ||
| 1720 | (skip-unless (tramp--test-enabled)) | ||
| 1721 | (skip-unless | ||
| 1722 | (eq | ||
| 1723 | (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) | ||
| 1724 | 'tramp-sh-file-name-handler)) | ||
| 1725 | |||
| 1726 | (dolist (this-shell-command-to-string | ||
| 1727 | '(;; Synchronously. | ||
| 1728 | shell-command-to-string | ||
| 1729 | ;; Asynchronously. | ||
| 1730 | tramp-test--shell-command-to-string-asynchronously)) | ||
| 1731 | |||
| 1732 | (let ((default-directory tramp-test-temporary-file-directory) | ||
| 1733 | (shell-file-name "/bin/sh") | ||
| 1734 | (envvar (concat "VAR_" (upcase (md5 (current-time-string))))) | ||
| 1735 | kill-buffer-query-functions) | ||
| 1736 | |||
| 1737 | (unwind-protect | ||
| 1738 | ;; Set a value. | ||
| 1739 | (let ((process-environment | ||
| 1740 | (cons (concat envvar "=foo") process-environment))) | ||
| 1741 | ;; Default value. | ||
| 1742 | (should | ||
| 1743 | (string-match | ||
| 1744 | "foo" | ||
| 1745 | (funcall | ||
| 1746 | this-shell-command-to-string | ||
| 1747 | (format "echo -n ${%s:?bla}" envvar)))))) | ||
| 1748 | |||
| 1749 | (unwind-protect | ||
| 1750 | ;; Set the empty value. | ||
| 1751 | (let ((process-environment | ||
| 1752 | (cons (concat envvar "=") process-environment))) | ||
| 1753 | ;; Value is null. | ||
| 1754 | (should | ||
| 1755 | (string-match | ||
| 1756 | "bla" | ||
| 1757 | (funcall | ||
| 1758 | this-shell-command-to-string | ||
| 1759 | (format "echo -n ${%s:?bla}" envvar)))) | ||
| 1760 | ;; Variable is set. | ||
| 1761 | (should | ||
| 1762 | (string-match | ||
| 1763 | (regexp-quote envvar) | ||
| 1764 | (funcall this-shell-command-to-string "set"))))) | ||
| 1765 | |||
| 1766 | ;; We force a reconnect, in order to have a clean environment. | ||
| 1767 | (tramp-cleanup-connection | ||
| 1768 | (tramp-dissect-file-name tramp-test-temporary-file-directory) | ||
| 1769 | 'keep-debug 'keep-password) | ||
| 1770 | (unwind-protect | ||
| 1771 | ;; Unset the variable. | ||
| 1772 | (let ((tramp-remote-process-environment | ||
| 1773 | (cons (concat envvar "=foo") | ||
| 1774 | tramp-remote-process-environment))) | ||
| 1775 | ;; Set the initial value, we want to unset below. | ||
| 1776 | (should | ||
| 1777 | (string-match | ||
| 1778 | "foo" | ||
| 1779 | (funcall | ||
| 1780 | this-shell-command-to-string | ||
| 1781 | (format "echo -n ${%s:?bla}" envvar)))) | ||
| 1782 | (let ((process-environment | ||
| 1783 | (cons envvar process-environment))) | ||
| 1784 | ;; Variable is unset. | ||
| 1785 | (should | ||
| 1786 | (string-match | ||
| 1787 | "bla" | ||
| 1788 | (funcall | ||
| 1789 | this-shell-command-to-string | ||
| 1790 | (format "echo -n ${%s:?bla}" envvar)))) | ||
| 1791 | ;; Variable is unset. | ||
| 1792 | (should-not | ||
| 1793 | (string-match | ||
| 1794 | (regexp-quote envvar) | ||
| 1795 | (funcall this-shell-command-to-string "set"))))))))) | ||
| 1796 | |||
| 1797 | (ert-deftest tramp-test30-vc-registered () | ||
| 1706 | "Check `vc-registered'." | 1798 | "Check `vc-registered'." |
| 1707 | :tags '(:expensive-test) | 1799 | :tags '(:expensive-test) |
| 1708 | (skip-unless (tramp--test-enabled)) | 1800 | (skip-unless (tramp--test-enabled)) |
| @@ -1771,7 +1863,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1771 | ;; Cleanup. | 1863 | ;; Cleanup. |
| 1772 | (ignore-errors (delete-directory tmp-name1 'recursive))))) | 1864 | (ignore-errors (delete-directory tmp-name1 'recursive))))) |
| 1773 | 1865 | ||
| 1774 | (ert-deftest tramp-test30-make-auto-save-file-name () | 1866 | (ert-deftest tramp-test31-make-auto-save-file-name () |
| 1775 | "Check `make-auto-save-file-name'." | 1867 | "Check `make-auto-save-file-name'." |
| 1776 | (skip-unless (tramp--test-enabled)) | 1868 | (skip-unless (tramp--test-enabled)) |
| 1777 | 1869 | ||
| @@ -2031,7 +2123,7 @@ Several special characters do not work properly there." | |||
| 2031 | (ignore-errors (delete-directory tmp-name2 'recursive))))) | 2123 | (ignore-errors (delete-directory tmp-name2 'recursive))))) |
| 2032 | 2124 | ||
| 2033 | (defun tramp--test-special-characters () | 2125 | (defun tramp--test-special-characters () |
| 2034 | "Perform the test in `tramp-test31-special-characters*'." | 2126 | "Perform the test in `tramp-test32-special-characters*'." |
| 2035 | ;; Newlines, slashes and backslashes in file names are not | 2127 | ;; Newlines, slashes and backslashes in file names are not |
| 2036 | ;; supported. So we don't test. And we don't test the tab | 2128 | ;; supported. So we don't test. And we don't test the tab |
| 2037 | ;; character on Windows or Cygwin, because the backslash is | 2129 | ;; character on Windows or Cygwin, because the backslash is |
| @@ -2072,14 +2164,14 @@ Several special characters do not work properly there." | |||
| 2072 | "{foo}bar{baz}")) | 2164 | "{foo}bar{baz}")) |
| 2073 | 2165 | ||
| 2074 | ;; These tests are inspired by Bug#17238. | 2166 | ;; These tests are inspired by Bug#17238. |
| 2075 | (ert-deftest tramp-test31-special-characters () | 2167 | (ert-deftest tramp-test32-special-characters () |
| 2076 | "Check special characters in file names." | 2168 | "Check special characters in file names." |
| 2077 | (skip-unless (tramp--test-enabled)) | 2169 | (skip-unless (tramp--test-enabled)) |
| 2078 | (skip-unless (not (tramp--test-rsync-p))) | 2170 | (skip-unless (not (tramp--test-rsync-p))) |
| 2079 | 2171 | ||
| 2080 | (tramp--test-special-characters)) | 2172 | (tramp--test-special-characters)) |
| 2081 | 2173 | ||
| 2082 | (ert-deftest tramp-test31-special-characters-with-stat () | 2174 | (ert-deftest tramp-test32-special-characters-with-stat () |
| 2083 | "Check special characters in file names. | 2175 | "Check special characters in file names. |
| 2084 | Use the `stat' command." | 2176 | Use the `stat' command." |
| 2085 | :tags '(:expensive-test) | 2177 | :tags '(:expensive-test) |
| @@ -2099,7 +2191,7 @@ Use the `stat' command." | |||
| 2099 | tramp-connection-properties))) | 2191 | tramp-connection-properties))) |
| 2100 | (tramp--test-special-characters))) | 2192 | (tramp--test-special-characters))) |
| 2101 | 2193 | ||
| 2102 | (ert-deftest tramp-test31-special-characters-with-perl () | 2194 | (ert-deftest tramp-test32-special-characters-with-perl () |
| 2103 | "Check special characters in file names. | 2195 | "Check special characters in file names. |
| 2104 | Use the `perl' command." | 2196 | Use the `perl' command." |
| 2105 | :tags '(:expensive-test) | 2197 | :tags '(:expensive-test) |
| @@ -2122,7 +2214,7 @@ Use the `perl' command." | |||
| 2122 | tramp-connection-properties))) | 2214 | tramp-connection-properties))) |
| 2123 | (tramp--test-special-characters))) | 2215 | (tramp--test-special-characters))) |
| 2124 | 2216 | ||
| 2125 | (ert-deftest tramp-test31-special-characters-with-ls () | 2217 | (ert-deftest tramp-test32-special-characters-with-ls () |
| 2126 | "Check special characters in file names. | 2218 | "Check special characters in file names. |
| 2127 | Use the `ls' command." | 2219 | Use the `ls' command." |
| 2128 | :tags '(:expensive-test) | 2220 | :tags '(:expensive-test) |
| @@ -2146,7 +2238,7 @@ Use the `ls' command." | |||
| 2146 | (tramp--test-special-characters))) | 2238 | (tramp--test-special-characters))) |
| 2147 | 2239 | ||
| 2148 | (defun tramp--test-utf8 () | 2240 | (defun tramp--test-utf8 () |
| 2149 | "Perform the test in `tramp-test32-utf8*'." | 2241 | "Perform the test in `tramp-test33-utf8*'." |
| 2150 | (let* ((utf8 (if (and (eq system-type 'darwin) | 2242 | (let* ((utf8 (if (and (eq system-type 'darwin) |
| 2151 | (memq 'utf-8-hfs (coding-system-list))) | 2243 | (memq 'utf-8-hfs (coding-system-list))) |
| 2152 | 'utf-8-hfs 'utf-8)) | 2244 | 'utf-8-hfs 'utf-8)) |
| @@ -2160,14 +2252,14 @@ Use the `ls' command." | |||
| 2160 | "银河系漫游指南系列" | 2252 | "银河系漫游指南系列" |
| 2161 | "Автостопом по гала́ктике"))) | 2253 | "Автостопом по гала́ктике"))) |
| 2162 | 2254 | ||
| 2163 | (ert-deftest tramp-test32-utf8 () | 2255 | (ert-deftest tramp-test33-utf8 () |
| 2164 | "Check UTF8 encoding in file names and file contents." | 2256 | "Check UTF8 encoding in file names and file contents." |
| 2165 | (skip-unless (tramp--test-enabled)) | 2257 | (skip-unless (tramp--test-enabled)) |
| 2166 | (skip-unless (not (tramp--test-rsync-p))) | 2258 | (skip-unless (not (tramp--test-rsync-p))) |
| 2167 | 2259 | ||
| 2168 | (tramp--test-utf8)) | 2260 | (tramp--test-utf8)) |
| 2169 | 2261 | ||
| 2170 | (ert-deftest tramp-test32-utf8-with-stat () | 2262 | (ert-deftest tramp-test33-utf8-with-stat () |
| 2171 | "Check UTF8 encoding in file names and file contents. | 2263 | "Check UTF8 encoding in file names and file contents. |
| 2172 | Use the `stat' command." | 2264 | Use the `stat' command." |
| 2173 | :tags '(:expensive-test) | 2265 | :tags '(:expensive-test) |
| @@ -2187,7 +2279,7 @@ Use the `stat' command." | |||
| 2187 | tramp-connection-properties))) | 2279 | tramp-connection-properties))) |
| 2188 | (tramp--test-utf8))) | 2280 | (tramp--test-utf8))) |
| 2189 | 2281 | ||
| 2190 | (ert-deftest tramp-test32-utf8-with-perl () | 2282 | (ert-deftest tramp-test33-utf8-with-perl () |
| 2191 | "Check UTF8 encoding in file names and file contents. | 2283 | "Check UTF8 encoding in file names and file contents. |
| 2192 | Use the `perl' command." | 2284 | Use the `perl' command." |
| 2193 | :tags '(:expensive-test) | 2285 | :tags '(:expensive-test) |
| @@ -2210,7 +2302,7 @@ Use the `perl' command." | |||
| 2210 | tramp-connection-properties))) | 2302 | tramp-connection-properties))) |
| 2211 | (tramp--test-utf8))) | 2303 | (tramp--test-utf8))) |
| 2212 | 2304 | ||
| 2213 | (ert-deftest tramp-test32-utf8-with-ls () | 2305 | (ert-deftest tramp-test33-utf8-with-ls () |
| 2214 | "Check UTF8 encoding in file names and file contents. | 2306 | "Check UTF8 encoding in file names and file contents. |
| 2215 | Use the `ls' command." | 2307 | Use the `ls' command." |
| 2216 | :tags '(:expensive-test) | 2308 | :tags '(:expensive-test) |
| @@ -2234,7 +2326,7 @@ Use the `ls' command." | |||
| 2234 | (tramp--test-utf8))) | 2326 | (tramp--test-utf8))) |
| 2235 | 2327 | ||
| 2236 | ;; This test is inspired by Bug#16928. | 2328 | ;; This test is inspired by Bug#16928. |
| 2237 | (ert-deftest tramp-test33-asynchronous-requests () | 2329 | (ert-deftest tramp-test34-asynchronous-requests () |
| 2238 | "Check parallel asynchronous requests. | 2330 | "Check parallel asynchronous requests. |
| 2239 | Such requests could arrive from timers, process filters and | 2331 | Such requests could arrive from timers, process filters and |
| 2240 | process sentinels. They shall not disturb each other." | 2332 | process sentinels. They shall not disturb each other." |
| @@ -2324,7 +2416,7 @@ process sentinels. They shall not disturb each other." | |||
| 2324 | (dolist (buf buffers) | 2416 | (dolist (buf buffers) |
| 2325 | (ignore-errors (kill-buffer buf))))))) | 2417 | (ignore-errors (kill-buffer buf))))))) |
| 2326 | 2418 | ||
| 2327 | (ert-deftest tramp-test34-recursive-load () | 2419 | (ert-deftest tramp-test35-recursive-load () |
| 2328 | "Check that Tramp does not fail due to recursive load." | 2420 | "Check that Tramp does not fail due to recursive load." |
| 2329 | (skip-unless (tramp--test-enabled)) | 2421 | (skip-unless (tramp--test-enabled)) |
| 2330 | 2422 | ||
| @@ -2347,7 +2439,7 @@ process sentinels. They shall not disturb each other." | |||
| 2347 | (mapconcat 'shell-quote-argument load-path " -L ") | 2439 | (mapconcat 'shell-quote-argument load-path " -L ") |
| 2348 | (shell-quote-argument code))))))) | 2440 | (shell-quote-argument code))))))) |
| 2349 | 2441 | ||
| 2350 | (ert-deftest tramp-test35-unload () | 2442 | (ert-deftest tramp-test36-unload () |
| 2351 | "Check that Tramp and its subpackages unload completely. | 2443 | "Check that Tramp and its subpackages unload completely. |
| 2352 | Since it unloads Tramp, it shall be the last test to run." | 2444 | Since it unloads Tramp, it shall be the last test to run." |
| 2353 | ;; Mark as failed until all symbols are unbound. | 2445 | ;; Mark as failed until all symbols are unbound. |
| @@ -2395,8 +2487,8 @@ Since it unloads Tramp, it shall be the last test to run." | |||
| 2395 | ;; * Fix `tramp-test06-directory-file-name' for `ftp'. | 2487 | ;; * Fix `tramp-test06-directory-file-name' for `ftp'. |
| 2396 | ;; * Fix `tramp-test15-copy-directory' for `rsync'. | 2488 | ;; * Fix `tramp-test15-copy-directory' for `rsync'. |
| 2397 | ;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?). | 2489 | ;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?). |
| 2398 | ;; * Fix Bug#16928. Set expected error of `tramp-test33-asynchronous-requests'. | 2490 | ;; * Fix Bug#16928. Set expected error of `tramp-test34-asynchronous-requests'. |
| 2399 | ;; * Fix `tramp-test35-unload' (Not all symbols are unbound). Set | 2491 | ;; * Fix `tramp-test36-unload' (Not all symbols are unbound). Set |
| 2400 | ;; expected error. | 2492 | ;; expected error. |
| 2401 | 2493 | ||
| 2402 | (defun tramp-test-all (&optional interactive) | 2494 | (defun tramp-test-all (&optional interactive) |