diff --git a/core/defuns/defuns-file.el b/core/defuns/defuns-file.el index e4f8b9cb6..a1e060b48 100644 --- a/core/defuns/defuns-file.el +++ b/core/defuns/defuns-file.el @@ -34,10 +34,10 @@ provided." (let ((dir (f-dirname path)) (fullpath (f-full path)) (is-auto t)) - (when (and bang (not (file-exists-p dir))) - (f-mkdir dir)) - (if (file-exists-p dir) - (if (file-exists-p fullpath) + (when (and bang (not (f-exists? dir))) + (mkdir dir)) + (if (f-exists? dir) + (if (f-exists? fullpath) (error "File already exists: %s" path) (find-file fullpath) (add-hook 'yas-after-exit-snippet-hook 'narf--save-exit) diff --git a/core/defuns/defuns-nlinum.el b/core/defuns/defuns-nlinum.el index 279bbd4c0..c89a31f8c 100644 --- a/core/defuns/defuns-nlinum.el +++ b/core/defuns/defuns-nlinum.el @@ -7,6 +7,12 @@ (narf|nlinum-disable) (narf|nlinum-enable))) +;;;###autoload +(defun narf|nlinum-enable () + (nlinum-mode +1) + (add-hook 'post-command-hook 'narf|nlinum-hl-line nil t) + (narf|nlinum-unhl-line)) + ;;;###autoload (defun narf|nlinum-disable () (nlinum-mode -1) diff --git a/modules/module-lisp.el b/modules/module-lisp.el index 324c5e4d6..3fb71787e 100644 --- a/modules/module-lisp.el +++ b/modules/module-lisp.el @@ -65,15 +65,11 @@ (add-hook 'before-save-hook 'delete-trailing-whitespace nil t) (add-hook 'after-save-hook 'narf/elisp-auto-compile nil t) - (let ((header-face 'font-lock-constant-face)) - (push '("Evil Command" "\\(^\\s-*(evil-define-command +\\)\\(\\_<.+\\_>\\)" 2) - imenu-generic-expression) - (push '("Evil Operator" "\\(^\\s-*(evil-define-operator +\\)\\(\\_<.+\\_>\\)" 2) - imenu-generic-expression) - (push '("Package" "\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)" 2) - imenu-generic-expression) - (push '("Spaceline Segment" "\\(^\\s-*(spaceline-define-segment +\\)\\(\\_<.+\\_>\\)" 2) - imenu-generic-expression))) + (dolist (i '(("Evil Command" "\\(^\\s-*(evil-define-command +\\)\\(\\_<.+\\_>\\)" 2) + ("Evil Operator" "\\(^\\s-*(evil-define-operator +\\)\\(\\_<.+\\_>\\)" 2) + ("Package" "\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)" 2) + ("Spaceline Segment" "\\(^\\s-*(spaceline-define-segment +\\)\\(\\_<.+\\_>\\)" 2))) + (push i imenu-generic-expression))) ;; Add new colors to helm-imenu (after! helm-imenu