From dcdf2bd8d690168eed44563651e2d8f379b9c80e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 15 Oct 2014 13:32:41 -0400 Subject: [PATCH] * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default. Remove incorrect handling of eldoc-print-after-edit. (eldoc-message-commands, eldoc-last-data): Use defvar. * lisp/loadup.el (emacs-lisp/eldoc): Load it. * src/lisp.mk (lisp): Add emacs-lisp/eldoc.elc. --- etc/NEWS | 2 ++ lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/eldoc.el | 17 ++++++++--------- lisp/loadup.el | 1 + src/ChangeLog | 23 +++++++++++++---------- src/lisp.mk | 1 + 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 6c27831e6f0..64c8c71dc76 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -103,6 +103,8 @@ this has no effect. * Editing Changes in Emacs 25.1 +** New minor mode global-eldoc-mode is enabled by default. + ** Emacs now supports "bracketed paste mode" when running on a terminal that supports it. This facility allows Emacs to understand pasted chunks of text as strings to be inserted, instead of interpreting each diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 610cf6f8670..cf83767b924 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2014-10-15 Stefan Monnier + * emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default. + Remove incorrect handling of eldoc-print-after-edit. + (eldoc-message-commands, eldoc-last-data): Use defvar. + * loadup.el (emacs-lisp/eldoc): Load it. + * progmodes/m4-mode.el (m4-syntax-propertize): New var. (m4-mode): Use it. (m4--quoted-p): New function. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 7245989c4b0..6dddf5b9a40 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -47,9 +47,6 @@ ;;; Code: -(require 'help-fns) ;For fundoc-usage handling functions. -(require 'cl-lib) - (defgroup eldoc nil "Show function arglist or variable docstring in echo area." :group 'lisp @@ -129,7 +126,8 @@ choose to increase the number of buckets, you must do so before loading this file since the obarray is initialized at load time. Remember to keep it a prime number to improve hash performance.") -(defconst eldoc-message-commands +(defvar eldoc-message-commands + ;; Don't define as `defconst' since it would then go to (read-only) purespace. (make-vector eldoc-message-commands-table-size 0) "Commands after which it is appropriate to print in the echo area. ElDoc does not try to print function arglists, etc., after just any command, @@ -140,12 +138,14 @@ This variable contains an obarray of symbols; do not manipulate it directly. Instead, use `eldoc-add-command' and `eldoc-remove-command'.") ;; Not a constant. -(defconst eldoc-last-data (make-vector 3 nil) +(defvar eldoc-last-data (make-vector 3 nil) + ;; Don't define as `defconst' since it would then go to (read-only) purespace. "Bookkeeping; elements are as follows: 0 - contains the last symbol read from the buffer. 1 - contains the string last displayed in the echo area for variables, or argument string for functions. - 2 - 'function if function args, 'variable if variable documentation.") + 2 - `function' if function args, `variable' if variable documentation.") +(make-obsolete-variable 'eldoc-last-data "use your own instead" "25.1") (defvar eldoc-last-message nil) @@ -203,14 +203,13 @@ expression point is on." (define-minor-mode global-eldoc-mode "Enable `eldoc-mode' in all buffers where it's applicable." :group 'eldoc :global t + :initialize 'custom-initialize-delay + :init-value t (setq eldoc-last-message nil) (if global-eldoc-mode (progn - (when eldoc-print-after-edit - (setq-local eldoc-message-commands (eldoc-edit-message-commands))) (add-hook 'post-command-hook #'eldoc-schedule-timer) (add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area)) - (kill-local-variable 'eldoc-message-commands) (remove-hook 'post-command-hook #'eldoc-schedule-timer) (remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area))) diff --git a/lisp/loadup.el b/lisp/loadup.el index fd34648bb30..421c3d5bf3e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -282,6 +282,7 @@ (load "vc/ediff-hook") (load "uniquify") (load "electric") +(load "emacs-lisp/eldoc") (if (not (eq system-type 'ms-dos)) (load "tooltip")) ;; This file doesn't exist when building a development version of Emacs diff --git a/src/ChangeLog b/src/ChangeLog index b6f9401acf7..611e459d2a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,18 +1,21 @@ +2014-10-15 Stefan Monnier + + * lisp.mk (lisp): Add emacs-lisp/eldoc.elc. + 2014-10-15 Eli Zaretskii Update the bidirectional reordering engine for Unicode 6.3 and 7.0. - * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level): Remove - variable. - (bidi_get_type): Return the isolate initiators and terminator - types. + * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level): + Remove variable. + (bidi_get_type): Return the isolate initiators and terminator types. (bidi_isolate_fmt_char, bidi_paired_bracket_type) (bidi_fetch_char_skip_isolates, find_first_strong_char) (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions. - (bidi_set_sos_type): Renamed from bidi_set_sor_type and updated + (bidi_set_sos_type): Rename from bidi_set_sor_type and updated for the new features. (bidi_push_embedding_level, bidi_pop_embedding_level): Update to push and pop correctly for isolates. - (bidi_remember_char): Modified to accept an additional argument + (bidi_remember_char): Modify to accept an additional argument and record the bidi type according to its value. (bidi_cache_iterator_state): Accept an additional argument to only update an existing state. Handle the new members of struct bidi_it. @@ -140,8 +143,8 @@ (ns_dumpglyphs_image, ns_check_menu_open) (applicationDidFinishLaunching) (antialiasThresholdDidChange:) - (keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove - checks for OSX <= 10.5/10.6. + (keyDown:, toggleFullScreen:, setPosition:portion:whole:): + Remove checks for OSX <= 10.5/10.6. (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP. (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on GNUSTEP. @@ -166,8 +169,8 @@ (macfont_create_family_with_symbol) (macfont_get_glyph_for_character) (mac_font_get_glyphs_for_variants) - (mac_ctfont_create_available_families, syms_of_macfont): Remove - code for OSX < 10.6. + (mac_ctfont_create_available_families, syms_of_macfont): + Remove code for OSX < 10.6. (mac_font_family_group, mac_font_family_compare): Remove, only used for OSX < 10.6. diff --git a/src/lisp.mk b/src/lisp.mk index 642e9af225f..675df2b66e6 100644 --- a/src/lisp.mk +++ b/src/lisp.mk @@ -165,6 +165,7 @@ lisp = \ $(lispsource)/vc/vc-hooks.elc \ $(lispsource)/vc/ediff-hook.elc \ $(lispsource)/electric.elc \ + $(lispsource)/emacs-lisp/eldoc.elc \ $(lispsource)/uniquify.elc \ $(lispsource)/tooltip.elc -- 2.11.4.GIT