From 247cba273f662ab073c60e6ce2ed0fe093f6e84f Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Fri, 30 Apr 2021 10:54:00 +0200 Subject: Update markdown-mode --- .emacs.d/lisp/markdown-mode.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/lisp/markdown-mode.el b/.emacs.d/lisp/markdown-mode.el index 6775bfa..114f9a1 100644 --- a/.emacs.d/lisp/markdown-mode.el +++ b/.emacs.d/lisp/markdown-mode.el @@ -1777,7 +1777,7 @@ See `markdown-hide-markup' for additional details." (require 'font-lock) (defgroup markdown-faces nil - "Faces used in Markdown Mode" + "Faces used in Markdown Mode." :group 'markdown :group 'faces) @@ -5416,7 +5416,7 @@ See also `markdown-mode-map'.") ;;; Menu ====================================================================== (easy-menu-define markdown-mode-menu markdown-mode-map - "Menu for Markdown mode" + "Menu for Markdown mode." '("Markdown" "---" ("Movement" @@ -6995,7 +6995,7 @@ demote." (markdown-backward-same-level 1)))) (defun markdown-outline-up () - "Move to previous list item, when in a list, or next heading." + "Move to previous list item, when in a list, or previous heading." (interactive) (unless (markdown-up-list) (markdown-up-heading 1))) @@ -8525,11 +8525,10 @@ or \\[markdown-toggle-inline-images]." (let* ((start (match-beginning 0)) (imagep (match-beginning 1)) (end (match-end 0)) - (file (match-string-no-properties 6)) - (unhex_file (url-unhex-string file))) + (file (match-string-no-properties 6))) (when (and imagep (not (zerop (length file)))) - (unless (file-exists-p unhex_file) + (unless (file-exists-p file) (let* ((download-file (funcall markdown-translate-filename-function file)) (valid-url (ignore-errors (member (downcase (url-type (url-generic-parse-url download-file))) @@ -8538,11 +8537,13 @@ or \\[markdown-toggle-inline-images]." (setq file (markdown--get-remote-image download-file)) (when (not valid-url) ;; strip query parameter - (setq file (replace-regexp-in-string "?.+\\'" "" file)))))) - (when (file-exists-p unhex_file) - (let* ((abspath (if (file-name-absolute-p unhex_file) - unhex_file - (concat default-directory unhex_file))) + (setq file (replace-regexp-in-string "?.+\\'" "" file)) + (unless (file-exists-p file) + (setq file (url-unhex-string file))))))) + (when (file-exists-p file) + (let* ((abspath (if (file-name-absolute-p file) + file + (concat default-directory file))) (image (cond ((and markdown-max-image-size (image-type-available-p 'imagemagick)) -- cgit v1.3