diff options
| author | Stefan Monnier | 2014-12-05 15:30:09 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-12-05 15:30:09 -0500 |
| commit | 4fda400e58339cdf962b5679bf05ebe62c6189c5 (patch) | |
| tree | 8588108b9046f7ec6747112cd30509466ea49459 /src | |
| parent | 0d7b2c96d388f5a9b539df3cb7f4ef115e7010b7 (diff) | |
| parent | c1c2cee7c5ae1eff6edb198814423e55cb11cc73 (diff) | |
| download | emacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.tar.gz emacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.zip | |
Merge from emacs-24
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/eval.c | 6 | ||||
| -rw-r--r-- | src/nsfns.m | 9 | ||||
| -rw-r--r-- | src/nsterm.h | 6 | ||||
| -rw-r--r-- | src/nsterm.m | 27 |
5 files changed, 53 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 82aabb389a3..27202f10bf5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2014-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 | |||
| 6 | 2014-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 | |||
| 18 | 2014-12-05 Eli Zaretskii <eliz@gnu.org> | ||
| 1 | 2014-12-05 Eli Zaretskii <eliz@gnu.org> | 19 | 2014-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, | |||
| 1918 | If non-nil, FUNNAME should be the symbol whose function value is FUNDEF, | 1917 | If non-nil, FUNNAME should be the symbol whose function value is FUNDEF, |
| 1919 | in which case the function returns the new autoloaded function value. | 1918 | in which case the function returns the new autoloaded function value. |
| 1920 | If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if | 1919 | If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if |
| 1921 | it is defines a macro. */) | 1920 | it 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, | |||
| 890 | extern void ns_init_events (); | 890 | extern void ns_init_events (); |
| 891 | extern void ns_finish_events (); | 891 | extern 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. */ | ||
| 895 | extern void | 895 | extern void |
| 896 | ns_draw_text_decoration (struct glyph_string *s, struct face *face, | 896 | ns_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. */ | ||
| 899 | extern void | ||
| 900 | ns_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 | ||
| 296 | static NSString *represented_filename = nil; | ||
| 297 | static 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 | ||
| 402 | void | 405 | void |
| 406 | ns_set_represented_filename (NSString* fstr, struct frame *f) | ||
| 407 | { | ||
| 408 | represented_filename = [fstr retain]; | ||
| 409 | represented_frame = f; | ||
| 410 | } | ||
| 411 | |||
| 412 | void | ||
| 403 | ns_init_events (struct input_event* ev) | 413 | ns_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]) |