branch: elpa/markdown-mode commit e50a72a6cb716996b6c16c16198e19a9b868ac36 Merge: c9c9ec6bcd 0a522bf682 Author: Joe Reinhart <joseph.reinh...@gmail.com> Commit: Joe Reinhart <joseph.reinh...@gmail.com>
Merge branch 'master' into jayemar/toggle-hiding-of-wiki-links --- .github/workflows/test.yml | 6 +++--- CHANGES.md | 14 ++++++++++++-- README.md | 2 ++ markdown-mode.el | 25 ++++++++++++++++++++----- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b07b958eca..fa3569fff9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,16 +10,16 @@ jobs: strategy: matrix: emacs_version: - - 27.2 - 28.2 - - 29.3 + - 29.4 + - 30.1 - snapshot steps: - uses: purcell/setup-emacs@master with: version: ${{ matrix.emacs_version }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: sudo apt install pandoc aspell - name: Run tests diff --git a/CHANGES.md b/CHANGES.md index 1c71afbba7..1a5c2326ad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,16 @@ -# Markdown Mode 2.7 +# Markdown Mode 2.8 + +* **Breaking changes:** + - GNU Emacs 28.1 or later is required. + +* New Features: -*Under development* +* Bug fixes: + +* Improvements: + - Support drag and drop features on Windows and multiple files' drag and drop + +# Markdown Mode 2.7 * New Features: - Variable `markdown-follow-link-functions` extends diff --git a/README.md b/README.md index 62b5c3d306..66da025db7 100644 --- a/README.md +++ b/README.md @@ -1138,6 +1138,7 @@ first version was released on May 24, 2007. * 2020-05-30: [Version 2.4][] * 2022-02-12: [Version 2.5][] * 2023-08-30: [Version 2.6][] + * 2025-02-26: [Version 2.7][] [Version 1.1]: https://jblevins.org/projects/markdown-mode/rev-1-1 [Version 1.2]: https://jblevins.org/projects/markdown-mode/rev-1-2 @@ -1156,3 +1157,4 @@ first version was released on May 24, 2007. [Version 2.4]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.4 [Version 2.5]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.5 [Version 2.6]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.6 +[Version 2.7]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.7 diff --git a/markdown-mode.el b/markdown-mode.el index c3aadff3b7..063df8ed40 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -6,8 +6,8 @@ ;; Author: Jason R. Blevins <jblev...@xbeta.org> ;; Maintainer: Jason R. Blevins <jblev...@xbeta.org> ;; Created: May 24, 2007 -;; Version: 2.7-alpha -;; Package-Requires: ((emacs "27.1")) +;; Version: 2.8-alpha +;; Package-Requires: ((emacs "28.1")) ;; Keywords: Markdown, GitHub Flavored Markdown, itex ;; URL: https://jblevins.org/projects/markdown-mode/ @@ -62,7 +62,7 @@ ;;; Constants ================================================================= -(defconst markdown-mode-version "2.7-alpha" +(defconst markdown-mode-version "2.8-alpha" "Markdown mode version number.") (defconst markdown-output-buffer-name "*markdown-output*" @@ -10102,6 +10102,15 @@ rows and columns and the column alignment." (markdown-insert-inline-image link-text file) (markdown-insert-inline-link link-text file)))) +(defun markdown--dnd-multi-local-file-handler (urls action) + (let ((multile-urls-p (> (length urls) 1))) + (dolist (url urls) + (markdown--dnd-local-file-handler url action) + (when multile-urls-p + (insert " "))))) + +(put 'markdown--dnd-multi-local-file-handler 'dnd-multiple-handler t) + ;;; Mode Definition ========================================================== @@ -10229,8 +10238,14 @@ rows and columns and the column alignment." #'markdown--inhibit-electric-quote nil :local) ;; drag and drop handler - (setq-local dnd-protocol-alist (cons '("^file:///" . markdown--dnd-local-file-handler) - dnd-protocol-alist)) + (let ((dnd-handler (if (>= emacs-major-version 30) + #'markdown--dnd-multi-local-file-handler + #'markdown--dnd-local-file-handler))) + (setq-local dnd-protocol-alist (append + (list (cons "^file:///" dnd-handler) + (cons "^file:/[^/]" dnd-handler) + (cons "^file:[^/]" dnd-handler)) + dnd-protocol-alist))) ;; media handler (when (version< "29" emacs-version)