Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions htmlize.el
Original file line number Diff line number Diff line change
Expand Up @@ -716,14 +716,6 @@ list."
(substring text (length htmlize-ellipsis))
text))

(defconst htmlize-tab-spaces
;; A table of strings with spaces. (aref htmlize-tab-spaces 5) is
;; like (make-string 5 ?\ ), except it doesn't cons.
(let ((v (make-vector 32 nil)))
(dotimes (i (length v))
(setf (aref v i) (make-string i ?\ )))
v))

(defun htmlize-untabify-string (text start-column)
"Untabify TEXT, assuming it starts at START-COLUMN."
(let ((column start-column)
Expand All @@ -745,7 +737,7 @@ list."
;; Expand the tab, carefully recreating the `display'
;; property if one was on the TAB.
(let ((display (get-text-property match-pos 'display text))
(expanded-tab (aref htmlize-tab-spaces tab-size)))
(expanded-tab (make-string tab-size ?\s)))
(when display
(put-text-property 0 tab-size 'display display expanded-tab))
(push expanded-tab chunks))
Expand Down