summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/markdown-mode.el
diff options
context:
space:
mode:
authorSimeon Simeonov2025-02-05 19:25:11 +0100
committerSimeon Simeonov2025-02-05 19:25:11 +0100
commitf6a91e549fe34f047acdb03e806e0f7dce9ffce1 (patch)
tree1459feeefcf4a09b881cad538325f72cc3190eb6 /.emacs.d/lisp/markdown-mode.el
parent4227c712db2a11302ec4eda0c5035fecc4e3e4d2 (diff)
Upgrade markdown-mode, rust-prog-mode and yasnippet
Diffstat (limited to '.emacs.d/lisp/markdown-mode.el')
-rw-r--r--.emacs.d/lisp/markdown-mode.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/.emacs.d/lisp/markdown-mode.el b/.emacs.d/lisp/markdown-mode.el
index 89d8962..f99897d 100644
--- a/.emacs.d/lisp/markdown-mode.el
+++ b/.emacs.d/lisp/markdown-mode.el
@@ -287,6 +287,13 @@ cause lag when typing on slower machines."
287 :safe 'booleanp 287 :safe 'booleanp
288 :package-version '(markdown-mode . "2.2")) 288 :package-version '(markdown-mode . "2.2"))
289 289
290(defcustom markdown-wiki-link-retain-case nil
291 "When non-nil, wiki link file names do not have their case changed."
292 :group 'markdown
293 :type 'boolean
294 :safe 'booleanp
295 :package-version '(markdown-mode . "2.7"))
296
290(defcustom markdown-uri-types 297(defcustom markdown-uri-types
291 '("acap" "cid" "data" "dav" "fax" "file" "ftp" 298 '("acap" "cid" "data" "dav" "fax" "file" "ftp"
292 "geo" "gopher" "http" "https" "imap" "ldap" "mailto" 299 "geo" "gopher" "http" "https" "imap" "ldap" "mailto"
@@ -370,6 +377,7 @@ Math support can be enabled, disabled, or toggled later using
370(defcustom markdown-css-paths nil 377(defcustom markdown-css-paths nil
371 "List of URLs of CSS files to link to in the output XHTML." 378 "List of URLs of CSS files to link to in the output XHTML."
372 :group 'markdown 379 :group 'markdown
380 :safe (lambda (x) (and (listp x) (cl-every #'stringp x)))
373 :type '(repeat (string :tag "CSS File Path"))) 381 :type '(repeat (string :tag "CSS File Path")))
374 382
375(defcustom markdown-content-type "text/html" 383(defcustom markdown-content-type "text/html"
@@ -5180,6 +5188,7 @@ list simply adds a blank line)."
5180 (markdown-indent-on-enter 5188 (markdown-indent-on-enter
5181 (let (bounds) 5189 (let (bounds)
5182 (if (and (memq markdown-indent-on-enter '(indent-and-new-item)) 5190 (if (and (memq markdown-indent-on-enter '(indent-and-new-item))
5191 (not (markdown-code-block-at-point-p))
5183 (setq bounds (markdown-cur-list-item-bounds))) 5192 (setq bounds (markdown-cur-list-item-bounds)))
5184 (let ((beg (cl-first bounds)) 5193 (let ((beg (cl-first bounds))
5185 (end (cl-second bounds)) 5194 (end (cl-second bounds))
@@ -7735,7 +7744,7 @@ Standalone XHTML output is identified by an occurrence of
7735 7744
7736(defun markdown-stylesheet-link-string (stylesheet-path) 7745(defun markdown-stylesheet-link-string (stylesheet-path)
7737 (concat "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"" 7746 (concat "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\""
7738 (or (and (string-prefix-p "~" stylesheet-path) 7747 (or (and (string-match-p (rx (or "~" "./" "../")) stylesheet-path)
7739 (expand-file-name stylesheet-path)) 7748 (expand-file-name stylesheet-path))
7740 stylesheet-path) 7749 stylesheet-path)
7741 "\" />")) 7750 "\" />"))
@@ -8373,7 +8382,7 @@ in parent directories if
8373 ;; This function must not overwrite match data(PR #590) 8382 ;; This function must not overwrite match data(PR #590)
8374 (let* ((basename (replace-regexp-in-string 8383 (let* ((basename (replace-regexp-in-string
8375 "[[:space:]\n]" markdown-link-space-sub-char name)) 8384 "[[:space:]\n]" markdown-link-space-sub-char name))
8376 (basename (if (derived-mode-p 'gfm-mode) 8385 (basename (if (and (derived-mode-p 'gfm-mode) (not markdown-wiki-link-retain-case))
8377 (concat (upcase (substring basename 0 1)) 8386 (concat (upcase (substring basename 0 1))
8378 (downcase (substring basename 1 nil))) 8387 (downcase (substring basename 1 nil)))
8379 basename)) 8388 basename))
@@ -9091,6 +9100,10 @@ LANG is a string, and the returned major mode is a symbol."
9091 (and mode 9100 (and mode
9092 (fboundp mode) 9101 (fboundp mode)
9093 (or 9102 (or
9103 (not (string-match-p "ts-mode\\'" (symbol-name mode)))
9104 ;; Don't load tree-sitter mode if the mode is in neither auto-mode-alist nor major-mode-remap-alist
9105 ;; Because some ts-mode overwrites auto-mode-alist and it might break user configurations
9106
9094 ;; https://github.com/jrblevin/markdown-mode/issues/787 9107 ;; https://github.com/jrblevin/markdown-mode/issues/787
9095 ;; major-mode-remap-alist was introduced at Emacs 29.1 9108 ;; major-mode-remap-alist was introduced at Emacs 29.1
9096 (cl-loop for pair in (bound-and-true-p major-mode-remap-alist) 9109 (cl-loop for pair in (bound-and-true-p major-mode-remap-alist)