Re: master d423017cae1: * lisp/vc/vc-dir.el (vc-dir-headers): Try a hints separator line.

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
Eli Zaretskii [28/Aug  9:03am +03] wrote:
> I apologize for not catching this discussion in time, but IMO this
> change is more backward-incompatible than it should be.  It's okay to
> add strike-through on terminals which support that, but why break
> those which don't and only have underline?  The argument that
> strike-through "seems about as common as underline" is the proverbial
> famous last words; we don't really need to have even a slightest risk
> here, because "we have the technology" to support both cases.
>
> So please let's fix the defface so that it uses strike-through when
> supported, otherwise uses underline, and let's augment the change in
> make-separator-line so that it also supports terminals without support
> for strike-through but which support underline.  Okay?

Yes, sure, let's support both.  I think like this?

diff --git a/lisp/simple.el b/lisp/simple.el
index 52cdfb1b946..34e49112998 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -748,8 +748,10 @@ separator-line
      :height 0.1 :background "#505050")
     (((type graphic) (background light))
      :height 0.1 :background "#a0a0a0")
+    (((supports :strike-through t))
+     :foreground "ForestGreen" :strike-through t)
     (t
-     :foreground "ForestGreen" :strike-through t))
+     :foreground "ForestGreen" :underline t))
   "Face for separator lines."
   :version "29.1"
   :group 'text)
@@ -760,12 +762,14 @@ make-separator-line
 
 If LENGTH is nil, use the window width."
   (if (or (display-graphic-p)
-          (display-supports-face-attributes-p '(:strike-through t)))
+          (display-supports-face-attributes-p '(:strike-through t))
+          (display-supports-face-attributes-p '(:underline t)))
       (if length
           (concat (propertize (make-string length ?\s) 'face 'separator-line)
                   "\n")
         (propertize "\n" 'face '(:inherit separator-line :extend t)))
-    ;; In terminals that don't support strike-through, use a line of dashes.
+    ;; In terminals that don't support underline or strike-through, use
+    ;; a line of dashes.
     (concat (propertize (make-string (or length (1- (window-width))) ?-)
                         'face 'separator-line)
             "\n")))
-- 
Sean Whitton
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.