X-Git-Url: https://iankelling.org/git/?p=visible-mark;a=blobdiff_plain;f=visible-mark.el;h=c73dee558b3a1079740ce12e060e7a0af080d058;hp=1b6c552f2e6b35b719cf3ee24053dbed243a5414;hb=2fb1930f7e200ce5feeac236fa548e43345fc75c;hpb=db9fe8fc2a5dabdc2eec27b98462cc577979daa8 diff --git a/visible-mark.el b/visible-mark.el index 1b6c552..c73dee5 100644 --- a/visible-mark.el +++ b/visible-mark.el @@ -31,11 +31,11 @@ (defface visible-mark-face `((((type tty) (class color)) - (:background "gray" :foreground "white")) + (:background "gray" :foreground "black")) (((type tty) (class mono)) (:inverse-video t)) (((class color) (background dark)) - (:background "gray")) + (:background "gray" :foreground "black")) (((class color) (background light)) (:background "grey80")) (t (:background "gray"))) @@ -46,8 +46,6 @@ "The overlays used in this buffer.") (make-variable-buffer-local 'visible-mark-overlays) -(defvar visible-mark-non-trailing-faces nil) - (defcustom visible-mark-inhibit-trailing-overlay t "If non-nil, inhibit trailing overlay with underline face." :group 'visible-mark @@ -67,21 +65,6 @@ "A list of buffer names to be excluded" :group 'visible-mark :type '(repeat regexp)) - -(defun visible-mark-initialize-faces () - (if (and visible-mark-inhibit-trailing-overlay - (null visible-mark-non-trailing-faces)) - (let (faces) - (dotimes (i visible-mark-max) - (let ((face (or (nth i visible-mark-faces) 'visible-mark-face)) - (symbol (intern (format "visible-mark-non-trailing-face%s" i)))) - (copy-face face symbol) - (set-face-attribute symbol nil - :foreground (or (face-attribute face :background) t) - :background 'unspecified - :underline t) - (push symbol faces))) - (setq visible-mark-non-trailing-faces (nreverse faces))))) (defun visible-mark-initialize-overlays () (mapcar 'delete-overlay visible-mark-overlays) @@ -122,7 +105,7 @@ (fun (cdr arg)))))) (fun global-visible-mark-mode-exclude-alist)) nil) (t t)) - (visible-mark-mode))) + (visible-mark-mode t))) (define-minor-mode visible-mark-mode "A mode to make the mark visible." @@ -130,7 +113,6 @@ :group 'visible-mark (if visible-mark-mode (progn - (visible-mark-initialize-faces) (visible-mark-initialize-overlays) (add-hook 'post-command-hook 'visible-mark-move-overlays nil t)) (mapcar 'delete-overlay visible-mark-overlays)