]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Oct 2014 17:32:41 +0000 (13:32 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Oct 2014 17:32:41 +0000 (13:32 -0400)
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
lisp/ChangeLog
lisp/emacs-lisp/eldoc.el
lisp/loadup.el
src/ChangeLog
src/lisp.mk

index 6c27831e6f09e93c5b5ea680b455e33b330daef7..64c8c71dc762603afdbac10c3c615b7ea30a1dc7 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -103,6 +103,8 @@ this has no effect.
 \f
 * 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
index 610cf6f86704031fa3ec807e729131754a5d83b0..cf83767b924167351a4acfe4e948055bc97a63da 100644 (file)
@@ -1,5 +1,10 @@
 2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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.
index 7245989c4b02b9f817dc84262a06a85dbc822f2c..6dddf5b9a40a97888c62b14c63d364b9db22ac84 100644 (file)
@@ -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)))
 
index fd34648bb30e0c7cca8161d889633170b2f557aa..421c3d5bf3e287113c797c719ca0f462f820b2e0 100644 (file)
 (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
index b6f9401acf739a0e7adb6ff25d79c916f47584be..611e459d2a81a236f105f3d46adf78c51f353cef 100644 (file)
@@ -1,18 +1,21 @@
+2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
+
 2014-10-15  Eli Zaretskii  <eliz@gnu.org>
 
        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.
        (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.
        (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.
 
index 642e9af225f29c88dc9d67aed9d5bb72e1b92209..675df2b66e695d55118302a2a23c41f3fee540a4 100644 (file)
@@ -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