Browse Source

Add minor-mode for info-in-prompt

pull/15/head
10sr 9 years ago
parent
commit
4875c0bfd5
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      emacs.el

+ 11
- 2
emacs.el View File

@@ -2056,7 +2056,7 @@ Commands are searched from ALIST."
"Set info-in-prompt advices for FUNCTIONS." "Set info-in-prompt advices for FUNCTIONS."
`(progn `(progn
,@(mapcar (lambda (f) ,@(mapcar (lambda (f)
`(defadvice ,f (before info-in-prompt activate)
`(defadvice ,f (before info-in-prompt-modify)
"Show info in prompt." "Show info in prompt."
(let ((orig (ad-get-arg 0)) (let ((orig (ad-get-arg 0))
(str (format-mode-line info-in-prompt-format))) (str (format-mode-line info-in-prompt-format)))
@@ -2072,6 +2072,15 @@ Commands are searched from ALIST."
read-string read-string
completing-read) completing-read)


()
(define-minor-mode info-in-prompt-mode
"Prepend some infomation to prompt of minibuffer."
:init-value nil
:global t
:lighter ""
(if info-in-prompt-mode
(ad-activate-regexp "^info-in-prompt-modify$")
(ad-deactivate-regexp "^info-in-prompt-modify$")))

(info-in-prompt-mode 1)


;;; emacs.el ends here ;;; emacs.el ends here

Loading…
Cancel
Save