From f6281d757d35bb93790732164f9d8d11c043c00c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 23 May 2026 09:35:24 +0300 Subject: ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'. --- etc/NEWS | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/NEWS b/etc/NEWS index 3021ad42a12..1f99eb22a38 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3931,7 +3931,20 @@ A major mode based on 'conf-mode' for editing ".npmrc" files. ** New major modes based on the tree-sitter library *** New major mode 'markdown-ts-mode'. -A major mode based on the tree-sitter library for editing Markdown files. +A major mode based on the tree-sitter library for editing Markdown +files. This is now the default major mode for Markdown files. If you +don't have the necessary tree-sitter grammar libraries installed, or if +your Emacs was built without tree-sitter support, Emacs will now show a +warning to that effect when you visit a Markdown file. If you don't +want to use this mode and want to avoid these warnings, add the +following to your init file: + + (add-to-list 'auto-mode-alist '("\\.md\\'" . fundamental-mode)) + (add-to-list 'auto-mode-alist '("\\.markdown\\'" . fundamental-mode)) + (add-to-list 'auto-mode-alist '("\\.mdx\\'" . fundamental-mode)) + +This will cause Emacs to visit Markdown files in Fundamental mode, which +was the default before this mode was added to Emacs. *** New major mode 'mhtml-ts-mode'. An optional major mode based on the tree-sitter library for editing HTML -- cgit v1.3 From 7a17f97baa7d483cba5cde3cd22c34e0597e60b5 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 4 May 2026 10:14:36 +0200 Subject: Prettify special glyphs * lisp/disp-table.el (prettify-special-glyphs-mode): New mode to display nicer special glyphs. (special-glyphs): New face for displaying special glyphs when the minor mode is active. (prettify-special-glyphs-saved-truncation) (prettify-special-glyphs-saved-continuation): Internal variables to save previous special glyphs. * etc/NEWS: Announce the change. (Bug#80628) --- etc/NEWS | 6 ++++++ lisp/disp-table.el | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) (limited to 'etc') diff --git a/etc/NEWS b/etc/NEWS index 1f99eb22a38..083e6b50ea4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -169,6 +169,12 @@ behavior, customize 'find-function-mode-lower-precedence' to non-nil. --- ** 'find-function' can now find 'cl-defmethod' invocations inside macros. +--- +** New minor mode 'prettify-special-glyphs-mode'. +The new minor mode prettifies the special character glyphs (truncation +and continuation) on TTY frames (and GUI frames without fringes). You +can customize the associated new face 'special-glyphs'. + ** Minibuffer and Completions +++ diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 9f2971a6fc3..467430f30ef 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -458,6 +458,50 @@ which characters can be displayed and which cannot." (insert ")\n")) (pop-to-buffer buf))) +(defface special-glyphs + '((t :inherit (shadow default))) + "Face for displaying special glyphs." + :group 'basic-faces + :version "31.1") + +(defvar prettify-special-glyphs-saved-truncation) +(defvar prettify-special-glyphs-saved-continuation) + +;;;###autoload +(define-minor-mode prettify-special-glyphs-mode + "Mode to display pretty special character glyphs. +If you have already customized your special character glyphs, only the +`special-glyphs' face is applied to them. This mode only applies to the +`standard-display-table'. Window or buffer display table, if defined, +still take precedence." + :global t + :group 'display + (if prettify-special-glyphs-mode + (let ((tbl standard-display-table) + truncation wrap) + ;; Save current glyphs. + (setq prettify-special-glyphs-saved-truncation + (display-table-slot tbl 'truncation) + prettify-special-glyphs-saved-continuation + (display-table-slot tbl 'wrap)) + ;; Prepare new ones with face. + (setq truncation + (if prettify-special-glyphs-saved-truncation + (make-glyph-code prettify-special-glyphs-saved-truncation + 'special-glyphs) + (make-glyph-code ?→ 'special-glyphs)) + wrap + (if prettify-special-glyphs-saved-continuation + (make-glyph-code prettify-special-glyphs-saved-continuation + 'special-glyphs) + (make-glyph-code ?↩ 'special-glyphs))) + ;; Alter display-table. + (set-display-table-slot tbl 'truncation truncation) + (set-display-table-slot tbl 'wrap wrap)) + (let ((tbl standard-display-table)) + ;; Reset saved glyphs. + (set-display-table-slot tbl 'truncation prettify-special-glyphs-saved-truncation) + (set-display-table-slot tbl 'wrap prettify-special-glyphs-saved-continuation)))) (provide 'disp-table) -- cgit v1.3