[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116993: Merge from emacs-24; up to r116985
From: |
Daniel Colascione |
Subject: |
[Emacs-diffs] trunk r116993: Merge from emacs-24; up to r116985 |
Date: |
Sat, 19 Apr 2014 20:32:16 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116993 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Sat 2014-04-19 13:32:05 -0700
message:
Merge from emacs-24; up to r116985
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/sh-script.el shscript.el-20091113204419-o5vbwnq5f7feedwu-727
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/intervals.c intervals.c-20091113204419-o5vbwnq5f7feedwu-519
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/tramp-tests.el tramptests.el-20131105142319-d9zp3oprkpxj5v1e-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-04-18 23:36:51 +0000
+++ b/lisp/ChangeLog 2014-04-19 20:32:05 +0000
@@ -1,3 +1,8 @@
+2014-04-19 Stefan Monnier <address@hidden>
+
+ * progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
+ assignments such as "case=hello" (bug#17297).
+
2014-04-18 Michael Albinus <address@hidden>
* net/tramp.el (tramp-run-real-handler, tramp-file-name-handler):
=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el 2014-03-05 19:02:55 +0000
+++ b/lisp/progmodes/sh-script.el 2014-04-19 17:14:27 +0000
@@ -1832,9 +1832,10 @@
(defun sh-smie--sh-keyword-p (tok)
"Non-nil if TOK (at which we're looking) really is a keyword."
- (if (equal tok "in")
- (sh-smie--sh-keyword-in-p)
- (sh-smie--keyword-p)))
+ (cond
+ ((looking-at "[[:alnum:]_]+=") nil)
+ ((equal tok "in") (sh-smie--sh-keyword-in-p))
+ (t (sh-smie--keyword-p))))
(defun sh-smie-sh-forward-token ()
(if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-04-18 23:36:51 +0000
+++ b/src/ChangeLog 2014-04-19 20:32:05 +0000
@@ -1,3 +1,9 @@
+2014-04-19 Stefan Monnier <address@hidden>
+
+ * intervals.c (rotate_right, rotate_left): Fix up length computation.
+ Also change identifiers to match the comments, and add more assertions
+ (bug#16234).
+
2014-04-18 Paul Eggert <address@hidden>
* emacs.c (close_output_streams): Don't clear and restore errno.
=== modified file 'src/intervals.c'
--- a/src/intervals.c 2014-01-21 02:28:57 +0000
+++ b/src/intervals.c 2014-04-19 18:13:26 +0000
@@ -332,39 +332,43 @@
*/
static INTERVAL
-rotate_right (INTERVAL interval)
+rotate_right (INTERVAL A)
{
- INTERVAL i;
- INTERVAL B = interval->left;
- ptrdiff_t old_total = interval->total_length;
+ INTERVAL B = A->left;
+ INTERVAL c = B->right;
+ ptrdiff_t old_total = A->total_length;
+
+ eassert (old_total > 0);
+ eassert (old_total
+ > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->right));
+ eassert (TOTAL_LENGTH (B)
+ > TOTAL_LENGTH (B->left) + TOTAL_LENGTH (c));
/* Deal with any Parent of A; make it point to B. */
- if (! ROOT_INTERVAL_P (interval))
+ if (! ROOT_INTERVAL_P (A))
{
- if (AM_LEFT_CHILD (interval))
- set_interval_left (INTERVAL_PARENT (interval), B);
+ if (AM_LEFT_CHILD (A))
+ set_interval_left (INTERVAL_PARENT (A), B);
else
- set_interval_right (INTERVAL_PARENT (interval), B);
+ set_interval_right (INTERVAL_PARENT (A), B);
}
- copy_interval_parent (B, interval);
-
- /* Make B the parent of A */
- i = B->right;
- set_interval_right (B, interval);
- set_interval_parent (interval, B);
-
- /* Make A point to c */
- set_interval_left (interval, i);
- if (i)
- set_interval_parent (i, interval);
+ copy_interval_parent (B, A);
+
+ /* Make B the parent of A. */
+ set_interval_right (B, A);
+ set_interval_parent (A, B);
+
+ /* Make A point to c. */
+ set_interval_left (A, c);
+ if (c)
+ set_interval_parent (c, A);
/* A's total length is decreased by the length of B and its left child. */
- interval->total_length -= B->total_length - LEFT_TOTAL_LENGTH (interval);
- eassert (TOTAL_LENGTH (interval) >= 0);
+ A->total_length -= B->total_length - TOTAL_LENGTH (c);
+ eassert (TOTAL_LENGTH (A) > 0);
/* B must have the same total length of A. */
B->total_length = old_total;
- eassert (TOTAL_LENGTH (B) >= 0);
return B;
}
@@ -379,39 +383,43 @@
*/
static INTERVAL
-rotate_left (INTERVAL interval)
+rotate_left (INTERVAL A)
{
- INTERVAL i;
- INTERVAL B = interval->right;
- ptrdiff_t old_total = interval->total_length;
+ INTERVAL B = A->right;
+ INTERVAL c = B->left;
+ ptrdiff_t old_total = A->total_length;
+
+ eassert (old_total > 0);
+ eassert (old_total
+ > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->left));
+ eassert (TOTAL_LENGTH (B)
+ > TOTAL_LENGTH (B->right) + TOTAL_LENGTH (c));
/* Deal with any parent of A; make it point to B. */
- if (! ROOT_INTERVAL_P (interval))
+ if (! ROOT_INTERVAL_P (A))
{
- if (AM_LEFT_CHILD (interval))
- set_interval_left (INTERVAL_PARENT (interval), B);
+ if (AM_LEFT_CHILD (A))
+ set_interval_left (INTERVAL_PARENT (A), B);
else
- set_interval_right (INTERVAL_PARENT (interval), B);
+ set_interval_right (INTERVAL_PARENT (A), B);
}
- copy_interval_parent (B, interval);
-
- /* Make B the parent of A */
- i = B->left;
- set_interval_left (B, interval);
- set_interval_parent (interval, B);
-
- /* Make A point to c */
- set_interval_right (interval, i);
- if (i)
- set_interval_parent (i, interval);
+ copy_interval_parent (B, A);
+
+ /* Make B the parent of A. */
+ set_interval_left (B, A);
+ set_interval_parent (A, B);
+
+ /* Make A point to c. */
+ set_interval_right (A, c);
+ if (c)
+ set_interval_parent (c, A);
/* A's total length is decreased by the length of B and its right child. */
- interval->total_length -= B->total_length - RIGHT_TOTAL_LENGTH (interval);
- eassert (TOTAL_LENGTH (interval) >= 0);
+ A->total_length -= B->total_length - TOTAL_LENGTH (c);
+ eassert (TOTAL_LENGTH (A) > 0);
/* B must have the same total length of A. */
B->total_length = old_total;
- eassert (TOTAL_LENGTH (B) >= 0);
return B;
}
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2014-04-18 23:36:51 +0000
+++ b/test/ChangeLog 2014-04-19 20:32:05 +0000
@@ -1,3 +1,8 @@
+2014-04-19 Michael Albinus <address@hidden>
+
+ * automated/tramp-tests.el (tramp--test-check-files): Extend test.
+ (tramp-test31-utf8): Let-bind also `file-name-coding-system'.
+
2014-04-18 Michael Albinus <address@hidden>
* automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el 2014-04-18 18:58:13 +0000
+++ b/test/automated/tramp-tests.el 2014-04-19 14:14:26 +0000
@@ -1418,23 +1418,37 @@
(defun tramp--test-check-files (&rest files)
"Runs a simple but comprehensive test over every file in FILES."
- (let ((tmp-name (tramp--test-make-temp-name)))
+ (let ((tmp-name1 (tramp--test-make-temp-name))
+ (tmp-name2 (tramp--test-make-temp-name 'local)))
(unwind-protect
(progn
- (make-directory tmp-name)
+ (make-directory tmp-name1)
+ (make-directory tmp-name2)
(dolist (elt files)
- (let ((file (expand-file-name elt tmp-name)))
- (write-region elt nil file)
- (should (file-exists-p file))
+ (let ((file1 (expand-file-name elt tmp-name1))
+ (file2 (expand-file-name elt tmp-name2)))
+ (write-region elt nil file1)
+ (should (file-exists-p file1))
;; Check file contents.
(with-temp-buffer
- (insert-file-contents file)
- (should (string-equal (buffer-string) elt)))))
+ (insert-file-contents file1)
+ (should (string-equal (buffer-string) elt)))
+ ;; Copy file both directions.
+ (copy-file file1 tmp-name2)
+ (should (file-exists-p file2))
+ (delete-file file1)
+ (should-not (file-exists-p file1))
+ (copy-file file2 tmp-name1)
+ (should (file-exists-p file1))))
;; Check file names.
(should (equal (directory-files
- tmp-name nil directory-files-no-dot-files-regexp)
- (sort files 'string-lessp))))
- (ignore-errors (delete-directory tmp-name 'recursive)))))
+ tmp-name1 nil directory-files-no-dot-files-regexp)
+ (sort (copy-sequence files) 'string-lessp)))
+ (should (equal (directory-files
+ tmp-name2 nil directory-files-no-dot-files-regexp)
+ (sort (copy-sequence files) 'string-lessp))))
+ (ignore-errors (delete-directory tmp-name1 'recursive))
+ (ignore-errors (delete-directory tmp-name2 'recursive)))))
;; This test is inspired by Bug#17238.
(ert-deftest tramp-test30-special-characters ()
@@ -1463,11 +1477,12 @@
(skip-unless (tramp--test-enabled))
(let ((coding-system-for-read 'utf-8)
- (coding-system-for-write 'utf-8))
- (tramp--test-check-files
- "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها
بلا اتصال بالإنترنت"
- "银河系漫游指南系列"
- "Автостопом по гала́ктике")))
+ (coding-system-for-write 'utf-8)
+ (file-name-coding-system 'utf-8))
+ (tramp--test-check-files
+ "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا
اتصال بالإنترنت"
+ "银河系漫游指南系列"
+ "Автостопом по гала́ктике")))
;; This test is inspired by Bug#16928.
(ert-deftest tramp-test32-asynchronous-requests ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116993: Merge from emacs-24; up to r116985,
Daniel Colascione <=