[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11408: 24.1.50; [PATCH] Don't inherit faces when untabifying the man
From: |
Wolfgang Jenkner |
Subject: |
bug#11408: 24.1.50; [PATCH] Don't inherit faces when untabifying the man page |
Date: |
Fri, 04 May 2012 19:04:51 +0200 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (berkeley-unix) |
Look a the emacs(1) man page
M-x m a n <return> e m a c s <return>
You may (or may not, depending on how your man program outputs tab
characters) observe that the underlining of some words protrudes to the
following white space. E.g., I see occurrences of "Emacs windows" or
"Emacs. Help" where the (multiple) space characters are underlined.
GNU Emacs 24.1.50.1 (amd64-unknown-freebsd9.0, GTK+ Version 2.24.6)
of 2012-05-02 on iznogoud.viz
2012-05-04 Wolfgang Jenkner <wjenkner@inode.at>
* man.el (Man-unindent): Use text-property-default-nonsticky to
prevent untabify from inheriting `face' text properties.
In particular, underlined white space didn't look so hot.
=== modified file 'lisp/man.el'
--- lisp/man.el 2012-04-28 21:59:08 +0000
+++ lisp/man.el 2012-05-04 16:18:33 +0000
@@ -1475,7 +1475,12 @@
(nindent 0))
(narrow-to-region (car page) (car (cdr page)))
(if Man-uses-untabify-flag
- (untabify (point-min) (point-max)))
+ (let ((text-property-default-nonsticky
+ ;; The space characters `untabify' (or rather `indent-to')
+ ;; inserts inherit sticky text properties, which is
+ ;; unnecessary and looks exceedingly ugly with `underline'.
+ (cons '(face . t) text-property-default-nonsticky)))
+ (untabify (point-min) (point-max))))
(if (catch 'unindent
(goto-char (point-min))
(if (not (re-search-forward Man-first-heading-regexp nil t))
- bug#11408: 24.1.50; [PATCH] Don't inherit faces when untabifying the man page,
Wolfgang Jenkner <=