emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ElDoc: adding optional support to display messages in header-line inste


From: Geralt
Subject: ElDoc: adding optional support to display messages in header-line instead of the echo area
Date: Sat, 1 Aug 2009 11:46:55 +0200

Hi,

I've added to ElDoc a customizable flag to redirect the output into
the header-line instead of the echo area. It's my first contribution
and I'm not sure if the patch is implementing the functionality good
enough to make it into Emacs. I'd like to hear your feedback :)

Here's the patch (and as attachement too, because GoogleMail is doing
changes to whitespace):
--- eldoc.el    2009-07-31 18:03:58.000000000 +0200
+++ eldoc.el    2009-08-01 11:43:29.587798820 +0200
@@ -105,6 +105,12 @@
  enable argument list to fit on one line" truncate-sym-name-if-fit))
   :group 'eldoc)

+(defcustom eldoc-display-in-header-line nil
+  "If set eldoc will display its messages in the topmost line of the
window, called the header-line, instead of the echo area.
+Use only when eldoc-echo-area-use-multiline-p is set to nil."
+  :type 'boolean
+  :group 'eldoc)
+
 (defface eldoc-highlight-function-argument
   '((t (:inherit bold)))
   "Face used for the argument at point in a function's argument list.
@@ -201,8 +207,10 @@
     ;; they are Legion.
     ;; Emacs way of preventing log messages.
     (let ((message-log-max nil))
-      (cond (eldoc-last-message (message "%s" eldoc-last-message))
-           (omessage (message nil)))))
+      (cond (eldoc-last-message (if eldoc-display-in-header-line
+                                   (setq header-line-format eldoc-last-message)
+                                 (message "%s" eldoc-last-message)
+                                 (omessage (message nil)))))))
   eldoc-last-message)

 ;; This function goes on pre-command-hook for XEmacs or when using idle




Geralt.

Attachment: eldoc-display-in-header-line.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]