aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2014-04-25 18:11:07 +0200
committerJuanma Barranquero2014-04-25 18:11:07 +0200
commitdff4a9f6a4e9e42de6177e29faa7e3524b47e6d4 (patch)
tree60924b65da522416f928b436f8525f5bc8bfc3d7
parent8de17fac97652d77bffd24e41b0097c863bd752b (diff)
parent844465d6cac7c243e37e446067b1a2e06be293da (diff)
downloademacs-dff4a9f6a4e9e42de6177e29faa7e3524b47e6d4.tar.gz
emacs-dff4a9f6a4e9e42de6177e29faa7e3524b47e6d4.zip
Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/strings.texi6
-rw-r--r--lisp/ChangeLog34
-rw-r--r--lisp/comint.el5
-rw-r--r--lisp/emacs-lisp/cl.el1
-rw-r--r--lisp/emacs-lisp/lisp-mode.el2
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/perl-mode.el2
-rw-r--r--lisp/simple.el14
-rw-r--r--lisp/term.el5
-rw-r--r--lisp/term/xterm.el6
-rw-r--r--lisp/tooltip.el8
-rw-r--r--src/ChangeLog6
-rw-r--r--src/search.c56
-rw-r--r--test/ChangeLog14
-rw-r--r--test/automated/file-notify-tests.el39
-rw-r--r--test/automated/tramp-tests.el37
-rwxr-xr-xtest/indent/perl.perl2
18 files changed, 177 insertions, 68 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e9ea1f7459e..04b2e91ee4b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12014-04-25 Eli Zaretskii <eliz@gnu.org>
2
3 * strings.texi (Text Comparison): Mention
4 equal-including-properties for when text properties of the strings
5 matter for comparison.
6
12014-04-22 Eli Zaretskii <eliz@gnu.org> 72014-04-22 Eli Zaretskii <eliz@gnu.org>
2 8
3 * text.texi (Registers): Document register-read-with-preview. 9 * text.texi (Registers): Document register-read-with-preview.
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 24218a9cf15..e6b00f06f79 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -423,8 +423,10 @@ the symbol names are used. Case is always significant, regardless of
423 423
424This function is equivalent to @code{equal} for comparing two strings 424This function is equivalent to @code{equal} for comparing two strings
425(@pxref{Equality Predicates}). In particular, the text properties of 425(@pxref{Equality Predicates}). In particular, the text properties of
426the two strings are ignored. But if either argument is not a string 426the two strings are ignored; use @code{equal-including-properties} if
427or symbol, an error is signaled. 427you need to distinguish between strings that differ only in their text
428properties. However, unlike @code{equal}, if either argument is not a
429string or symbol, @code{string=} signals an error.
428 430
429@example 431@example
430(string= "abc" "abc") 432(string= "abc" "abc")
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1128b0f98d..4568c88c8d6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,37 @@
12014-04-25 Eli Zaretskii <eliz@gnu.org>
2
3 * tooltip.el (tooltip-show-help-non-mode, tooltip-show-help): Use
4 equal-including-properties to compare help-echo strings. (Bug#17331)
5
62014-04-25 Leo Liu <sdl.web@gmail.com>
7
8 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
9 Fix syntax for @. (Bug#17325)
10
112014-04-25 Daniel Colascione <dancol@dancol.org>
12
13 * emacs-lisp/cl.el (gv): Require gv early to break eager
14 macro-expansion cycles.
15
162014-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * simple.el (region-active-p): Check there's a mark (bug#17324).
19
20 * simple.el (completion-list-mode-map): Use choose-completion for the
21 mouse binding as well (bug#17302).
22 (completion-list-mode, completion-setup-function): Adjust docstring and
23 echo area message accordingly.
24 * progmodes/idlwave.el (idlwave-choose-completion): Adjust to new
25 calling convention of choose-completion.
26 * comint.el (comint-dynamic-list-completions):
27 * term.el (term-dynamic-list-completions): Accept choose-completion.
28
29 * progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
30 &, |, +, - and * can't be a division (bug#17317).
31
32 * term/xterm.el (xterm--version-handler): Don't use modern xterm
33 features on gnome-terminal (bug#16988).
34
12014-04-25 Thien-Thi Nguyen <ttn@gnu.org> 352014-04-25 Thien-Thi Nguyen <ttn@gnu.org>
2 36
3 Improve Scheme font-locking for (define ((foo ...) ...) ...). 37 Improve Scheme font-locking for (define ((foo ...) ...) ...).
diff --git a/lisp/comint.el b/lisp/comint.el
index dfc3fee0884..da3782717c0 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3332,8 +3332,9 @@ the completions."
3332 (and (consp first) (consp (event-start first)) 3332 (and (consp first) (consp (event-start first))
3333 (eq (window-buffer (posn-window (event-start first))) 3333 (eq (window-buffer (posn-window (event-start first)))
3334 (get-buffer "*Completions*")) 3334 (get-buffer "*Completions*"))
3335 (eq (key-binding key) 'mouse-choose-completion))) 3335 (memq (key-binding key)
3336 ;; If the user does mouse-choose-completion with the mouse, 3336 '(mouse-choose-completion choose-completion))))
3337 ;; If the user does choose-completion with the mouse,
3337 ;; execute the command, then delete the completion window. 3338 ;; execute the command, then delete the completion window.
3338 (progn 3339 (progn
3339 (choose-completion first) 3340 (choose-completion first)
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index fc09ff004e1..d99166e41c1 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -29,6 +29,7 @@
29 29
30(require 'cl-lib) 30(require 'cl-lib)
31(require 'macroexp) 31(require 'macroexp)
32(require 'gv)
32 33
33;; (defun cl--rename () 34;; (defun cl--rename ()
34;; (let ((vdefs ()) 35;; (let ((vdefs ())
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 30df19d5f63..7e00d0b2cf9 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -74,7 +74,7 @@ It has `lisp-mode-abbrev-table' as its parent."
74 (modify-syntax-entry ?` "' " table) 74 (modify-syntax-entry ?` "' " table)
75 (modify-syntax-entry ?' "' " table) 75 (modify-syntax-entry ?' "' " table)
76 (modify-syntax-entry ?, "' " table) 76 (modify-syntax-entry ?, "' " table)
77 (modify-syntax-entry ?@ "' " table) 77 (modify-syntax-entry ?@ "_ p" table)
78 ;; Used to be singlequote; changed for flonums. 78 ;; Used to be singlequote; changed for flonums.
79 (modify-syntax-entry ?. "_ " table) 79 (modify-syntax-entry ?. "_ " table)
80 (modify-syntax-entry ?# "' " table) 80 (modify-syntax-entry ?# "' " table)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 8d4320669a1..86a16036e10 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -7170,7 +7170,7 @@ If these don't exist, a letter in the string is automatically selected."
7170 7170
7171(defun idlwave-choose-completion (&rest args) 7171(defun idlwave-choose-completion (&rest args)
7172 "Choose the completion that point is in or next to." 7172 "Choose the completion that point is in or next to."
7173 (interactive) 7173 (interactive (list last-nonmenu-event))
7174 (apply 'idlwave-choose 'choose-completion args)) 7174 (apply 'idlwave-choose 'choose-completion args))
7175 7175
7176(defun idlwave-mouse-choose-completion (&rest args) 7176(defun idlwave-mouse-choose-completion (&rest args)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index f89fec7b1e0..ef372a34fdb 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -281,7 +281,7 @@
281 ((concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" 281 ((concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
282 (regexp-opt '("split" "if" "unless" "until" "while" "split" 282 (regexp-opt '("split" "if" "unless" "until" "while" "split"
283 "grep" "map" "not" "or" "and" "for" "foreach")) 283 "grep" "map" "not" "or" "and" "for" "foreach"))
284 "\\|[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)") 284 "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)")
285 (2 (ignore 285 (2 (ignore
286 (if (and (match-end 1) ; / at BOL. 286 (if (and (match-end 1) ; / at BOL.
287 (save-excursion 287 (save-excursion
diff --git a/lisp/simple.el b/lisp/simple.el
index 17aba8e6a40..e3bae58a380 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4503,7 +4503,12 @@ Some commands act specially on the region when Transient Mark
4503mode is enabled. Usually, such commands should use 4503mode is enabled. Usually, such commands should use
4504`use-region-p' instead of this function, because `use-region-p' 4504`use-region-p' instead of this function, because `use-region-p'
4505also checks the value of `use-empty-active-region'." 4505also checks the value of `use-empty-active-region'."
4506 (and transient-mark-mode mark-active)) 4506 (and transient-mark-mode mark-active
4507 ;; FIXME: Somehow we sometimes end up with mark-active non-nil but
4508 ;; without the mark being set (e.g. bug#17324). We really should fix
4509 ;; that problem, but in the mean time, let's make sure we don't say the
4510 ;; region is active when there's no mark.
4511 (mark)))
4507 4512
4508 4513
4509(defvar redisplay-unhighlight-region-function 4514(defvar redisplay-unhighlight-region-function
@@ -6872,7 +6877,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
6872 6877
6873(defvar completion-list-mode-map 6878(defvar completion-list-mode-map
6874 (let ((map (make-sparse-keymap))) 6879 (let ((map (make-sparse-keymap)))
6875 (define-key map [mouse-2] 'mouse-choose-completion) 6880 (define-key map [mouse-2] 'choose-completion)
6876 (define-key map [follow-link] 'mouse-face) 6881 (define-key map [follow-link] 'mouse-face)
6877 (define-key map [down-mouse-2] nil) 6882 (define-key map [down-mouse-2] nil)
6878 (define-key map "\C-m" 'choose-completion) 6883 (define-key map "\C-m" 'choose-completion)
@@ -7121,8 +7126,7 @@ back on `completion-list-insert-choice-function' when nil."
7121 "Major mode for buffers showing lists of possible completions. 7126 "Major mode for buffers showing lists of possible completions.
7122Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\ 7127Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
7123 to select the completion near point. 7128 to select the completion near point.
7124Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\ 7129Or click to select one with the mouse.
7125 with the mouse.
7126 7130
7127\\{completion-list-mode-map}" 7131\\{completion-list-mode-map}"
7128 (set (make-local-variable 'completion-base-size) nil)) 7132 (set (make-local-variable 'completion-base-size) nil))
@@ -7180,7 +7184,7 @@ Called from `temp-buffer-show-hook'."
7180 (goto-char (point-min)) 7184 (goto-char (point-min))
7181 (if (display-mouse-p) 7185 (if (display-mouse-p)
7182 (insert (substitute-command-keys 7186 (insert (substitute-command-keys
7183 "Click \\[mouse-choose-completion] on a completion to select it.\n"))) 7187 "Click on a completion to select it.\n")))
7184 (insert (substitute-command-keys 7188 (insert (substitute-command-keys
7185 "In this buffer, type \\[choose-completion] to \ 7189 "In this buffer, type \\[choose-completion] to \
7186select the completion near point.\n\n")))))) 7190select the completion near point.\n\n"))))))
diff --git a/lisp/term.el b/lisp/term.el
index 97108c330a8..ce6125e2790 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -4137,8 +4137,9 @@ Typing SPC flushes the help buffer."
4137 (and (consp first) 4137 (and (consp first)
4138 (eq (window-buffer (posn-window (event-start first))) 4138 (eq (window-buffer (posn-window (event-start first)))
4139 (get-buffer "*Completions*")) 4139 (get-buffer "*Completions*"))
4140 (eq (key-binding key) 'mouse-choose-completion))) 4140 (memq (key-binding key)
4141 ;; If the user does mouse-choose-completion with the mouse, 4141 '(mouse-choose-completion choose-completion))))
4142 ;; If the user does choose-completion with the mouse,
4142 ;; execute the command, then delete the completion window. 4143 ;; execute the command, then delete the completion window.
4143 (progn 4144 (progn
4144 (choose-completion first) 4145 (choose-completion first)
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 33eb61dac1e..f8ff0cc91dc 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -530,6 +530,12 @@ The relevant features are:
530 ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0. 530 ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
531 (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str) 531 (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
532 (let ((version (string-to-number (match-string 2 str)))) 532 (let ((version (string-to-number (match-string 2 str))))
533 (when (and (> version 2000) (equal (match-string 1 str) "1"))
534 ;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0"
535 ;; with a large NNNN but is based on a rather old xterm code.
536 ;; Gnome terminal 3.6.1 reports 1;3406;0
537 ;; Gnome terminal 2.32.1 reports 1;2802;0
538 (setq version 200))
533 ;; If version is 242 or higher, assume the xterm supports 539 ;; If version is 242 or higher, assume the xterm supports
534 ;; reporting the background color (TODO: maybe earlier 540 ;; reporting the background color (TODO: maybe earlier
535 ;; versions do too...) 541 ;; versions do too...)
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 059370f2eee..9d0954fc5dc 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -343,10 +343,10 @@ It is also called if Tooltip mode is on, for text-only displays."
343 ((stringp help) 343 ((stringp help)
344 (setq help (replace-regexp-in-string "\n" ", " help)) 344 (setq help (replace-regexp-in-string "\n" ", " help))
345 (unless (or tooltip-previous-message 345 (unless (or tooltip-previous-message
346 (string-equal help (current-message)) 346 (equal-including-properties help (current-message))
347 (and (stringp tooltip-help-message) 347 (and (stringp tooltip-help-message)
348 (string-equal tooltip-help-message 348 (equal-including-properties tooltip-help-message
349 (current-message)))) 349 (current-message))))
350 (setq tooltip-previous-message (current-message))) 350 (setq tooltip-previous-message (current-message)))
351 (setq tooltip-help-message help) 351 (setq tooltip-help-message help)
352 (let ((message-truncate-lines t) 352 (let ((message-truncate-lines t)
@@ -369,7 +369,7 @@ MSG is either a help string to display, or nil to cancel the display."
369 ;; Cancel display. This also cancels a delayed tip, if 369 ;; Cancel display. This also cancels a delayed tip, if
370 ;; there is one. 370 ;; there is one.
371 (tooltip-hide)) 371 (tooltip-hide))
372 ((equal previous-help msg) 372 ((equal-including-properties previous-help msg)
373 ;; Same help as before (but possibly the mouse has moved). 373 ;; Same help as before (but possibly the mouse has moved).
374 ;; Keep what we have. 374 ;; Keep what we have.
375 ) 375 )
diff --git a/src/ChangeLog b/src/ChangeLog
index 654b9425770..9d4fd2d6d37 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-04-25 Eli Zaretskii <eliz@gnu.org>
2
3 * search.c (Fnewline_cache_check): Don't try to count newlines
4 outside the buffer's restriction, as find_newline doesn't support
5 that.
6
12014-04-24 Stefan Monnier <monnier@iro.umontreal.ca> 72014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * window.c (Fset_window_configuration): Deactivate the mark before 9 * window.c (Fset_window_configuration): Deactivate the mark before
diff --git a/src/search.c b/src/search.c
index ee449213ace..dc4820d8588 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3199,7 +3199,7 @@ the first based on the cache, the second based on actually scanning
3199the buffer. If the buffer doesn't have a cache, the value is nil. */) 3199the buffer. If the buffer doesn't have a cache, the value is nil. */)
3200 (Lisp_Object buffer) 3200 (Lisp_Object buffer)
3201{ 3201{
3202 struct buffer *buf; 3202 struct buffer *buf, *old = NULL;
3203 ptrdiff_t shortage, nl_count_cache, nl_count_buf; 3203 ptrdiff_t shortage, nl_count_cache, nl_count_buf;
3204 Lisp_Object cache_newlines, buf_newlines, val; 3204 Lisp_Object cache_newlines, buf_newlines, val;
3205 ptrdiff_t from, found, i; 3205 ptrdiff_t from, found, i;
@@ -3210,6 +3210,7 @@ the buffer. If the buffer doesn't have a cache, the value is nil. */)
3210 { 3210 {
3211 CHECK_BUFFER (buffer); 3211 CHECK_BUFFER (buffer);
3212 buf = XBUFFER (buffer); 3212 buf = XBUFFER (buffer);
3213 old = current_buffer;
3213 } 3214 }
3214 if (buf->base_buffer) 3215 if (buf->base_buffer)
3215 buf = buf->base_buffer; 3216 buf = buf->base_buffer;
@@ -3219,46 +3220,63 @@ the buffer. If the buffer doesn't have a cache, the value is nil. */)
3219 || buf->newline_cache == NULL) 3220 || buf->newline_cache == NULL)
3220 return Qnil; 3221 return Qnil;
3221 3222
3223 /* find_newline can only work on the current buffer. */
3224 if (old != NULL)
3225 set_buffer_internal_1 (buf);
3226
3222 /* How many newlines are there according to the cache? */ 3227 /* How many newlines are there according to the cache? */
3223 find_newline (BUF_BEG (buf), BUF_BEG_BYTE (buf), 3228 find_newline (BEGV, BEGV_BYTE, ZV, ZV_BYTE,
3224 BUF_Z (buf), BUF_Z_BYTE (buf),
3225 TYPE_MAXIMUM (ptrdiff_t), &shortage, NULL, true); 3229 TYPE_MAXIMUM (ptrdiff_t), &shortage, NULL, true);
3226 nl_count_cache = TYPE_MAXIMUM (ptrdiff_t) - shortage; 3230 nl_count_cache = TYPE_MAXIMUM (ptrdiff_t) - shortage;
3227 3231
3228 /* Create vector and populate it. */ 3232 /* Create vector and populate it. */
3229 cache_newlines = make_uninit_vector (nl_count_cache); 3233 cache_newlines = make_uninit_vector (nl_count_cache);
3230 for (from = BUF_BEG( buf), found = from, i = 0; 3234
3231 from < BUF_Z (buf); 3235 if (nl_count_cache)
3232 from = found, i++)
3233 { 3236 {
3234 ptrdiff_t from_byte = CHAR_TO_BYTE (from); 3237 for (from = BEGV, found = from, i = 0; from < ZV; from = found, i++)
3238 {
3239 ptrdiff_t from_byte = CHAR_TO_BYTE (from);
3235 3240
3236 found = find_newline (from, from_byte, 0, -1, 1, &shortage, NULL, true); 3241 found = find_newline (from, from_byte, 0, -1, 1, &shortage,
3237 if (shortage == 0) 3242 NULL, true);
3238 ASET (cache_newlines, i, make_number (found - 1)); 3243 if (shortage != 0 || i >= nl_count_cache)
3244 break;
3245 ASET (cache_newlines, i, make_number (found - 1));
3246 }
3247 /* Fill the rest of slots with an invalid position. */
3248 for ( ; i < nl_count_cache; i++)
3249 ASET (cache_newlines, i, make_number (-1));
3239 } 3250 }
3240 3251
3241 /* Now do the same, but without using the cache. */ 3252 /* Now do the same, but without using the cache. */
3242 find_newline1 (BUF_BEG (buf), BUF_BEG_BYTE (buf), 3253 find_newline1 (BEGV, BEGV_BYTE, ZV, ZV_BYTE,
3243 BUF_Z (buf), BUF_Z_BYTE (buf),
3244 TYPE_MAXIMUM (ptrdiff_t), &shortage, NULL, true); 3254 TYPE_MAXIMUM (ptrdiff_t), &shortage, NULL, true);
3245 nl_count_buf = TYPE_MAXIMUM (ptrdiff_t) - shortage; 3255 nl_count_buf = TYPE_MAXIMUM (ptrdiff_t) - shortage;
3246 buf_newlines = make_uninit_vector (nl_count_buf); 3256 buf_newlines = make_uninit_vector (nl_count_buf);
3247 for (from = BUF_BEG( buf), found = from, i = 0; 3257 if (nl_count_buf)
3248 from < BUF_Z (buf);
3249 from = found, i++)
3250 { 3258 {
3251 ptrdiff_t from_byte = CHAR_TO_BYTE (from); 3259 for (from = BEGV, found = from, i = 0; from < ZV; from = found, i++)
3260 {
3261 ptrdiff_t from_byte = CHAR_TO_BYTE (from);
3252 3262
3253 found = find_newline1 (from, from_byte, 0, -1, 1, &shortage, NULL, true); 3263 found = find_newline1 (from, from_byte, 0, -1, 1, &shortage,
3254 if (shortage == 0) 3264 NULL, true);
3255 ASET (buf_newlines, i, make_number (found - 1)); 3265 if (shortage != 0 || i >= nl_count_buf)
3266 break;
3267 ASET (buf_newlines, i, make_number (found - 1));
3268 }
3269 for ( ; i < nl_count_buf; i++)
3270 ASET (buf_newlines, i, make_number (-1));
3256 } 3271 }
3257 3272
3258 /* Construct the value and return it. */ 3273 /* Construct the value and return it. */
3259 val = make_uninit_vector (2); 3274 val = make_uninit_vector (2);
3260 ASET (val, 0, cache_newlines); 3275 ASET (val, 0, cache_newlines);
3261 ASET (val, 1, buf_newlines); 3276 ASET (val, 1, buf_newlines);
3277
3278 if (old != NULL)
3279 set_buffer_internal_1 (old);
3262 return val; 3280 return val;
3263} 3281}
3264 3282
diff --git a/test/ChangeLog b/test/ChangeLog
index 7652e71f5c3..afc05d338a9 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,17 @@
12014-04-25 Michael Albinus <michael.albinus@gmx.de>
2
3 * automated/tramp-tests.el (top):
4 * automated/file-notify-tests.el (top): Do not disable interactive
5 passwords in batch mode.
6 (password-cache-expiry): Set to nil.
7
8 * automated/file-notify-tests.el
9 (file-notify-test-remote-temporary-file-directory):
10 * automated/tramp-tests.el (tramp-test-temporary-file-directory):
11 Use a mock-up method as default.
12 (tramp-test00-availability): Print the used directory name.
13 (tramp-test33-recursive-load): Fix typo.
14
12014-04-22 Michael Albinus <michael.albinus@gmx.de> 152014-04-22 Michael Albinus <michael.albinus@gmx.de>
2 16
3 * automated/tramp-tests.el (tramp--test-check-files): Remove traces. 17 * automated/tramp-tests.el (tramp--test-check-files): Remove traces.
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index f1d9aee974c..d9a5b039216 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -19,15 +19,17 @@
19 19
20;;; Commentary: 20;;; Commentary:
21 21
22;; Some of the tests require access to a remote host files. Set 22;; Some of the tests require access to a remote host files. Since
23;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order 23;; this could be problematic, a mock-up connection method "mock" is
24;; to overwrite the default value. If you want to skip tests 24;; used. Emulating a remote connection, it simply calls "sh -i".
25;; accessing a remote host, set this environment variable to 25;; Tramp's file name handlers still run, so this test is sufficient
26;; "/dev/null" or whatever is appropriate on your system. 26;; except for connection establishing.
27 27
28;; When running the tests in batch mode, it must NOT require an 28;; If you want to test a real Tramp connection, set
29;; interactive password prompt unless the environment variable 29;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order to
30;; $REMOTE_ALLOW_PASSWORD is set. 30;; overwrite the default value. If you want to skip tests accessing a
31;; remote host, set this environment variable to "/dev/null" or
32;; whatever is appropriate on your system.
31 33
32;; A whole test run can be performed calling the command `file-notify-test-all'. 34;; A whole test run can be performed calling the command `file-notify-test-all'.
33 35
@@ -35,13 +37,22 @@
35 37
36(require 'ert) 38(require 'ert)
37(require 'filenotify) 39(require 'filenotify)
40(require 'tramp)
38 41
39;; There is no default value on w32 systems, which could work out of the box. 42;; There is no default value on w32 systems, which could work out of the box.
40(defconst file-notify-test-remote-temporary-file-directory 43(defconst file-notify-test-remote-temporary-file-directory
41 (cond 44 (cond
42 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY")) 45 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
43 ((eq system-type 'windows-nt) null-device) 46 ((eq system-type 'windows-nt) null-device)
44 (t (format "/ssh::%s" temporary-file-directory))) 47 (t (add-to-list
48 'tramp-methods
49 '("mock"
50 (tramp-login-program "sh")
51 (tramp-login-args (("-i")))
52 (tramp-remote-shell "/bin/sh")
53 (tramp-remote-shell-args ("-c"))
54 (tramp-connection-timeout 10)))
55 (format "/mock::%s" temporary-file-directory)))
45 "Temporary directory for Tramp tests.") 56 "Temporary directory for Tramp tests.")
46 57
47(defvar file-notify--test-tmpfile nil) 58(defvar file-notify--test-tmpfile nil)
@@ -49,14 +60,10 @@
49(defvar file-notify--test-results nil) 60(defvar file-notify--test-results nil)
50(defvar file-notify--test-event nil) 61(defvar file-notify--test-event nil)
51 62
52(require 'tramp) 63(setq password-cache-expiry nil
53(setq tramp-verbose 0 64 tramp-verbose 0
54 tramp-message-show-message nil) 65 tramp-message-show-message nil)
55 66
56;; Disable interactive passwords in batch mode.
57(when (and noninteractive (not (getenv "REMOTE_ALLOW_PASSWORD")))
58 (defalias 'tramp-read-passwd 'ignore))
59
60;; This shall happen on hydra only. 67;; This shall happen on hydra only.
61(when (getenv "NIX_STORE") 68(when (getenv "NIX_STORE")
62 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 69 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index b6e757d3ae5..2640ee9cef5 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -21,15 +21,17 @@
21 21
22;; The tests require a recent ert.el from Emacs 24.4. 22;; The tests require a recent ert.el from Emacs 24.4.
23 23
24;; Some of the tests require access to a remote host files. Set 24;; Some of the tests require access to a remote host files. Since
25;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order 25;; this could be problematic, a mock-up connection method "mock" is
26;; to overwrite the default value. If you want to skip tests 26;; used. Emulating a remote connection, it simply calls "sh -i".
27;; accessing a remote host, set this environment variable to 27;; Tramp's file name handlers still run, so this test is sufficient
28;; "/dev/null" or whatever is appropriate on your system. 28;; except for connection establishing.
29 29
30;; When running the tests in batch mode, it must NOT require an 30;; If you want to test a real Tramp connection, set
31;; interactive password prompt unless the environment variable 31;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order to
32;; $REMOTE_ALLOW_PASSWORD is set. 32;; overwrite the default value. If you want to skip tests accessing a
33;; remote host, set this environment variable to "/dev/null" or
34;; whatever is appropriate on your system.
33 35
34;; A whole test run can be performed calling the command `tramp-test-all'. 36;; A whole test run can be performed calling the command `tramp-test-all'.
35 37
@@ -51,7 +53,15 @@
51 (cond 53 (cond
52 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY")) 54 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
53 ((eq system-type 'windows-nt) null-device) 55 ((eq system-type 'windows-nt) null-device)
54 (t (format "/ssh::%s" temporary-file-directory))) 56 (t (add-to-list
57 'tramp-methods
58 '("mock"
59 (tramp-login-program "sh")
60 (tramp-login-args (("-i")))
61 (tramp-remote-shell "/bin/sh")
62 (tramp-remote-shell-args ("-c"))
63 (tramp-connection-timeout 10)))
64 (format "/mock::%s" temporary-file-directory)))
55 "Temporary directory for Tramp tests.") 65 "Temporary directory for Tramp tests.")
56 66
57(setq password-cache-expiry nil 67(setq password-cache-expiry nil
@@ -59,10 +69,6 @@
59 tramp-copy-size-limit nil 69 tramp-copy-size-limit nil
60 tramp-message-show-message nil) 70 tramp-message-show-message nil)
61 71
62;; Disable interactive passwords in batch mode.
63(when (and noninteractive (not (getenv "REMOTE_ALLOW_PASSWORD")))
64 (defalias 'tramp-read-passwd 'ignore))
65
66;; This shall happen on hydra only. 72;; This shall happen on hydra only.
67(when (getenv "NIX_STORE") 73(when (getenv "NIX_STORE")
68 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 74 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
@@ -127,6 +133,7 @@ eval properly in `should', `should-not' or `should-error'."
127(ert-deftest tramp-test00-availability () 133(ert-deftest tramp-test00-availability ()
128 "Test availability of Tramp functions." 134 "Test availability of Tramp functions."
129 :expected-result (if (tramp--test-enabled) :passed :failed) 135 :expected-result (if (tramp--test-enabled) :passed :failed)
136 (message "Remote directory: `%s'" tramp-test-temporary-file-directory)
130 (should (ignore-errors 137 (should (ignore-errors
131 (and 138 (and
132 (file-remote-p tramp-test-temporary-file-directory) 139 (file-remote-p tramp-test-temporary-file-directory)
@@ -1589,7 +1596,7 @@ process sentinels. They shall not disturb each other."
1589 (dolist (code 1596 (dolist (code
1590 (list 1597 (list
1591 (format 1598 (format
1592 "(expand-file-name %S))" 1599 "(expand-file-name %S)"
1593 tramp-test-temporary-file-directory) 1600 tramp-test-temporary-file-directory)
1594 (format 1601 (format
1595 "(let ((default-directory %S)) (expand-file-name %S))" 1602 "(let ((default-directory %S)) (expand-file-name %S))"
diff --git a/test/indent/perl.perl b/test/indent/perl.perl
index 7cb877b0a95..c7a2fbfb2d2 100755
--- a/test/indent/perl.perl
+++ b/test/indent/perl.perl
@@ -1,6 +1,8 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# -*- eval: (bug-reference-mode 1) -*- 2# -*- eval: (bug-reference-mode 1) -*-
3 3
4if ($c && /====/){xyz;}
5
4print <<"EOF1" . s/he"llo/th'ere/; 6print <<"EOF1" . s/he"llo/th'ere/;
5foo 7foo
6EOF2 8EOF2