diff options
| author | Stefan Monnier | 2009-12-09 05:56:53 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-12-09 05:56:53 +0000 |
| commit | 2ea1c4aa5eb1b462a8c653d10d3205b8b428a95e (patch) | |
| tree | 6799a410e61c0cc615811b9e9371d2324208c581 | |
| parent | 9e250ccc1c513f835582fd0f6432c71e630e5b5b (diff) | |
| download | emacs-2ea1c4aa5eb1b462a8c653d10d3205b8b428a95e.tar.gz emacs-2ea1c4aa5eb1b462a8c653d10d3205b8b428a95e.zip | |
Drop some properties to avoid surprises.
* htmlfontify.el (hfy-ignored-properties): New defcustom.
(hfy-fontify-buffer): Use it.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/htmlfontify.el | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bbb1b5d8103..6aefbd112df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-12-09 Vivek Dasmohapatra <vivek@etla.org> | ||
| 2 | |||
| 3 | Drop some properties to avoid surprises. | ||
| 4 | * htmlfontify.el (hfy-ignored-properties): New defcustom. | ||
| 5 | (hfy-fontify-buffer): Use it. | ||
| 6 | |||
| 1 | 2009-12-09 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2009-12-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | Minor cleanup. | 9 | Minor cleanup. |
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'." | |||
| 377 | :tag "shell-file-name" | 377 | :tag "shell-file-name" |
| 378 | :type '(file)) | 378 | :type '(file)) |
| 379 | 379 | ||
| 380 | (defcustom hfy-ignored-properties '(read-only | ||
| 381 | intangible | ||
| 382 | modification-hooks | ||
| 383 | insert-in-front-hooks | ||
| 384 | insert-behind-hooks | ||
| 385 | point-entered | ||
| 386 | point-left) | ||
| 387 | "Properties to omit when copying a fontified buffer for html transformation." | ||
| 388 | :group 'htmlfontify | ||
| 389 | :tag "ignored-properties" | ||
| 390 | :type '(repeat symbol)) | ||
| 391 | |||
| 380 | (defun hfy-which-etags () | 392 | (defun hfy-which-etags () |
| 381 | "Return a string indicating which flavour of etags we are using." | 393 | "Return a string indicating which flavour of etags we are using." |
| 382 | (let ((v (shell-command-to-string (concat hfy-etags-bin " --version")))) | 394 | (let ((v (shell-command-to-string (concat hfy-etags-bin " --version")))) |
| @@ -1622,6 +1634,8 @@ FILE, if set, is the file name." | |||
| 1622 | (delete-overlay rovl)) | 1634 | (delete-overlay rovl)) |
| 1623 | (copy-to-buffer html-buffer (point-min) (point-max)) | 1635 | (copy-to-buffer html-buffer (point-min) (point-max)) |
| 1624 | (set-buffer html-buffer) | 1636 | (set-buffer html-buffer) |
| 1637 | ;; rip out props that could interfere with our htmlisation of the buffer: | ||
| 1638 | (remove-text-properties (point-min) (point-max) hfy-ignored-properties) | ||
| 1625 | ;; Apply overlay invisible spec | 1639 | ;; Apply overlay invisible spec |
| 1626 | (setq orig-ovls | 1640 | (setq orig-ovls |
| 1627 | (sort orig-ovls | 1641 | (sort orig-ovls |