aboutsummaryrefslogtreecommitdiff
path: root/modules/markdown-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-24 09:41:35 -0400
committerCraig Jennings <c@cjennings.net>2026-06-24 09:41:35 -0400
commit7fbf13c27b25723a5b9d26e72a68ee09ff994098 (patch)
tree779119a25a10e77c444f25fad4bc3e76e3734ddb /modules/markdown-config.el
parentfba2125a65b6ee7c013e5772d869a8215510fd29 (diff)
downloaddotemacs-7fbf13c27b25723a5b9d26e72a68ee09ff994098.tar.gz
dotemacs-7fbf13c27b25723a5b9d26e72a68ee09ff994098.zip
chore(elisp): clear byte-compile warnings (elfeed, markdown, prog-general)
The use-package :bind autoload stubs for own same-file commands collided with their defuns ("defined multiple times"). Move those bindings out of :bind to keymap-global-set / with-eval-after-load after the defun — same key, command, and map, verified live in the daemon. prog-general's case was instead a redundant same-file declare-function (removed). Plus declare-function/defvar for lazy package symbols, and mark-whole-buffer swapped for goto-char+push-mark in the elfeed tag helpers. No behavior change. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
Diffstat (limited to 'modules/markdown-config.el')
-rw-r--r--modules/markdown-config.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/markdown-config.el b/modules/markdown-config.el
index 16935425d..424c09cc8 100644
--- a/modules/markdown-config.el
+++ b/modules/markdown-config.el
@@ -20,14 +20,13 @@
:mode (("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
- :bind (:map markdown-mode-map
- ("<f2>" . cj/markdown-preview)) ;; use same key as compile for consistency
:init (setq markdown-command "multimarkdown"))
;; Register markdown as a known org-src-block language so `org-lint'
;; stops warning on `#+begin_src markdown ... #+end_src' and `C-c ''
;; inside such a block opens it in `markdown-mode' instead of falling
;; back to fundamental-mode.
+(defvar org-src-lang-modes)
(with-eval-after-load 'org
(add-to-list 'org-src-lang-modes '("markdown" . markdown)))
@@ -40,6 +39,8 @@
;;;; --------------------- WIP: Markdown-Preview ---------------------
+(declare-function imp--notify-clients "impatient-mode")
+
(defun cj/markdown-preview-server-start ()
"Start the simple-httpd listener that serves the live markdown preview.
Idempotent: re-running while the server is already up is a no-op."
@@ -75,5 +76,12 @@ lives in a separate command."
(buffer-substring-no-properties (point-min) (point-max))))
(current-buffer)))
+;; Bind the preview key after the defun so use-package's `:bind' autoload
+;; stub doesn't collide with this file's own definition of the command
+;; (that collision is the "defined multiple times" byte-compile warning).
+;; Same key as compile, for consistency.
+(with-eval-after-load 'markdown-mode
+ (keymap-set markdown-mode-map "<f2>" #'cj/markdown-preview))
+
(provide 'markdown-config)
;;; markdown-config.el ends here