Hi all
There is a bug in htmlize which prevents #'htmlize-region-for-paste from
working properly. Markers are added to a plist using, e.g.
(plist-put places 'head-end (point-marker))
Our documentation clearly states
,----
| use `(setq x (plist-put x property value))' to be sure to use the new value
`----
However, it also says:
,----
| PLIST is modified by side effect.
`----
which doesn't seem to happen. Patch attached
Index: htmlize.el
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/text-modes/htmlize.el,v
retrieving revision 1.15
diff -u -r1.15 htmlize.el
--- htmlize.el 6 Jan 2009 08:30:26 -0000 1.15
+++ htmlize.el 15 Oct 2010 10:25:42 -0000
@@ -1453,7 +1453,7 @@
(format "<!-- Created by htmlize-%s in %s mode. -->\n"
htmlize-version htmlize-output-type)
"<html>\n ")
- (plist-put places 'head-start (point-marker))
+ (setq places (plist-put places 'head-start (point-marker)))
(insert "<head>\n"
" <title>" (htmlize-protect-string title)
"</title>\n"
(if htmlize-html-charset
@@ -1464,12 +1464,12 @@
htmlize-head-tags)
(htmlize-method insert-head buffer-faces face-map)
(insert " </head>")
- (plist-put places 'head-end (point-marker))
+ (setq places (plist-put places 'head-end (point-marker)))
(insert "\n ")
- (plist-put places 'body-start (point-marker))
+ (setq places (plist-put places 'body-start (point-marker)))
(insert (htmlize-method body-tag face-map)
"\n ")
- (plist-put places 'content-start (point-marker))
+ (setq places (plist-put places 'content-start (point-marker)))
(insert "<pre>\n"))
(let ((insert-text-method
;; Get the inserter method, so we can funcall it inside
@@ -1519,9 +1519,9 @@
;; Insert the epilog and post-process the buffer.
(with-current-buffer htmlbuf
(insert "</pre>")
- (plist-put places 'content-end (point-marker))
+ (setq places (plist-put places 'content-end (point-marker)))
(insert "\n </body>")
- (plist-put places 'body-end (point-marker))
+ (setq places (plist-put places 'body-end (point-marker)))
(insert "\n</html>\n")
(when htmlize-generate-hyperlinks
(htmlize-make-hyperlinks))
--
note that "property" can also be used as syntactic sugar to reference
a property, breaking the clean design of verilog; [...]
(seen on
http://www.veripool.com/verilog-mode_news.html)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta