From d02e63924c92a6f0f2f88881a75680cb9a538962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 2 Sep 2022 23:52:00 +0200 Subject: eb.el: Small improvements. --- eb.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'eb.el') diff --git a/eb.el b/eb.el index 46fc958..e41d35d 100644 --- a/eb.el +++ b/eb.el @@ -11,14 +11,15 @@ "Episode Browser development package." :prefix "eb-") -;; Disable ucs-utils for back-button-mode. -;; (when (equal system-type 'windows-nt) -;; (require 'ucs-utils) -;; (defun ucs-utils-char (name fallback &optional test) -;; (or (if (version< emacs-version "26") -;; (cdr (assoc-string name (ucs-names) t)) -;; (char-from-name name t)) -;; fallback))) +;; Disable ucs-utils (used by back-button-mode), which causes lag. +(when (and (equal system-type 'windows-nt) + (require 'back-button nil t) + (require 'ucs-utils nil t)) + (defun ucs-utils-char (name fallback &optional test) + (or (if (version< emacs-version "26") + (cdr (assoc-string name (ucs-names) t)) + (char-from-name name t)) + fallback))) ;; Truncate dired headers minor mode. @@ -204,7 +205,7 @@ (when (not eb--dired-truncate-lines--orig) (toggle-truncate-lines -1)) (when (not eb--dired-hide-details-mode--orig) (dired-hide-details-mode -1)) (when (not eb--dired-truncate-headers-mode--orig) (eb--dired-truncate-headers-mode -1)) - (message "close")))))) + (message "")))))) ;;;###autoload (defun eb-dired-here (&optional arg) @@ -346,7 +347,9 @@ (progn (setq eb-tool-bar-mode--old-map tool-bar-map) (when (require 'back-button nil t) - (back-button-mode 1)) + (setq-local back-button-mode-lighter nil) + (back-button-mode 1) + (assq-delete-all 'back-button-mode minor-mode-map-alist)) (let ((map (make-sparse-keymap))) ;; Windows, buffers and files. -- cgit v1.2.3