diff --git a/core/core-os-osx.el b/core/core-os-osx.el index 5a1d4bef2..fd779b930 100644 --- a/core/core-os-osx.el +++ b/core/core-os-osx.el @@ -81,19 +81,19 @@ (message "Running: %s" command) (shell-command command))) -(defmacro open-with! (id &optional app dir) +(defmacro def-open-with! (id &optional app dir) `(defun ,(intern (format "os-%s" id)) () (interactive) (narf-open-with ,app ,dir))) -(open-with! open-in-default-program) -(open-with! open-in-browser "Google Chrome") -(open-with! reveal "Finder" default-directory) -(open-with! reveal-project "Finder" (narf/project-root)) -(open-with! upload "Transmit") -(open-with! upload-folder "Transmit" default-directory) -(open-with! send-to-launchbar "LaunchBar") -(open-with! send-project-to-launchbar "LaunchBar" (narf/project-root)) +(def-open-with! open-in-default-program) +(def-open-with! open-in-browser "Google Chrome") +(def-open-with! reveal "Finder" default-directory) +(def-open-with! reveal-project "Finder" (narf/project-root)) +(def-open-with! upload "Transmit") +(def-open-with! upload-folder "Transmit" default-directory) +(def-open-with! send-to-launchbar "LaunchBar") +(def-open-with! send-project-to-launchbar "LaunchBar" (narf/project-root)) (defun os-switch-to-term () (interactive) diff --git a/modules/module-lisp.el b/modules/module-lisp.el index 9c7add77c..3215e4a93 100644 --- a/modules/module-lisp.el +++ b/modules/module-lisp.el @@ -37,24 +37,26 @@ (setq mode-name "Elisp") ; [pedantry intensifies] (font-lock-add-keywords - nil `(("(\\(lambda\\)" - (1 (narf/show-as ?λ))) + nil `(("(\\(lambda\\)" (1 (narf/show-as ?λ))) + ("(\\(narf\\)\\>" (1 font-lock-keyword-face append)) ;; Highlight narf macros (macros are fontified in emacs 25+) (,(concat "(\\(def-" (regexp-opt '("electric" "project-type" "company-backend" "builder" "repl" "textobj" "tmp-excmd" "rotate" - "repeat" "yas-mode" "version-cmd" "docset")) + "repeat" "yas-mode" "version-cmd" "docset" + "open-with")) "!\\)") (1 font-lock-keyword-face append)) (,(concat "(\\(" (regexp-opt '("λ" "in" "map" "after" "shut-up" "add-hook" - "associate" "open-with" "define-org-link" + "associate" "define-org-link" "ex" "define-org-section")) "!\\)") (1 font-lock-keyword-face append)) ;; Ert + (,(concat "(" (regexp-opt '("ert-deftest") t)