From d5a49a857b4986dec2a0a6c90f701bc09ebcf81d Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Mon, 20 Oct 2014 13:58:59 -0400 Subject: emacs: Query Emacs display table to determine ellipsis string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emacs has a slot in its display table, 'selective-display, which it uses to store the character(s) it displays when text gets elided. This commit ensures notmuch does not assume that string is ‘...’ – instead, notmuch examines the display table and bases computations on its actual contents. --- emacs/notmuch-lib.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs/notmuch-lib.el') diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 1e166c6a..9ad4ab1e 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -465,6 +465,14 @@ This replaces spaces, percents, and double quotes in STR with (kill-new "") (message "Nothing to stash!"))) +(defun notmuch-common-selective-display-string () + "Determine the selective display string for the current buffer. +This is usually `...', but it can be reset." + (display-table-slot (or (window-display-table) + buffer-display-table + standard-display-table) + 'selective-display)) + ;; (defun notmuch-remove-if-not (predicate list) -- cgit v1.2.3