[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog htmlfontify.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog htmlfontify.el |
Date: |
Thu, 26 Nov 2009 15:22:31 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/11/26 15:22:30
Modified files:
lisp : ChangeLog htmlfontify.el
Log message:
Various minor fixes.
* htmlfontify.el (hfy-default-header): Add toggle_invis since
Javascript belongs in the header, not the body.
(hfy-javascript): Remove.
(hfy-fontify-buffer): Don't insert it any more.
(hfy-face-at): Handle (face0 face1 face2) style face properties.
Fix bug in invis handling when there were no invis props in a chunk.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16748&r2=1.16749
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/htmlfontify.el?cvsroot=emacs&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16748
retrieving revision 1.16749
diff -u -b -r1.16748 -r1.16749
--- ChangeLog 26 Nov 2009 14:50:28 -0000 1.16748
+++ ChangeLog 26 Nov 2009 15:22:27 -0000 1.16749
@@ -1,3 +1,13 @@
+2009-11-26 Vivek Dasmohapatra <address@hidden>
+
+ Various minor fixes.
+ * htmlfontify.el (hfy-default-header): Add toggle_invis since
+ Javascript belongs in the header, not the body.
+ (hfy-javascript): Remove.
+ (hfy-fontify-buffer): Don't insert it any more.
+ (hfy-face-at): Handle (face0 face1 face2) style face properties.
+ Fix bug in invis handling when there were no invis props in a chunk.
+
2009-11-26 Stefan Monnier <address@hidden>
* vc-bzr.el (vc-bzr-annotate-command): Make operation asynchronous.
Index: htmlfontify.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/htmlfontify.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- htmlfontify.el 19 Nov 2009 20:47:43 -0000 1.2
+++ htmlfontify.el 26 Nov 2009 15:22:30 -0000 1.3
@@ -693,6 +693,28 @@
}
}
}
+
+ function toggle_invis( name )
+ {
+ var filter =
+ { acceptNode:
+ function( node )
+ { var classname = node.id;
+ if( classname )
+ { var classbase = classname.substr( 0, name.length );
+ if( classbase == name ) { return NodeFilter.FILTER_ACCEPT; } }
+ return NodeFilter.FILTER_SKIP; } };
+ var walker = document.createTreeWalker( document.body ,
+ NodeFilter.SHOW_ELEMENT ,
+ filter ,
+ false );
+ while( walker.nextNode() )
+ {
+ var e = walker.currentNode;
+ if( e.style.display == \"none\" ) { e.style.display = \"inline\"; }
+ else { e.style.display = \"none\"; }
+ }
+ }
--> </script>
</head>
<body onload=\"stripe('index'); return true;\">\n"
@@ -1216,7 +1238,8 @@
(if (listp f) ;; for things like (variable-pitch (:foreground "red"))
(setq extra-props (cons f extra-props))
(setq extra-props (cons :inherit (cons f extra-props)))))
- (setq face-name nil))
+ (setq base-face (car face-name)
+ face-name nil))
;; text-properties-at => (face (:foreground "red" ...))
;; or => (face (compilation-info underline)) list of
faces
;; overlay-properties
@@ -1230,7 +1253,7 @@
(progn
;;(message "· %d: %s; %S; %s"
;; p face-name extra-props text-props)
- face-name) ;; no overlays or extra properties
+ (or face-name base-face)) ;; no overlays or extra properties
;; collect any face data and any overlay data for processing:
(when text-props
(setq overlay-data (cons text-props overlay-data)))
@@ -1243,7 +1266,7 @@
(lambda (P)
(let ((iprops (cadr (memq 'invisible P))))
;;(message "(hfy-prop-invisible-p %S)" iprops)
- (when (hfy-prop-invisible-p iprops)
+ (when (and iprops (hfy-prop-invisible-p iprops))
(setq extra-props
(cons :invisible (cons t extra-props))) ))
(let ((fprops (cadr (or (memq 'face P)
@@ -1495,33 +1518,6 @@
" --></style>\n"))
(funcall hfy-page-header file stylesheet)))
-(defconst hfy-javascript "
- <script type=\"text/javascript\">
- // <![CDATA[
-function toggle_invis( name )
-{
- var filter =
- { acceptNode:
- function( node )
- { var classname = node.id;
- if( classname )
- { var classbase = classname.substr( 0, name.length );
- if( classbase == name ) { return NodeFilter.FILTER_ACCEPT; } }
- return NodeFilter.FILTER_SKIP; } };
- var walker = document.createTreeWalker( document.body ,
- NodeFilter.SHOW_ELEMENT ,
- filter ,
- false );
- while( walker.nextNode() )
- {
- var e = walker.currentNode;
- if( e.style.display == \"none\" ) { e.style.display = \"inline\"; }
- else { e.style.display = \"none\"; }
- }
-}
- // ]]>
- </script>\n")
-
;; tag all the dangerous characters we want to escape
;; (ie any "<> chars we _didn't_ put there explicitly for css markup)
(defun hfy-html-enkludge-buffer ()
@@ -1749,7 +1745,6 @@
(goto-char (point-min))
;;(message "inserting stylesheet")
(insert (hfy-sprintf-stylesheet css-sheet file))
- (insert hfy-javascript)
(if (hfy-opt 'div-wrapper) (insert "<div class=\"default\">"))
(insert "\n<pre>")
(goto-char (point-max))
- [Emacs-diffs] emacs/lisp ChangeLog htmlfontify.el,
Stefan Monnier <=