1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00

Merge from emacs-24

This commit is contained in:
Stefan Monnier 2014-12-05 15:30:09 -05:00
commit 4fda400e58
11 changed files with 91 additions and 22 deletions

12
.gitignore vendored
View File

@ -18,6 +18,11 @@
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
# 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,13 +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/cus-load.el
lisp/**/*loaddefs.el
lisp/**/**/*loaddefs.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

View File

@ -1,3 +1,9 @@
2014-12-05 Paul Eggert <eggert@cs.ucla.edu>
* .gitignore: Remove redundant pattern (subsumed by _*).
Avoid "**", as it requires Git 1.8.2 or later.
2014-12-05 Paul Eggert <eggert@cs.ucla.edu>
2014-12-05 Eli Zaretskii <eliz@gnu.org>
* .gitignore: Ignore test/biditest.txt.

View File

@ -1,5 +1,15 @@
2014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
* 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-05 Stefan Monnier <monnier@iro.umontreal.ca>
2014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
* 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.

View File

@ -2014,12 +2014,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.

View File

@ -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)

View File

@ -1,3 +1,21 @@
2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
* eval.c (Fsignal): Remove duplicate test.
(Fautoload_do_load): Fix up docstring.
2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
* 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-12-05 Eli Zaretskii <eliz@gnu.org>
2014-12-05 Eli Zaretskii <eliz@gnu.org>
* dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.

View File

@ -1533,8 +1533,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)))
@ -1918,7 +1917,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 ();
@ -3405,7 +3404,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

View File

@ -619,18 +619,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);
}

View File

@ -890,11 +890,15 @@ extern unsigned long ns_get_rgb_color (struct frame *f,
extern void ns_init_events ();
extern void ns_finish_events ();
/* 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

View File

@ -293,6 +293,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:
@ -399,6 +402,13 @@ - (NSColor *)colorUsingDefaultColorSpace
========================================================================== */
void
ns_set_represented_filename (NSString* fstr, struct frame *f)
{
represented_filename = [fstr retain];
represented_frame = f;
}
void
ns_init_events (struct input_event* ev)
{
@ -4600,6 +4610,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])

View File

@ -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