From d83f0618d4e0f2772e307550e309c6f7cc5623d3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Dec 2014 09:13:35 -0800 Subject: [PATCH 1/8] * .gitignore: Remove redundant pattern (subsumed by _*). --- .gitignore | 2 -- ChangeLog | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 989bbb02122..b3a9a9c7972 100644 --- a/.gitignore +++ b/.gitignore @@ -117,8 +117,6 @@ deps/ # Logs and temporaries. *.log *.tmp -# Created by MS-DOS builds -src/_gdbinit # Time stamps. stamp_BLD diff --git a/ChangeLog b/ChangeLog index dba1ff35f06..0cf1fe668f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-01 Paul Eggert + + * .gitignore: Remove redundant pattern (subsumed by _*). + 2014-11-21 Paul Eggert Add more of the old .bzrignore to .gitignore. From 11b65bc080884362f65bf639fddcdb58ad023fbf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Dec 2014 09:16:04 -0800 Subject: [PATCH 2/8] * .gitignore: Avoid "**", as it requires Git 1.8.2 or later. --- .gitignore | 9 +++++++-- ChangeLog | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b3a9a9c7972..d40f09a182a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,11 @@ # along with GNU Emacs. If not, see . +# Currently we assume only Git 1.7.1 (April 2010) or later, so this +# file does not rely on "**" in patterns. The "**" feature was added +# in Git 1.8.2 (March 2013). + + # Built by 'autogen.sh'. /aclocal.m4 /configure @@ -72,10 +77,10 @@ src/buildobj.h src/globals.h # Lisp-level sources built by 'make'. +*cus-load.el +*loaddefs.el leim/changed.misc leim/changed.tit -lisp/**/*cus-load.el -lisp/**/*loaddefs.el lisp/cedet/semantic/bovine/c-by.el lisp/cedet/semantic/bovine/make-by.el lisp/cedet/semantic/bovine/scm-by.el diff --git a/ChangeLog b/ChangeLog index 0cf1fe668f8..c70503cf218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2014-12-01 Paul Eggert * .gitignore: Remove redundant pattern (subsumed by _*). + Avoid "**", as it requires Git 1.8.2 or later. 2014-11-21 Paul Eggert From ec7e07b333873789774cea53b45248fd0bf00600 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 1 Dec 2014 12:58:51 -0500 Subject: [PATCH 3/8] * admin/update_autogen (commit): With git, call "add" before "commit". --- admin/ChangeLog | 4 ++++ admin/update_autogen | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/admin/ChangeLog b/admin/ChangeLog index 82974dc846f..0529a877120 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2014-12-01 Glenn Morris + + * update_autogen (commit): With git, call "add" before "commit". + 2014-11-19 Paul Eggert Lessen focus on ChangeLog files, as opposed to change log entries. diff --git a/admin/update_autogen b/admin/update_autogen index d9d34fa3d6e..84e0584f220 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -228,6 +228,10 @@ commit () echo "Committing..." + [ "$vcs" = "git" ] && { + $vcs add "$@" || return $? + } + $vcs commit -m "Auto-commit of $type files." "$@" || return $? [ "$vcs" = "git" ] && { From b8775f0217b670f3a55ca014e3ecfc3fe9199fef Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 1 Dec 2014 13:10:05 -0500 Subject: [PATCH 4/8] * lisp/simple.el (newline): Place the hook buffer-locally, to make sure it's first. --- lisp/ChangeLog | 3 +++ lisp/simple.el | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac36c059bd3..12e5ef0e346 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-12-01 Stefan Monnier + * simple.el (newline): Place the hook buffer-locally, + to make sure it's first. + * progmodes/prog-mode.el (prettify-symbols--compose-symbol): Fix handling of symbols with different syntax at beginning/end or with symbol rather than word syntax. diff --git a/lisp/simple.el b/lisp/simple.el index 65fcf6e90b2..b8b15796a26 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'." (self-insert-command (prefix-numeric-value arg))) (unwind-protect (progn - (add-hook 'post-self-insert-hook postproc) + (add-hook 'post-self-insert-hook postproc nil t) (self-insert-command (prefix-numeric-value arg))) ;; We first used let-binding to protect the hook, but that was naive ;; since add-hook affects the symbol-default value of the variable, ;; whereas the let-binding might only protect the buffer-local value. - (remove-hook 'post-self-insert-hook postproc))) + (remove-hook 'post-self-insert-hook postproc t))) (cl-assert (not (member postproc post-self-insert-hook))) (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) nil) From 02d462b291ae4494d4935d4e21332b7d205a82ce Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 1 Dec 2014 13:40:06 -0500 Subject: [PATCH 5/8] * admin/update_autogen (commit): Revert earlier change. This was based on a misunderstanding due to the mess that had been made in trunk of this file and its ChangeLog. --- admin/ChangeLog | 4 ---- admin/update_autogen | 4 ---- 2 files changed, 8 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index 0529a877120..82974dc846f 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,7 +1,3 @@ -2014-12-01 Glenn Morris - - * update_autogen (commit): With git, call "add" before "commit". - 2014-11-19 Paul Eggert Lessen focus on ChangeLog files, as opposed to change log entries. diff --git a/admin/update_autogen b/admin/update_autogen index 84e0584f220..d9d34fa3d6e 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -228,10 +228,6 @@ commit () echo "Committing..." - [ "$vcs" = "git" ] && { - $vcs add "$@" || return $? - } - $vcs commit -m "Auto-commit of $type files." "$@" || return $? [ "$vcs" = "git" ] && { From d9d383147219f8e6a90d4c177e1b454e19acfac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 2 Dec 2014 14:05:27 +0100 Subject: [PATCH 6/8] More flicker fixes for OSX, related to bug 18757. * nsfns.m (ns_set_name_as_filename): Don't set represented filename at once, call ns_set_represented_filename instead. * nsterm.h: Declare ns_set_represented_filename. * nsterm.m (represented_filename, represented_frame): New variables. (ns_set_represented_filename): New function. (sendEvent:): Set represented filename here to avoid flicker, related to Bug#18757. --- src/ChangeLog | 12 ++++++++++++ src/nsfns.m | 9 +-------- src/nsterm.h | 6 +++++- src/nsterm.m | 28 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5ecb0220026..952e4abd230 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2014-12-02 Jan Djärv + + * nsterm.m (represented_filename, represented_frame): New variables. + (ns_set_represented_filename): New function. + (sendEvent:): Set represented filename here to avoid flicker, + related to Bug#18757. + + * nsterm.h: Declare ns_set_represented_filename. + + * nsfns.m (ns_set_name_as_filename): Don't set represented filename + at once, call ns_set_represented_filename instead. + 2014-11-27 Eli Zaretskii * xdisp.c (handle_single_display_spec): When ignoring a fringe diff --git a/src/nsfns.m b/src/nsfns.m index e0f8cfee14a..ec4761b773a 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -621,18 +621,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; if (fstr == nil) fstr = @""; -#ifdef NS_IMPL_COCOA - /* work around a bug observed on 10.3 and later where - setTitleWithRepresentedFilename does not clear out previous state - if given filename does not exist */ - if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) - [[view window] setRepresentedFilename: @""]; -#endif } else fstr = @""; - [[view window] setRepresentedFilename: fstr]; + ns_set_represented_filename (fstr, f); [[view window] setTitle: str]; fset_name (f, name); } diff --git a/src/nsterm.h b/src/nsterm.h index 1c3fda82649..115d7ac6779 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -895,11 +895,15 @@ extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, extern unsigned long ns_get_rgb_color (struct frame *f, float r, float g, float b, float a); -/* From nsterm.m, needed in nsfont.m. */ #ifdef __OBJC__ +/* From nsterm.m, needed in nsfont.m. */ extern void ns_draw_text_decoration (struct glyph_string *s, struct face *face, NSColor *defaultCol, CGFloat width, CGFloat x); +/* Needed in nsfns.m. */ +extern void +ns_set_represented_filename (NSString* fstr, struct frame *f); + #endif #ifdef NS_IMPL_GNUSTEP diff --git a/src/nsterm.m b/src/nsterm.m index 7e2d4beac6a..656d8668717 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -290,6 +290,9 @@ - (NSColor *)colorUsingDefaultColorSpace NULL, 0, 0 }; +static NSString *represented_filename = nil; +static struct frame *represented_frame = 0; + #ifdef NS_IMPL_COCOA /* * State for pending menu activation: @@ -396,6 +399,14 @@ - (NSColor *)colorUsingDefaultColorSpace ========================================================================== */ +void +ns_set_represented_filename (NSString* fstr, struct frame *f) +{ + represented_filename = [fstr retain]; + represented_frame = f; +} + + static void hold_event (struct input_event *event) { @@ -4560,6 +4571,23 @@ - (void)sendEvent: (NSEvent *)theEvent } #endif + if (represented_filename != nil && represented_frame) + { + NSString *fstr = represented_filename; + NSView *view = FRAME_NS_VIEW (represented_frame); +#ifdef NS_IMPL_COCOA + /* work around a bug observed on 10.3 and later where + setTitleWithRepresentedFilename does not clear out previous state + if given filename does not exist */ + if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) + [[view window] setRepresentedFilename: @""]; +#endif + [[view window] setRepresentedFilename: fstr]; + [represented_filename release]; + represented_filename = nil; + represented_frame = NULL; + } + if (type == NSApplicationDefined) { switch ([theEvent data2]) From e3c24b171bfff16fb808cb02d3fc5eaff017c1bc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 4 Dec 2014 10:09:08 -0500 Subject: [PATCH 7/8] * lisp/progmodes/sh-script.el: Fix indentation rule of "| while". Fixes: debbugs:18031 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning of the whole pipe when indenting an opening keyword after a |. Generalize this treatment to opening keywords like "while". --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/sh-script.el | 4 ++-- test/indent/shell.sh | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12e5ef0e346..26b09a68d02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-04 Stefan Monnier + + * progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning + of the whole pipe when indenting an opening keyword after a |. + Generalize this treatment to opening keywords like "while" (bug#18031). + 2014-12-01 Stefan Monnier * simple.el (newline): Place the hook buffer-locally, diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 724d22ab69b..1165144d05c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1988,12 +1988,12 @@ May return nil if the line should not be treated as continued." (and (numberp indent) (numberp initial) (<= indent initial))))) `(column . ,(+ initial sh-indentation))) - (`(:before . ,(or `"(" `"{" `"[")) + (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case")) (if (not (smie-rule-prev-p "&&" "||" "|")) (when (smie-rule-hanging-p) (smie-rule-parent)) (unless (smie-rule-bolp) - (smie-backward-sexp 'halfexp) + (while (equal "|" (nth 2 (smie-backward-sexp 'halfexp)))) `(column . ,(smie-indent-virtual))))) ;; FIXME: Maybe this handling of ;; should be made into ;; a smie-rule-terminator function that takes the substitute ";" as arg. 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 grep -v "^," | sort -t, -k2,2 } +foo | bar | { + toto +} + +grep -e "^$userregexp:" /etc/passwd | cut -d : -f 1 | while read user ; do + print -u2 "user=$user" # bug#18031 + sudo -U $user -ll | while read line ; do + : + done +done + echo -n $(( 5 << 2 )) # This should not be treated as a heredoc (bug#12770). 2 From c1c2cee7c5ae1eff6edb198814423e55cb11cc73 Mon Sep 17 00:00:00 2001 From: Lee Duhem Date: Thu, 4 Dec 2014 14:13:13 -0500 Subject: [PATCH 8/8] * src/eval.c (Fsignal): Remove duplicate test. (Fautoload_do_load): Fix up docstring. --- src/ChangeLog | 5 +++++ src/eval.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 952e4abd230..0a8acf935bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-04 Lee Duhem (tiny change) + + * eval.c (Fsignal): Remove duplicate test. + (Fautoload_do_load): Fix up docstring. + 2014-12-02 Jan Djärv * nsterm.m (represented_filename, represented_frame): New variables. diff --git a/src/eval.c b/src/eval.c index 929b98e9f71..f0ad999f0f8 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1536,8 +1536,7 @@ See also the function `condition-case'. */) || NILP (clause) /* A `debug' symbol in the handler list disables the normal suppression of the debugger. */ - || (CONSP (clause) && CONSP (clause) - && !NILP (Fmemq (Qdebug, clause))) + || (CONSP (clause) && !NILP (Fmemq (Qdebug, clause))) /* Special handler that means "print a message and run debugger if requested". */ || EQ (h->tag_or_ch, Qerror))) @@ -1921,7 +1920,7 @@ DEFUN ("autoload-do-load", Fautoload_do_load, Sautoload_do_load, 1, 3, 0, If non-nil, FUNNAME should be the symbol whose function value is FUNDEF, in which case the function returns the new autoloaded function value. If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if -it is defines a macro. */) +it defines a macro. */) (Lisp_Object fundef, Lisp_Object funname, Lisp_Object macro_only) { ptrdiff_t count = SPECPDL_INDEX (); @@ -3502,7 +3501,6 @@ backtrace_eval_unrewind (int distance) for (; distance > 0; distance--) { tmp += step; - /* */ switch (tmp->kind) { /* FIXME: Ideally we'd like to "temporarily unwind" (some of) those