aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-12-05 15:30:09 -0500
committerStefan Monnier2014-12-05 15:30:09 -0500
commit4fda400e58339cdf962b5679bf05ebe62c6189c5 (patch)
tree8588108b9046f7ec6747112cd30509466ea49459
parent0d7b2c96d388f5a9b539df3cb7f4ef115e7010b7 (diff)
parentc1c2cee7c5ae1eff6edb198814423e55cb11cc73 (diff)
downloademacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.tar.gz
emacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.zip
Merge from emacs-24
-rw-r--r--.gitignore12
-rw-r--r--ChangeLog6
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/progmodes/sh-script.el4
-rw-r--r--lisp/simple.el4
-rw-r--r--src/ChangeLog18
-rw-r--r--src/eval.c6
-rw-r--r--src/nsfns.m9
-rw-r--r--src/nsterm.h6
-rw-r--r--src/nsterm.m27
-rwxr-xr-xtest/indent/shell.sh11
11 files changed, 91 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index ff0e5ed0101..228deaaf8e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,11 @@
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20 20
21# Currently we assume only Git 1.7.1 (April 2010) or later, so this
22# file does not rely on "**" in patterns. The "**" feature was added
23# in Git 1.8.2 (March 2013).
24
25
21# Built by 'autogen.sh'. 26# Built by 'autogen.sh'.
22/aclocal.m4 27/aclocal.m4
23/configure 28/configure
@@ -72,13 +77,10 @@ src/buildobj.h
72src/globals.h 77src/globals.h
73 78
74# Lisp-level sources built by 'make'. 79# Lisp-level sources built by 'make'.
80*cus-load.el
81*loaddefs.el
75leim/changed.misc 82leim/changed.misc
76leim/changed.tit 83leim/changed.tit
77lisp/**/*cus-load.el
78lisp/cus-load.el
79lisp/**/*loaddefs.el
80lisp/**/**/*loaddefs.el
81lisp/*loaddefs.el
82lisp/cedet/semantic/bovine/c-by.el 84lisp/cedet/semantic/bovine/c-by.el
83lisp/cedet/semantic/bovine/make-by.el 85lisp/cedet/semantic/bovine/make-by.el
84lisp/cedet/semantic/bovine/scm-by.el 86lisp/cedet/semantic/bovine/scm-by.el
diff --git a/ChangeLog b/ChangeLog
index 56e7520d421..166e0e96110 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12014-12-05 Paul Eggert <eggert@cs.ucla.edu>
2
3 * .gitignore: Remove redundant pattern (subsumed by _*).
4 Avoid "**", as it requires Git 1.8.2 or later.
5
62014-12-05 Paul Eggert <eggert@cs.ucla.edu>
12014-12-05 Eli Zaretskii <eliz@gnu.org> 72014-12-05 Eli Zaretskii <eliz@gnu.org>
2 8
3 * .gitignore: Ignore test/biditest.txt. 9 * .gitignore: Ignore test/biditest.txt.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b4e51a6eebb..79ee9d75906 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
12014-12-05 Stefan Monnier <monnier@iro.umontreal.ca> 12014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning
4 of the whole pipe when indenting an opening keyword after a |.
5 Generalize this treatment to opening keywords like "while" (bug#18031).
6
72014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
82014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
9
10 * simple.el (newline): Place the hook buffer-locally,
11 to make sure it's first.
12
3 * progmodes/prog-mode.el (prettify-symbols--compose-symbol): 13 * progmodes/prog-mode.el (prettify-symbols--compose-symbol):
4 Fix handling of symbols with different syntax at beginning/end or with 14 Fix handling of symbols with different syntax at beginning/end or with
5 symbol rather than word syntax. 15 symbol rather than word syntax.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 5631358b472..524749d6266 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2014,12 +2014,12 @@ May return nil if the line should not be treated as continued."
2014 (and (numberp indent) (numberp initial) 2014 (and (numberp indent) (numberp initial)
2015 (<= indent initial))))) 2015 (<= indent initial)))))
2016 `(column . ,(+ initial sh-indentation))) 2016 `(column . ,(+ initial sh-indentation)))
2017 (`(:before . ,(or `"(" `"{" `"[")) 2017 (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case"))
2018 (if (not (smie-rule-prev-p "&&" "||" "|")) 2018 (if (not (smie-rule-prev-p "&&" "||" "|"))
2019 (when (smie-rule-hanging-p) 2019 (when (smie-rule-hanging-p)
2020 (smie-rule-parent)) 2020 (smie-rule-parent))
2021 (unless (smie-rule-bolp) 2021 (unless (smie-rule-bolp)
2022 (smie-backward-sexp 'halfexp) 2022 (while (equal "|" (nth 2 (smie-backward-sexp 'halfexp))))
2023 `(column . ,(smie-indent-virtual))))) 2023 `(column . ,(smie-indent-virtual)))))
2024 ;; FIXME: Maybe this handling of ;; should be made into 2024 ;; FIXME: Maybe this handling of ;; should be made into
2025 ;; a smie-rule-terminator function that takes the substitute ";" as arg. 2025 ;; a smie-rule-terminator function that takes the substitute ";" as arg.
diff --git a/lisp/simple.el b/lisp/simple.el
index 900828aad1c..9f447988a2f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -440,12 +440,12 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
440 (self-insert-command (prefix-numeric-value arg))) 440 (self-insert-command (prefix-numeric-value arg)))
441 (unwind-protect 441 (unwind-protect
442 (progn 442 (progn
443 (add-hook 'post-self-insert-hook postproc) 443 (add-hook 'post-self-insert-hook postproc nil t)
444 (self-insert-command (prefix-numeric-value arg))) 444 (self-insert-command (prefix-numeric-value arg)))
445 ;; We first used let-binding to protect the hook, but that was naive 445 ;; We first used let-binding to protect the hook, but that was naive
446 ;; since add-hook affects the symbol-default value of the variable, 446 ;; since add-hook affects the symbol-default value of the variable,
447 ;; whereas the let-binding might only protect the buffer-local value. 447 ;; whereas the let-binding might only protect the buffer-local value.
448 (remove-hook 'post-self-insert-hook postproc))) 448 (remove-hook 'post-self-insert-hook postproc t)))
449 (cl-assert (not (member postproc post-self-insert-hook))) 449 (cl-assert (not (member postproc post-self-insert-hook)))
450 (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) 450 (cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
451 nil) 451 nil)
diff --git a/src/ChangeLog b/src/ChangeLog
index 82aabb389a3..27202f10bf5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,21 @@
12014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
2
3 * eval.c (Fsignal): Remove duplicate test.
4 (Fautoload_do_load): Fix up docstring.
5
62014-12-05 Jan Djärv <jan.h.d@swipnet.se>
7
8 * nsterm.m (represented_filename, represented_frame): New variables.
9 (ns_set_represented_filename): New function.
10 (sendEvent:): Set represented filename here to avoid flicker,
11 related to Bug#18757.
12
13 * nsterm.h: Declare ns_set_represented_filename.
14
15 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
16 at once, call ns_set_represented_filename instead.
17
182014-12-05 Eli Zaretskii <eliz@gnu.org>
12014-12-05 Eli Zaretskii <eliz@gnu.org> 192014-12-05 Eli Zaretskii <eliz@gnu.org>
2 20
3 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero. 21 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
diff --git a/src/eval.c b/src/eval.c
index 8a83fdb7880..8194468a650 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1533,8 +1533,7 @@ See also the function `condition-case'. */)
1533 || NILP (clause) 1533 || NILP (clause)
1534 /* A `debug' symbol in the handler list disables the normal 1534 /* A `debug' symbol in the handler list disables the normal
1535 suppression of the debugger. */ 1535 suppression of the debugger. */
1536 || (CONSP (clause) && CONSP (clause) 1536 || (CONSP (clause) && !NILP (Fmemq (Qdebug, clause)))
1537 && !NILP (Fmemq (Qdebug, clause)))
1538 /* Special handler that means "print a message and run debugger 1537 /* Special handler that means "print a message and run debugger
1539 if requested". */ 1538 if requested". */
1540 || EQ (h->tag_or_ch, Qerror))) 1539 || EQ (h->tag_or_ch, Qerror)))
@@ -1918,7 +1917,7 @@ DEFUN ("autoload-do-load", Fautoload_do_load, Sautoload_do_load, 1, 3, 0,
1918If non-nil, FUNNAME should be the symbol whose function value is FUNDEF, 1917If non-nil, FUNNAME should be the symbol whose function value is FUNDEF,
1919in which case the function returns the new autoloaded function value. 1918in which case the function returns the new autoloaded function value.
1920If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if 1919If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if
1921it is defines a macro. */) 1920it defines a macro. */)
1922 (Lisp_Object fundef, Lisp_Object funname, Lisp_Object macro_only) 1921 (Lisp_Object fundef, Lisp_Object funname, Lisp_Object macro_only)
1923{ 1922{
1924 ptrdiff_t count = SPECPDL_INDEX (); 1923 ptrdiff_t count = SPECPDL_INDEX ();
@@ -3405,7 +3404,6 @@ backtrace_eval_unrewind (int distance)
3405 for (; distance > 0; distance--) 3404 for (; distance > 0; distance--)
3406 { 3405 {
3407 tmp += step; 3406 tmp += step;
3408 /* */
3409 switch (tmp->kind) 3407 switch (tmp->kind)
3410 { 3408 {
3411 /* FIXME: Ideally we'd like to "temporarily unwind" (some of) those 3409 /* FIXME: Ideally we'd like to "temporarily unwind" (some of) those
diff --git a/src/nsfns.m b/src/nsfns.m
index 4f158f4c51e..a5ff6346d74 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -619,18 +619,11 @@ ns_set_name_as_filename (struct frame *f)
619 619
620 fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; 620 fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)];
621 if (fstr == nil) fstr = @""; 621 if (fstr == nil) fstr = @"";
622#ifdef NS_IMPL_COCOA
623 /* work around a bug observed on 10.3 and later where
624 setTitleWithRepresentedFilename does not clear out previous state
625 if given filename does not exist */
626 if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr])
627 [[view window] setRepresentedFilename: @""];
628#endif
629 } 622 }
630 else 623 else
631 fstr = @""; 624 fstr = @"";
632 625
633 [[view window] setRepresentedFilename: fstr]; 626 ns_set_represented_filename (fstr, f);
634 [[view window] setTitle: str]; 627 [[view window] setTitle: str];
635 fset_name (f, name); 628 fset_name (f, name);
636 } 629 }
diff --git a/src/nsterm.h b/src/nsterm.h
index b33e6b2ee08..c3841a40f59 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -890,11 +890,15 @@ extern unsigned long ns_get_rgb_color (struct frame *f,
890extern void ns_init_events (); 890extern void ns_init_events ();
891extern void ns_finish_events (); 891extern void ns_finish_events ();
892 892
893/* From nsterm.m, needed in nsfont.m. */
894#ifdef __OBJC__ 893#ifdef __OBJC__
894/* From nsterm.m, needed in nsfont.m. */
895extern void 895extern void
896ns_draw_text_decoration (struct glyph_string *s, struct face *face, 896ns_draw_text_decoration (struct glyph_string *s, struct face *face,
897 NSColor *defaultCol, CGFloat width, CGFloat x); 897 NSColor *defaultCol, CGFloat width, CGFloat x);
898/* Needed in nsfns.m. */
899extern void
900ns_set_represented_filename (NSString* fstr, struct frame *f);
901
898#endif 902#endif
899 903
900#ifdef NS_IMPL_GNUSTEP 904#ifdef NS_IMPL_GNUSTEP
diff --git a/src/nsterm.m b/src/nsterm.m
index 8729fa55a92..f012528b40d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -293,6 +293,9 @@ static struct {
293 NULL, 0, 0 293 NULL, 0, 0
294}; 294};
295 295
296static NSString *represented_filename = nil;
297static struct frame *represented_frame = 0;
298
296#ifdef NS_IMPL_COCOA 299#ifdef NS_IMPL_COCOA
297/* 300/*
298 * State for pending menu activation: 301 * State for pending menu activation:
@@ -400,6 +403,13 @@ void x_set_frame_alpha (struct frame *f);
400 ========================================================================== */ 403 ========================================================================== */
401 404
402void 405void
406ns_set_represented_filename (NSString* fstr, struct frame *f)
407{
408 represented_filename = [fstr retain];
409 represented_frame = f;
410}
411
412void
403ns_init_events (struct input_event* ev) 413ns_init_events (struct input_event* ev)
404{ 414{
405 EVENT_INIT (*ev); 415 EVENT_INIT (*ev);
@@ -4600,6 +4610,23 @@ ns_term_shutdown (int sig)
4600 } 4610 }
4601#endif 4611#endif
4602 4612
4613 if (represented_filename != nil && represented_frame)
4614 {
4615 NSString *fstr = represented_filename;
4616 NSView *view = FRAME_NS_VIEW (represented_frame);
4617#ifdef NS_IMPL_COCOA
4618 /* work around a bug observed on 10.3 and later where
4619 setTitleWithRepresentedFilename does not clear out previous state
4620 if given filename does not exist */
4621 if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr])
4622 [[view window] setRepresentedFilename: @""];
4623#endif
4624 [[view window] setRepresentedFilename: fstr];
4625 [represented_filename release];
4626 represented_filename = nil;
4627 represented_frame = NULL;
4628 }
4629
4603 if (type == NSApplicationDefined) 4630 if (type == NSApplicationDefined)
4604 { 4631 {
4605 switch ([theEvent data2]) 4632 switch ([theEvent data2])
diff --git a/test/indent/shell.sh b/test/indent/shell.sh
index e3619057d6e..14f67744ff2 100755
--- a/test/indent/shell.sh
+++ b/test/indent/shell.sh
@@ -54,6 +54,17 @@ filter_3 () # bug#17842
54 grep -v "^," | sort -t, -k2,2 54 grep -v "^," | sort -t, -k2,2
55} 55}
56 56
57foo | bar | {
58 toto
59}
60
61grep -e "^$userregexp:" /etc/passwd | cut -d : -f 1 | while read user ; do
62 print -u2 "user=$user" # bug#18031
63 sudo -U $user -ll | while read line ; do
64 :
65 done
66done
67
57echo -n $(( 5 << 2 )) 68echo -n $(( 5 << 2 ))
58# This should not be treated as a heredoc (bug#12770). 69# This should not be treated as a heredoc (bug#12770).
592 702