From f2cea124dffac9ca4b8ce1dbb9b746f8e81109a3 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 12 Jul 2011 08:07:49 +0900 Subject: Suppress address randomization on Darwin. Do not merge into trunk. --- src/ChangeLog | 5 +++++ src/s/darwin.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 852f7532313..547e6bd1865 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-11 YAMAMOTO Mitsuharu + + * s/darwin.h (LD_SWITCH_SYSTEM_TEMACS): Add -fno-pie so as to suppress + address randomization (Bug#8395). + 2011-07-07 Kenichi Handa * composite.c (composition_compute_stop_pos): Ignore a static diff --git a/src/s/darwin.h b/src/s/darwin.h index 2b0addbef08..89d010a9bae 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -181,7 +181,7 @@ along with GNU Emacs. If not, see . */ end of the header for adding load commands. Needed for dumping. 0x690 is the total size of 30 segment load commands (at 56 each); under Cocoa 31 commands are required. */ -#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA +#define LD_SWITCH_SYSTEM_TEMACS -fno-pie -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA #define C_SWITCH_SYSTEM_TEMACS -Dtemacs -- cgit v1.2.1 From 4d9f3b1cf2b950486a2aaef1b19ef3eb69bad086 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 12 Jul 2011 12:01:34 -0400 Subject: * window.el (split-window-horizontally): Doc fix (Bug#9060). --- lisp/ChangeLog | 4 ++++ lisp/window.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index effb98eb59d..08d4f13ca7c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-07-12 Chong Yidong + + * window.el (split-window-horizontally): Doc fix (Bug#9060). + 2011-06-27 Markus Heiser (tiny change) * progmodes/gud.el (gud-pdb-marker-regexp): Accept \r char (Bug#5653). diff --git a/lisp/window.el b/lisp/window.el index e8e1c6149fd..837d5a418b7 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1314,7 +1314,7 @@ window." (defun split-window-horizontally (&optional size) "Split selected window into two windows side by side. The selected window becomes the left one and gets SIZE columns. -SIZE negative means the right window gets -SIZE lines. +SIZE negative means the right window gets -SIZE columns. SIZE includes the width of the window's scroll bar; if there are no scroll bars, it includes the width of the divider column to -- cgit v1.2.1 From 106c3702c2c7cd5020ba58c13d3fcbc300152c8b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 16 Jul 2011 13:06:21 -0700 Subject: ChangeLog fix. --- lisp/ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 08d4f13ca7c..43ca3d2603c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7321,11 +7321,11 @@ * bookmark.el (bookmark-bmenu-list): Don't use switch-to-buffer if we're inside a dedicated or minibuffer window. -2009-10-24 Karl Fogel +2009-10-24 Drew Adams + Karl Fogel * bookmark.el: Update documentation, especially documentation - of `bookmark-alist' and of the bookmark file format. - Patch by Drew Adams, with minor tweaks from me. (Bug#4195) + of `bookmark-alist' and of the bookmark file format. (Bug#4195) 2009-10-24 Chong Yidong -- cgit v1.2.1 From 76774280e40850c6b778c735d25c566a451284c3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 22 Jul 2011 11:23:10 -0400 Subject: Merge fix for Bug#4238 from trunk --- src/ChangeLog | 5 +++++ src/frame.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 547e6bd1865..08557f65231 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-22 Chong Yidong + + * frame.c (Fmodify_frame_parameters): In tty case, update the + default face if necessary (Bug#4238). + 2011-07-11 YAMAMOTO Mitsuharu * s/darwin.h (LD_SWITCH_SYSTEM_TEMACS): Add -fno-pie so as to suppress diff --git a/src/frame.c b/src/frame.c index f1cc0ce019d..a568342966a 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2606,11 +2606,9 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) val = values[i]; store_frame_param (f, prop, val); - /* Changing the background color might change the background - mode, so that we have to load new defface specs. - Call frame-set-background-mode to do that. */ - if (EQ (prop, Qbackground_color)) - call1 (Qframe_set_background_mode, frame); + if (EQ (prop, Qforeground_color) + || EQ (prop, Qbackground_color)) + update_face_from_frame_parameter (f, prop, val); } } return Qnil; -- cgit v1.2.1 From 6205f979352cc5897b8bcfea214718c089fbe093 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 23 Jul 2011 13:04:58 +0900 Subject: Support LC_FUNCTION_STARTS load command on Darwin. --- src/ChangeLog | 7 +++++++ src/unexmacosx.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 08557f65231..48f20910fd4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-07-23 YAMAMOTO Mitsuharu + + * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS + and LC_VERSION_MIN_MACOSX. + (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function. + (dump_it) [LC_FUNCTION_STARTS]: Use it. + 2011-07-22 Chong Yidong * frame.c (Fmodify_frame_parameters): In tty case, update the diff --git a/src/unexmacosx.c b/src/unexmacosx.c index d6f170c9127..e4d0314ce8c 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -589,6 +589,16 @@ print_load_command_name (int lc) case LC_DYLD_INFO_ONLY: printf ("LC_DYLD_INFO_ONLY"); break; +#endif +#ifdef LC_VERSION_MIN_MACOSX + case LC_VERSION_MIN_MACOSX: + printf ("LC_VERSION_MIN_MACOSX"); + break; +#endif +#ifdef LC_FUNCTION_STARTS + case LC_FUNCTION_STARTS: + printf ("LC_FUNCTION_STARTS"); + break; #endif default: printf ("unknown "); @@ -1126,6 +1136,28 @@ copy_dyld_info (struct load_command *lc, long delta) } #endif +#ifdef LC_FUNCTION_STARTS +/* Copy a LC_FUNCTION_STARTS load command from the input file to the + output file, adjusting the data offset field. */ +static void +copy_linkedit_data (struct load_command *lc, long delta) +{ + struct linkedit_data_command *ldp = (struct linkedit_data_command *) lc; + + if (ldp->dataoff > 0) + ldp->dataoff += delta; + + printf ("Writing "); + print_load_command_name (lc->cmd); + printf (" command\n"); + + if (!unexec_write (curr_header_offset, lc, lc->cmdsize)) + unexec_error ("cannot write linkedit data command to header"); + + curr_header_offset += lc->cmdsize; +} +#endif + /* Copy other kinds of load commands from the input file to the output file, ones that do not require adjustments of file offsets. */ static void @@ -1197,6 +1229,11 @@ dump_it () case LC_DYLD_INFO_ONLY: copy_dyld_info (lca[i], linkedit_delta); break; +#endif +#ifdef LC_FUNCTION_STARTS + case LC_FUNCTION_STARTS: + copy_linkedit_data (lca[i], linkedit_delta); + break; #endif default: copy_other (lca[i]); -- cgit v1.2.1 From 41435d52fd3a094562265ae507dd57d675dd790e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 26 Jul 2011 13:00:23 +0200 Subject: * fontset.c (fontset_get_font_group): Add proper type checks. (Bug#9172) --- src/ChangeLog | 5 +++++ src/fontset.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 48f20910fd4..93f1caf6f9f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Andreas Schwab + + * fontset.c (fontset_get_font_group): Add proper type checks. + (Bug#9172) + 2011-07-23 YAMAMOTO Mitsuharu * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS diff --git a/src/fontset.c b/src/fontset.c index 82e46c74347..c335a5642f9 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -463,7 +463,7 @@ reorder_font_vector (font_group, font) /* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for character C in FONTSET. If C is -1, return a fallback font-group. If C is not -1, the value may be Qt (FONTSET doesn't have a font - for C even in the fallback group, or 0 (a font for C may be found + for C even in the fallback group), or 0 (a font for C may be found only in the fallback group). */ static Lisp_Object @@ -481,7 +481,9 @@ fontset_get_font_group (Lisp_Object fontset, int c) if (! NILP (font_group)) return font_group; base_fontset = FONTSET_BASE (fontset); - if (c >= 0) + if (NILP (base_fontset)) + font_group = Qnil; + else if (c >= 0) font_group = char_table_ref_and_range (base_fontset, c, &from, &to); else font_group = FONTSET_FALLBACK (base_fontset); @@ -492,6 +494,8 @@ fontset_get_font_group (Lisp_Object fontset, int c) char_table_set_range (fontset, from, to, font_group); return font_group; } + if (!VECTORP (font_group)) + return font_group; font_group = Fcopy_sequence (font_group); for (i = 0; i < ASIZE (font_group); i++) if (! NILP (AREF (font_group, i))) -- cgit v1.2.1 From 8f7c291aed1941a7716bbef1cd4f26d83478808d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 28 Jul 2011 11:45:07 -0400 Subject: Backport r100703 from trunk --- src/ChangeLog | 6 ++++++ src/xfaces.c | 64 ++++++++++++++++++++++++++++++----------------------------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 93f1caf6f9f..4a15a096788 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-07-28 Eli Zaretskii + + * xfaces.c (update_face_from_frame_parameter): Move out of + HAVE_WINDOW_SYSTEM portion. Condition window-system only parts + with HAVE_WINDOW_SYSTEM. + 2011-07-26 Andreas Schwab * fontset.c (fontset_get_font_group): Add proper type checks. diff --git a/src/xfaces.c b/src/xfaces.c index 1606113596d..70850cc8a36 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3490,37 +3490,6 @@ FRAME 0 means change the face on all frames, and change the default } -#ifdef HAVE_WINDOW_SYSTEM - -/* Set the `font' frame parameter of FRAME determined from the - font-object set in `default' face attributes LFACE. */ - -static void -set_font_frame_param (frame, lface) - Lisp_Object frame, lface; -{ - struct frame *f = XFRAME (frame); - Lisp_Object font; - - if (FRAME_WINDOW_P (f) - /* Don't do anything if the font is `unspecified'. This can - happen during frame creation. */ - && (font = LFACE_FONT (lface), - ! UNSPECIFIEDP (font))) - { - if (FONT_SPEC_P (font)) - { - font = font_load_for_lface (f, XVECTOR (lface)->contents, font); - if (NILP (font)) - return; - LFACE_FONT (lface) = font; - } - f->default_face_done_p = 0; - Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil)); - } -} - - /* Update the corresponding face when frame parameter PARAM on frame F has been assigned the value NEW_VALUE. */ @@ -3562,6 +3531,7 @@ update_face_from_frame_parameter (f, param, new_value) ? new_value : Qunspecified); realize_basic_faces (f); } +#ifdef HAVE_WINDOW_SYSTEM else if (EQ (param, Qborder_color)) { face = Qborder; @@ -3583,6 +3553,7 @@ update_face_from_frame_parameter (f, param, new_value) LFACE_BACKGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); } +#endif /* Changing a named face means that all realized faces depending on that face are invalid. Since we cannot tell which realized faces @@ -3598,6 +3569,37 @@ update_face_from_frame_parameter (f, param, new_value) } +#ifdef HAVE_WINDOW_SYSTEM + +/* Set the `font' frame parameter of FRAME determined from the + font-object set in `default' face attributes LFACE. */ + +static void +set_font_frame_param (frame, lface) + Lisp_Object frame, lface; +{ + struct frame *f = XFRAME (frame); + Lisp_Object font; + + if (FRAME_WINDOW_P (f) + /* Don't do anything if the font is `unspecified'. This can + happen during frame creation. */ + && (font = LFACE_FONT (lface), + ! UNSPECIFIEDP (font))) + { + if (FONT_SPEC_P (font)) + { + font = font_load_for_lface (f, XVECTOR (lface)->contents, font); + if (NILP (font)) + return; + LFACE_FONT (lface) = font; + } + f->default_face_done_p = 0; + Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil)); + } +} + + /* Get the value of X resource RESOURCE, class CLASS for the display of frame FRAME. This is here because ordinary `x-get-resource' doesn't take a frame argument. */ -- cgit v1.2.1 From e63f572fb001e7a0cc9eac6ebc3a8a204349503b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 28 Jul 2011 20:40:28 +0200 Subject: Fixes: debbugs:6594 * lisp/xt-mouse.el (xterm-mouse-event-read): Try to recover the raw character. --- lisp/ChangeLog | 5 +++++ lisp/xt-mouse.el | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 43ca3d2603c..061c32d092e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-28 Andreas Schwab + + * xt-mouse.el (xterm-mouse-event-read): Try to recover the raw + character. (Bug#6594) + 2011-07-12 Chong Yidong * window.el (split-window-horizontally): Doc fix (Bug#9060). diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 5a70e6a6808..f917287d2d9 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -121,10 +121,17 @@ ;; read xterm sequences above ascii 127 (#x7f) (defun xterm-mouse-event-read () + ;; We get the characters decoded by the keyboard coding system. Try + ;; to recover the raw character. (let ((c (read-char))) - (if (> c #x3FFF80) - (+ 128 (- c #x3FFF80)) - c))) + (cond ;; If meta-flag is t we get a meta character + ((>= c ?\M-\^@) + (- c (- ?\M-\^@ 128))) + ;; Reencode the character in the keyboard coding system, if + ;; this is a non-ASCII character. + ((>= c #x80) + (aref (encode-coding-string (string c) (keyboard-coding-system)) 0)) + (t c)))) (defun xterm-mouse-truncate-wrap (f) "Truncate with wrap-around." -- cgit v1.2.1 From 04e7a73457222f2e440e27b99c85901e616663ba Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 9 Aug 2011 17:55:34 -0400 Subject: * hi-lock.el (hi-lock-unface-buffer): Fix interactive spec (Bug#7554). --- lisp/ChangeLog | 5 +++++ lisp/hi-lock.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 061c32d092e..78568046d34 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-09 Chong Yidong + + * hi-lock.el (hi-lock-unface-buffer): Fix interactive spec + (Bug#7554). + 2011-07-28 Andreas Schwab * xt-mouse.el (xterm-mouse-event-read): Try to recover the raw diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 31d62723281..7b2f5f51260 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -461,7 +461,9 @@ interactive functions. \(See `hi-lock-interactive-patterns'.\) \\Use \\[minibuffer-complete] to complete a partially typed regexp. \(See info node `Minibuffer History'.\)" (interactive - (if (and (display-popup-menus-p) (not last-nonmenu-event)) + (if (and (display-popup-menus-p) + (listp last-nonmenu-event) + use-dialog-box) (catch 'snafu (or (x-popup-menu -- cgit v1.2.1