[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize a8b73f1 122/134: New option htmlize-untabify. (#21
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize a8b73f1 122/134: New option htmlize-untabify. (#21) |
Date: |
Sat, 7 Aug 2021 09:17:20 -0400 (EDT) |
branch: elpa/htmlize
commit a8b73f1393b2d73541ba4a8fd716c0d07ce50276
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
New option htmlize-untabify. (#21)
---
htmlize.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index 3584b83..4a499ec 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -302,6 +302,11 @@ example:
This variable can be also be `let' bound when running `htmlize-buffer'.")
+(defcustom htmlize-untabify t
+ "Non-nil means untabify buffer contents during htmlization."
+ :type 'boolean
+ :group 'htmlize)
+
(defcustom htmlize-html-major-mode nil
"The mode the newly created HTML buffer will be put in.
Set this to nil if you prefer the default (fundamental) mode."
@@ -710,7 +715,7 @@ list."
(setf (aref v i) (make-string i ?\ )))
v))
-(defun htmlize-untabify (text start-column)
+(defun htmlize-untabify-string (text start-column)
"Untabify TEXT, assuming it starts at START-COLUMN."
(let ((column start-column)
(last-match 0)
@@ -762,7 +767,8 @@ list."
(setq trailing-ellipsis
(get-text-property (1- (length text))
'htmlize-ellipsis text)))
- (setq text (htmlize-untabify text (current-column)))
+ (when htmlize-untabify
+ (setq text (htmlize-untabify-string text (current-column))))
(setq text (htmlize-string-to-html text))
(values text trailing-ellipsis)))
- [nongnu] elpa/htmlize a4569e3 092/134: Correctly handle :inherit specifying a list of faces., (continued)
- [nongnu] elpa/htmlize a4569e3 092/134: Correctly handle :inherit specifying a list of faces., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 31bc1a8 094/134: Remove stray debugging print., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 8c09264 097/134: Bump version and copyright., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a95e591 107/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 2c41d79 101/134: Update mail address., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 9d4ad62 102/134: Set type and group attribute for custom variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 88e2cb6 109/134: Update copyright info., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 5ea2cc3 113/134: Let `overlays-at' sort the overlays. (#9), ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 1bc2f1b 118/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 726c77b 120/134: Correctly sort overlays in Emacs 24., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a8b73f1 122/134: New option htmlize-untabify. (#21),
ELPA Syncer <=
- [nongnu] elpa/htmlize 9145b68 128/134: Simplify ensuring of font-lock., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 86f22f2 132/134: Add Homepage to the package header, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 999eef2 032/134: Support searching for any property change., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 7f94aa2 039/134: Conditionalize on color-instance-rgb-components., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 34845c5 042/134: Update comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize c847998 057/134: The future has come: switch to lexical scope., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 845329e 060/134: Don't attempt to use lexical binding in emacsen that don't support it., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a6f9f07 066/134: Decide at each macroexpansion whether to use `lexical-let' or `let'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 58775c8 064/134: Improve introductory text., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize db4b76e 076/134: New file: NEWS, ELPA Syncer, 2021/08/07