summaryrefslogtreecommitdiff
path: root/lisp/htmlfontify.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-12-09 05:56:53 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-12-09 05:56:53 +0000
commit2ea1c4aa5eb1b462a8c653d10d3205b8b428a95e (patch)
tree6799a410e61c0cc615811b9e9371d2324208c581 /lisp/htmlfontify.el
parent9e250ccc1c513f835582fd0f6432c71e630e5b5b (diff)
downloademacs-2ea1c4aa5eb1b462a8c653d10d3205b8b428a95e.tar.gz
Drop some properties to avoid surprises.
* htmlfontify.el (hfy-ignored-properties): New defcustom. (hfy-fontify-buffer): Use it.
Diffstat (limited to 'lisp/htmlfontify.el')
-rw-r--r--lisp/htmlfontify.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index af82a140c94..d5fba48c45a 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -377,6 +377,18 @@ commands in `hfy-etags-cmd-alist'."
:tag "shell-file-name"
:type '(file))
+(defcustom hfy-ignored-properties '(read-only
+ intangible
+ modification-hooks
+ insert-in-front-hooks
+ insert-behind-hooks
+ point-entered
+ point-left)
+ "Properties to omit when copying a fontified buffer for html transformation."
+ :group 'htmlfontify
+ :tag "ignored-properties"
+ :type '(repeat symbol))
+
(defun hfy-which-etags ()
"Return a string indicating which flavour of etags we are using."
(let ((v (shell-command-to-string (concat hfy-etags-bin " --version"))))
@@ -1622,6 +1634,8 @@ FILE, if set, is the file name."
(delete-overlay rovl))
(copy-to-buffer html-buffer (point-min) (point-max))
(set-buffer html-buffer)
+ ;; rip out props that could interfere with our htmlisation of the buffer:
+ (remove-text-properties (point-min) (point-max) hfy-ignored-properties)
;; Apply overlay invisible spec
(setq orig-ovls
(sort orig-ovls