Move elisp tuning upper to get better support for debugging when init
file has errors.
--- a/.emacs-my Sat Mar 07 00:05:07 2015 +0200
+++ b/.emacs-my Sun Mar 08 01:10:01 2015 -0600
@@ -138,6 +138,51 @@
obarray))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "lisp, elisp")
+
+(setq list-command-history-max 256)
+
+(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
+(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
+(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
+
+(defun my-emacs-lisp-mode-hook ()
+ (setq tab-width 8))
+(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
+
+(defun my-elisp-find-tag ()
+ (interactive)
+ (require 'etags)
+ (ring-insert find-tag-marker-ring (point-marker))
+ (unless (find-variable-at-point)
+ (find-function-at-point)
+ ))
+;; Goto elisp definition.
+(define-key emacs-lisp-mode-map (kbd "M-.") 'my-elisp-find-tag)
+
+(if (not (fboundp 'global-prettify-symbols-mode))
+ ;; http://www.emacswiki.org/emacs/PrettyLambda
+ (font-lock-add-keywords
+ 'emacs-lisp-mode
+ `(("(\\<\\(lambda\\)\\>"
+ (1 (progn (compose-region (match-beginning 1) (match-end 1) ,(make-char 'greek-iso8859-7 107)) font-lock-keyword-face)) )))
+ (global-prettify-symbols-mode 1))
+
+(defun my-dump-funcs ()
+ "Dump all function calls in current buffer. Useful to explore
+elisp API from somebody else files."
+ (interactive)
+ (let* ( (cur-buffer (current-buffer)) (new-buffer (get-buffer-create (concat (buffer-name cur-buffer) "-funcs.el"))) symb )
+ (while (search-forward-regexp "([[:alnum:]*]" nil t)
+ (setq symb (thing-at-point 'symbol))
+ (with-current-buffer new-buffer
+ (insert-string symb)
+ (insert-char ?\n 1)))
+ (switch-to-buffer new-buffer)
+ (shell-command-on-region (point-min) (point-max) "sort -u" nil t)
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "mode groups")
(defmacro my-defun-rename-symb-tree (name doc func)
@@ -2538,51 +2583,6 @@
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "lisp, elisp")
-
-(setq list-command-history-max 256)
-
-(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
-(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
-(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
-
-(defun my-emacs-lisp-mode-hook ()
- (setq tab-width 8))
-(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
-
-(defun my-elisp-find-tag ()
- (interactive)
- (require 'etags)
- (ring-insert find-tag-marker-ring (point-marker))
- (unless (find-variable-at-point)
- (find-function-at-point)
- ))
-;; Goto elisp definition.
-(define-key emacs-lisp-mode-map (kbd "M-.") 'my-elisp-find-tag)
-
-(if (not (fboundp 'global-prettify-symbols-mode))
- ;; http://www.emacswiki.org/emacs/PrettyLambda
- (font-lock-add-keywords
- 'emacs-lisp-mode
- `(("(\\<\\(lambda\\)\\>"
- (1 (progn (compose-region (match-beginning 1) (match-end 1) ,(make-char 'greek-iso8859-7 107)) font-lock-keyword-face)) )))
- (global-prettify-symbols-mode 1))
-
-(defun my-dump-funcs ()
- "Dump all function calls in current buffer. Useful to explore
-elisp API from somebody else files."
- (interactive)
- (let* ( (cur-buffer (current-buffer)) (new-buffer (get-buffer-create (concat (buffer-name cur-buffer) "-funcs.el"))) symb )
- (while (search-forward-regexp "([[:alnum:]*]" nil t)
- (setq symb (thing-at-point 'symbol))
- (with-current-buffer new-buffer
- (insert-string symb)
- (insert-char ?\n 1)))
- (switch-to-buffer new-buffer)
- (shell-command-on-region (point-min) (point-max) "sort -u" nil t)
- ))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "c-mode, cc-mode, c++-mode")
;; Minor mode that highlights suspicious C and C++ constructions.