Source

psgml / psgml-debug.el

Diff from to

psgml-debug.el

 	  (progn (set-buffer standard-output)
 		 (erase-buffer))
 	(set-buffer cb))
-    
+
       (sgml-dump-rec (sgml-pstate-top-tree sgml-buffer-parse-state))
 
       ))
    (t
     (princ (format "%sand-state\n" (make-string indent ? )))
     (sgml-dp-state (sgml-and-state-substate state) (+ 2 indent))
-    (princ (format "%s--next\n" (make-string indent ? )))    
+    (princ (format "%s--next\n" (make-string indent ? )))
     (sgml-dp-state (sgml-and-state-next state)     (+ 2 indent))
-    (princ (format "%s--dfas\n" (make-string indent ? )))        
+    (princ (format "%s--dfas\n" (make-string indent ? )))
     (loop for m in (sgml-and-state-dfas state)
 	  do (sgml-dp-model m (+ indent 2))
 	  (princ (format "%s--\n" (make-string indent ? )))))))
 	  sgml-copy-moves
 	  ;; is ps*
 	  sgml-do-parameter-entity-ref
-	  ;; 
+	  ;;
 	  sgml-make-primitive-content-token
 	  sgml-push-to-entity
 	  sgml-lookup-entity
 	    (t
 	     (princ (if (sgml-eltype-mixed et)
                         "mixed\n"
-                      "element\n"))	     
+                      "element\n"))
              (sgml-print-position-in-model el et (point) sgml-current-state)
              (princ "\n\n")
 	     (sgml-princ-names
                   (setq defl (format "'%s'"
                                      (sgml-default-value-attval defl)))))
 
-           (indent-to 48 1)          
+           (indent-to 48 1)
            (princ defl)
            (terpri)))
       (set-buffer ob))))
   t)
 
 ;;;; Possible modification to allow setting face on content:
+
 (defun sgml-set-face-for (start end type)
   (let ((face (cdr (assq type sgml-markup-faces))))
     ;;++
-    (if (and (null type) sgml-current-tree) 
+    (if (and (null type) sgml-current-tree)
         (setq face (sgml-element-appdata sgml-current-tree 'face)))
     ;;--
     (cond
      (sgml-use-text-properties
       (let ((inhibit-read-only t)
-	    (after-change-function nil)	; obsolete variable
-	    (before-change-function nil) ; obsolete variable
-	    (after-change-functions nil)
-	    (before-change-functions nil))
+            (after-change-functions nil)
+            (before-change-functions nil)
+            (buffer-undo-list t)
+            (deactivate-mark nil))
 	(put-text-property start end 'face face)
         (when (< start end)
           (put-text-property (1- end) end 'rear-nonsticky '(face)))))