From 0237a514e03c62b32680c7b9f5a4571f37b6b125 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 18 May 2013 16:06:40 +0100 Subject: Emacs: remove eldoc-context --- emacs/elisp/eldoc-context.el | 40 ---------------------------------------- emacs/init.el | 3 --- 2 files changed, 43 deletions(-) delete mode 100644 emacs/elisp/eldoc-context.el diff --git a/emacs/elisp/eldoc-context.el b/emacs/elisp/eldoc-context.el deleted file mode 100644 index df8797f..0000000 --- a/emacs/elisp/eldoc-context.el +++ /dev/null @@ -1,40 +0,0 @@ -(provide 'eldoc-context) - -(defun rgr/toggle-context-help () - "Turn on or off the context help. -Note that if ON and you hide the help buffer then you need to -manually reshow it. A double toggle will make it reappear" - (interactive) - (with-current-buffer (help-buffer) - (unless (local-variable-p 'context-help) - (set (make-local-variable 'context-help) t)) - (if (setq context-help (not context-help)) - (progn - (if (not (get-buffer-window (help-buffer))) - (display-buffer (help-buffer))))) - (message "Context help %s" (if context-help "ON" "OFF")))) - -(defun rgr/context-help () - "Display function or variable at point in *Help* buffer if visible. -Default behaviour can be turned off by setting the buffer local -context-help to false" - (interactive) - (let ((rgr-symbol (symbol-at-point))) ; symbol-at-point http://www.emacswiki.org/cgi-bin/wiki/thingatpt%2B.el - (with-current-buffer (help-buffer) - (unless (local-variable-p 'context-help) - (set (make-local-variable 'context-help) t)) - (if (and context-help (get-buffer-window (help-buffer)) - rgr-symbol) - (if (fboundp rgr-symbol) - (describe-function rgr-symbol) - (if (boundp rgr-symbol) (describe-variable rgr-symbol))))))) - -(defadvice eldoc-print-current-symbol-info - (around eldoc-show-c-tag activate) - (cond - ((eq major-mode 'emacs-lisp-mode) (rgr/context-help) ad-do-it) - ((eq major-mode 'lisp-interaction-mode) (rgr/context-help) ad-do-it) - ((eq major-mode 'apropos-mode) (rgr/context-help) ad-do-it) - (t ad-do-it))) - -(global-set-key (kbd "C-c h") 'rgr/toggle-context-help) \ No newline at end of file diff --git a/emacs/init.el b/emacs/init.el index 3f00d34..face66d 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -316,9 +316,6 @@ Values: `desktop', `server', `laptop'") (concat user-emacs-directory "info")) -(use-package eldoc-context - :bind (("C-c h" . rgr/toggle-context-help))) - (use-package which-func :init (which-function-mode) :config (setq which-func-modes t)) -- cgit 1.4.1