emacs/old-config/pkgs/eldoc-init.el

29 lines
901 B
EmacsLisp
Raw Normal View History

2018-04-07 10:54:04 +08:00
(defun eldoc-init ()
(put 'c-eldoc-includes 'safe-local-variable 'stringp)
(put 'c-eldoc-cpp-macro-arguments 'safe-local-variable 'stringp)
(put 'c-eldoc-cpp-normal-arguments 'safe-local-variable 'stringp)
(put 'c-eldoc-cpp-command 'safe-local-variable 'stringp))
(defun eldoc-config ()
(add-hook 'c-mode-hook
#'(lambda ()
(c-turn-on-eldoc-mode)))
(add-hook 'c++-mode-hook
#'(lambda ()
(c-turn-on-eldoc-mode)))
(eldoc-in-minibuffer-mode 1)
(setq ess-eval-visibly-p nil))
(register-mypkg
(list :name "eldoc"
:enabled t
:packages '(eldoc-eval c-eldoc)
:init #'eldoc-init
:config #'eldoc-config))
;;(defvar c-eldoc-cpp-command "/lib/cpp ") ;; compiler
;;(defvar c-eldoc-cpp-macro-arguments "-dD -w -P")
;;(defvar c-eldoc-cpp-normal-arguments "-w -P")
;;(defvar c-eldoc-includes "`pkg-config gtk+-2.0 --cflags` -I./ -I../ ") ;; include flags