commit c477f2073018ed4deb3810059c1032c1709164fa (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Mon Jan 5 02:45:30 2015 +0300 Add mouse interaction to xref * lisp/progmodes/xref.el (xref--button-map): New variable. (xref--mouse-2): New command. (xref--insert-xrefs): Add `mouse-face' and `keymap' properties to the inserted references. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f62dc07..f413526 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2015-01-04 Dmitry Gutov + + Add mouse interaction to xref. + + * progmodes/xref.el (xref--button-map): New variable. + (xref--mouse-2): New command. + (xref--insert-xrefs): Add `mouse-face' and `keymap' properties to + the inserted references. + 2015-01-04 Paul Eggert Less 'make' chatter for lisp dir diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 7bc6500..41b70c7 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -405,6 +405,21 @@ WINDOW controls how the buffer is displayed: (defconst xref-buffer-name "*xref*" "The name of the buffer to show xrefs.") +(defvar xref--button-map + (let ((map (make-sparse-keymap))) + (define-key map [(control ?m)] #'xref-goto-xref) + (define-key map [mouse-1] #'xref-goto-xref) + (define-key map [mouse-2] #'xref--mouse-2) + map)) + +(defun xref--mouse-2 (event) + "Move point to the button and show the xref definition." + (interactive "e") + (mouse-set-point event) + (forward-line 0) + (xref--search-property 'xref-location) + (xref-show-location-at-point)) + (defun xref--insert-xrefs (xref-alist) "Insert XREF-ALIST in the current-buffer. XREF-ALIST is of the form ((GROUP . (XREF ...)) ...). Where @@ -417,7 +432,9 @@ GROUP is a string for decoration purposes and XREF is an (with-slots (description location) xref (xref--insert-propertized (list 'xref-location location - 'face 'font-lock-keyword-face) + 'face 'font-lock-keyword-face + 'mouse-face 'highlight + 'keymap xref--button-map) description)) (when (or more1 more2) (insert "\n"))))) commit bf90e9ac7caec15b0f111e0bb67e311233f3a795 Author: Paul Eggert Date: Sun Jan 4 13:20:36 2015 -0800 'temacs -nw' should not call missing functions Without this patch, "temacs -nw" fails with the diagnostic "emacs: Symbol's function definition is void: frame-windows-min-size" and messes up the tty's state. * lib-src/make-docfile.c (write_globals): Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too. Sort. * src/frame.c (Fframe_windows_min_size): New placeholder function. (syms_of_frame): Define it. * src/window.c (Fwindow__sanitize_window_sizes): New placeholder. (syms_of_window): Define it. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5d17324..acbbd3a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,9 @@ 2015-01-04 Paul Eggert + 'temacs -nw' should not call missing functions + * make-docfile.c (write_globals): + Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too. Sort. + Less 'make' chatter for lib-src * Makefile.in (blessmail): Less 'make' chatter here. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 78becac..f74b3d5 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -658,9 +658,10 @@ write_globals (void) /* It would be nice to have a cleaner way to deal with these special hacks, too. */ if (strcmp (globals[i].name, "Fbyteorder") == 0 - || strcmp (globals[i].name, "Ftool_bar_height") == 0 + || strcmp (globals[i].name, "Fframe_windows_min_size") == 0 + || strcmp (globals[i].name, "Fidentity") == 0 || strcmp (globals[i].name, "Fmax_char") == 0 - || strcmp (globals[i].name, "Fidentity") == 0) + || strcmp (globals[i].name, "Ftool_bar_height") == 0) fputs (" ATTRIBUTE_CONST", stdout); puts (";"); diff --git a/src/ChangeLog b/src/ChangeLog index 592a7f1..8cf2696 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2015-01-04 Paul Eggert + 'temacs -nw' should not call missing functions + Without this patch, "temacs -nw" fails with the diagnostic + "emacs: Symbol's function definition is void: frame-windows-min-size" + and messes up the tty's state. + * frame.c (Fframe_windows_min_size): New placeholder function. + (syms_of_frame): Define it. + * window.c (Fwindow__sanitize_window_sizes): New placeholder. + (syms_of_window): Define it. + Less 'make' chatter for lisp dir * Makefile.in (%.elc): Adjust to compile-onefile change in ../lisp/Makefile.in. diff --git a/src/frame.c b/src/frame.c index 5a0d142..9394ae4 100644 --- a/src/frame.c +++ b/src/frame.c @@ -334,10 +334,22 @@ predicates which report frame's specific UI-related capabilities. */) return type; } +/* Placeholder used by temacs -nw before window.el is loaded. */ +DEFUN ("frame-windows-min-size", Fframe_windows_min_size, + Sframe_windows_min_size, 4, 4, 0, + doc: /* */) + (Lisp_Object frame, Lisp_Object horizontal, + Lisp_Object ignore, Lisp_Object pixelwise) +{ + return make_number (0); +} + static int -frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) +frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, + Lisp_Object ignore, Lisp_Object pixelwise) { - return XINT (call4 (Qframe_windows_min_size, frame, horizontal, ignore, pixelwise)); + return XINT (call4 (Qframe_windows_min_size, frame, horizontal, + ignore, pixelwise)); } @@ -5081,6 +5093,7 @@ even if this option is non-nil. */); defsubr (&Sframep); defsubr (&Sframe_live_p); defsubr (&Swindow_system); + defsubr (&Sframe_windows_min_size); defsubr (&Smake_terminal_frame); defsubr (&Shandle_switch_frame); defsubr (&Sselect_frame); diff --git a/src/window.c b/src/window.c index 938f1a3..45dfb9e 100644 --- a/src/window.c +++ b/src/window.c @@ -3014,6 +3014,14 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizonta return call5 (Qwindow_resize_root_window, window, delta, horizontal, ignore, pixelwise); } +/* Placeholder used by temacs -nw before window.el is loaded. */ +DEFUN ("window--sanitize-window-sizes", Fwindow__sanitize_window_sizes, + Swindow__sanitize_window_sizes, 2, 2, 0, + doc: /* */) + (Lisp_Object frame, Lisp_Object horizontal) +{ + return Qnil; +} Lisp_Object sanitize_window_sizes (Lisp_Object frame, Lisp_Object horizontal) @@ -7563,6 +7571,7 @@ displayed after a scrolling operation to be somewhat inaccurate. */); defsubr (&Sset_window_display_table); defsubr (&Snext_window); defsubr (&Sprevious_window); + defsubr (&Swindow__sanitize_window_sizes); defsubr (&Sget_buffer_window); defsubr (&Sdelete_other_windows_internal); defsubr (&Sdelete_window_internal); commit cde73794f61fec2a5a8676c2e36ec6634e72cdc5 Author: Paul Eggert Date: Sun Jan 4 01:10:26 2015 -0800 * INSTALL: Mention 'make WERROR_CFLAGS='. diff --git a/ChangeLog b/ChangeLog index 8051263..36edfe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2015-01-04 Paul Eggert + * INSTALL: Mention 'make WERROR_CFLAGS='. + Clarify 'make info' * Makefile.in (info): Use GNU make conditional rather than an '@' rule with a shell conditional, so that the builder can diff --git a/INSTALL b/INSTALL index 6850c7d..1ed2698 100644 --- a/INSTALL +++ b/INSTALL @@ -312,7 +312,9 @@ Use --enable-gcc-warnings to enable compile-time checks that warn about possibly-questionable C code. This is intended for developers and is useful with GNU-compatible compilers. On a recent GNU system there should be no warnings; on older and on non-GNU systems the -generated warnings may still be useful. +generated warnings may still be useful, though you may prefer building +with 'make WERROR_CFLAGS=' so that the warnings are not treated as +errors. Use --enable-silent-rules to cause 'make' to chatter less. This is helpful when combined with options like --enable-gcc-warnings that