summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-10-15 13:32:41 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-10-15 13:32:41 -0400
commitdcdf2bd8d690168eed44563651e2d8f379b9c80e (patch)
tree5de46491f3995fbf10f56c780370f6bf00815a13
parentf65b226e7abf1e746d9f6a995bf7db3da1997795 (diff)
* 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.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/eldoc.el17
-rw-r--r--lisp/loadup.el1
-rw-r--r--src/ChangeLog23
-rw-r--r--src/lisp.mk1
6 files changed, 30 insertions, 19 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 6c27831e6f..64c8c71dc7 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 610cf6f867..cf83767b92 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 7245989c4b..6dddf5b9a4 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 fd34648bb3..421c3d5bf3 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 b6f9401acf..611e459d2a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
@@ -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 642e9af225..675df2b66e 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