From f6a91e549fe34f047acdb03e806e0f7dce9ffce1 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 5 Feb 2025 19:25:11 +0100 Subject: Upgrade markdown-mode, rust-prog-mode and yasnippet --- .emacs.d/lisp/markdown-mode.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to '.emacs.d/lisp/markdown-mode.el') 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." :safe 'booleanp :package-version '(markdown-mode . "2.2")) +(defcustom markdown-wiki-link-retain-case nil + "When non-nil, wiki link file names do not have their case changed." + :group 'markdown + :type 'boolean + :safe 'booleanp + :package-version '(markdown-mode . "2.7")) + (defcustom markdown-uri-types '("acap" "cid" "data" "dav" "fax" "file" "ftp" "geo" "gopher" "http" "https" "imap" "ldap" "mailto" @@ -370,6 +377,7 @@ Math support can be enabled, disabled, or toggled later using (defcustom markdown-css-paths nil "List of URLs of CSS files to link to in the output XHTML." :group 'markdown + :safe (lambda (x) (and (listp x) (cl-every #'stringp x))) :type '(repeat (string :tag "CSS File Path"))) (defcustom markdown-content-type "text/html" @@ -5180,6 +5188,7 @@ list simply adds a blank line)." (markdown-indent-on-enter (let (bounds) (if (and (memq markdown-indent-on-enter '(indent-and-new-item)) + (not (markdown-code-block-at-point-p)) (setq bounds (markdown-cur-list-item-bounds))) (let ((beg (cl-first bounds)) (end (cl-second bounds)) @@ -7735,7 +7744,7 @@ Standalone XHTML output is identified by an occurrence of (defun markdown-stylesheet-link-string (stylesheet-path) (concat "")) @@ -8373,7 +8382,7 @@ in parent directories if ;; This function must not overwrite match data(PR #590) (let* ((basename (replace-regexp-in-string "[[:space:]\n]" markdown-link-space-sub-char name)) - (basename (if (derived-mode-p 'gfm-mode) + (basename (if (and (derived-mode-p 'gfm-mode) (not markdown-wiki-link-retain-case)) (concat (upcase (substring basename 0 1)) (downcase (substring basename 1 nil))) basename)) @@ -9091,6 +9100,10 @@ LANG is a string, and the returned major mode is a symbol." (and mode (fboundp mode) (or + (not (string-match-p "ts-mode\\'" (symbol-name mode))) + ;; Don't load tree-sitter mode if the mode is in neither auto-mode-alist nor major-mode-remap-alist + ;; Because some ts-mode overwrites auto-mode-alist and it might break user configurations + ;; https://github.com/jrblevin/markdown-mode/issues/787 ;; major-mode-remap-alist was introduced at Emacs 29.1 (cl-loop for pair in (bound-and-true-p major-mode-remap-alist) -- cgit v1.3