summaryrefslogtreecommitdiff
path: root/elisp.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp.el')
-rw-r--r--elisp.el18
1 files changed, 15 insertions, 3 deletions
diff --git a/elisp.el b/elisp.el
index bb68713..415ce59 100644
--- a/elisp.el
+++ b/elisp.el
@@ -11,6 +11,7 @@
;; The original value is eldoc-minor-mode-string
+(autoload 'durand-hide-minor-mode "common")
(durand-hide-minor-mode eldoc-mode)
;;; fontification of extra keywords in emacs lisp files
@@ -124,6 +125,9 @@
;;; remember cursor position
+;; to satisfy flymake
+(defvar load-file-directory)
+
(require 'saveplace)
(set 'save-place-file (expand-file-name "saveplace" load-file-directory))
(set 'save-place-forget-unreadable-files t)
@@ -318,9 +322,9 @@ macros.")
;;;###autoload
(defun elisp-macro-expand (start end subst)
- "Expand ELisp macros in the region.
-Normally display output in temp buffer, but
-prefix arg means replace the region with it.
+ "Expand ELisp macros in the region delimited by START and END.
+Normally display output in temp buffer, but when SUBST is
+non-nil, it means to replace the region with the output.
Note that this only expands one Emacs Lisp form. So multiple
forms have to be expanded separately.
@@ -342,6 +346,14 @@ Adapted from `c-macro-expand'."
(define-key emacs-lisp-mode-map (vector 3 5) #'elisp-macro-expand)
+;;; Make sure to use the latest load-path for flymake
+
+(defun elisp-update-load-path ()
+ "Update `elisp-flymake-byte-compile-load-path'."
+ (setq elisp-flymake-byte-compile-load-path (cons "./" load-path)))
+
+(add-hook 'emacs-lisp-mode-hook #'elisp-update-load-path)
+
(provide 'elisp)
;;; elisp.el ends here