diff options
| author | Simeon Simeonov | 2021-04-30 10:54:00 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2021-04-30 10:54:00 +0200 |
| commit | 247cba273f662ab073c60e6ce2ed0fe093f6e84f (patch) | |
| tree | ac2e2bc55a7f766dd69ff5ab21062cbf2db926eb /.emacs.d/lisp | |
| parent | 7a3b877abecb9b2f8ee1200bd2617202b325acd1 (diff) | |
Update markdown-mode
Diffstat (limited to '.emacs.d/lisp')
| -rw-r--r-- | .emacs.d/lisp/markdown-mode.el | 23 |
1 files changed, 12 insertions, 11 deletions
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." | |||
| 1777 | (require 'font-lock) | 1777 | (require 'font-lock) |
| 1778 | 1778 | ||
| 1779 | (defgroup markdown-faces nil | 1779 | (defgroup markdown-faces nil |
| 1780 | "Faces used in Markdown Mode" | 1780 | "Faces used in Markdown Mode." |
| 1781 | :group 'markdown | 1781 | :group 'markdown |
| 1782 | :group 'faces) | 1782 | :group 'faces) |
| 1783 | 1783 | ||
| @@ -5416,7 +5416,7 @@ See also `markdown-mode-map'.") | |||
| 5416 | ;;; Menu ====================================================================== | 5416 | ;;; Menu ====================================================================== |
| 5417 | 5417 | ||
| 5418 | (easy-menu-define markdown-mode-menu markdown-mode-map | 5418 | (easy-menu-define markdown-mode-menu markdown-mode-map |
| 5419 | "Menu for Markdown mode" | 5419 | "Menu for Markdown mode." |
| 5420 | '("Markdown" | 5420 | '("Markdown" |
| 5421 | "---" | 5421 | "---" |
| 5422 | ("Movement" | 5422 | ("Movement" |
| @@ -6995,7 +6995,7 @@ demote." | |||
| 6995 | (markdown-backward-same-level 1)))) | 6995 | (markdown-backward-same-level 1)))) |
| 6996 | 6996 | ||
| 6997 | (defun markdown-outline-up () | 6997 | (defun markdown-outline-up () |
| 6998 | "Move to previous list item, when in a list, or next heading." | 6998 | "Move to previous list item, when in a list, or previous heading." |
| 6999 | (interactive) | 6999 | (interactive) |
| 7000 | (unless (markdown-up-list) | 7000 | (unless (markdown-up-list) |
| 7001 | (markdown-up-heading 1))) | 7001 | (markdown-up-heading 1))) |
| @@ -8525,11 +8525,10 @@ or \\[markdown-toggle-inline-images]." | |||
| 8525 | (let* ((start (match-beginning 0)) | 8525 | (let* ((start (match-beginning 0)) |
| 8526 | (imagep (match-beginning 1)) | 8526 | (imagep (match-beginning 1)) |
| 8527 | (end (match-end 0)) | 8527 | (end (match-end 0)) |
| 8528 | (file (match-string-no-properties 6)) | 8528 | (file (match-string-no-properties 6))) |
| 8529 | (unhex_file (url-unhex-string file))) | ||
| 8530 | (when (and imagep | 8529 | (when (and imagep |
| 8531 | (not (zerop (length file)))) | 8530 | (not (zerop (length file)))) |
| 8532 | (unless (file-exists-p unhex_file) | 8531 | (unless (file-exists-p file) |
| 8533 | (let* ((download-file (funcall markdown-translate-filename-function file)) | 8532 | (let* ((download-file (funcall markdown-translate-filename-function file)) |
| 8534 | (valid-url (ignore-errors | 8533 | (valid-url (ignore-errors |
| 8535 | (member (downcase (url-type (url-generic-parse-url download-file))) | 8534 | (member (downcase (url-type (url-generic-parse-url download-file))) |
| @@ -8538,11 +8537,13 @@ or \\[markdown-toggle-inline-images]." | |||
| 8538 | (setq file (markdown--get-remote-image download-file)) | 8537 | (setq file (markdown--get-remote-image download-file)) |
| 8539 | (when (not valid-url) | 8538 | (when (not valid-url) |
| 8540 | ;; strip query parameter | 8539 | ;; strip query parameter |
| 8541 | (setq file (replace-regexp-in-string "?.+\\'" "" file)))))) | 8540 | (setq file (replace-regexp-in-string "?.+\\'" "" file)) |
| 8542 | (when (file-exists-p unhex_file) | 8541 | (unless (file-exists-p file) |
| 8543 | (let* ((abspath (if (file-name-absolute-p unhex_file) | 8542 | (setq file (url-unhex-string file))))))) |
| 8544 | unhex_file | 8543 | (when (file-exists-p file) |
| 8545 | (concat default-directory unhex_file))) | 8544 | (let* ((abspath (if (file-name-absolute-p file) |
| 8545 | file | ||
| 8546 | (concat default-directory file))) | ||
| 8546 | (image | 8547 | (image |
| 8547 | (cond ((and markdown-max-image-size | 8548 | (cond ((and markdown-max-image-size |
| 8548 | (image-type-available-p 'imagemagick)) | 8549 | (image-type-available-p 'imagemagick)) |
