;;; nxml-util.el --- utility functions for nxml-*.el
-;; Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;;; Code:
(defconst nxml-debug nil
- "enable nxml debugging. effective only at compile time")
-
-(eval-when-compile
- (require 'cl))
+ "Enable nxml debugging. Effective only at compile time.")
(defsubst nxml-debug (format &rest args)
(when nxml-debug
(defun nxml-make-namespace (str)
"Return a symbol for the namespace URI STR.
-STR must be a string. If STR is the empty string, return nil.
+STR must be a string. If STR is the empty string, return nil.
Otherwise, return the symbol whose name is STR prefixed with a colon."
(if (string-equal str "")
nil
(nxml-degrade ,context ,error-symbol))))
`(progn ,@body)))
-(defmacro nxml-with-unmodifying-text-property-changes (&rest body)
- "Evaluate BODY without any text property changes modifying the buffer.
-Any text properties changes happen as usual but the changes are not treated as
-modifications to the buffer."
- (let ((modified (make-symbol "modified")))
- `(let ((,modified (buffer-modified-p))
- (inhibit-read-only t)
- (inhibit-modification-hooks t)
- (buffer-undo-list t)
- (deactivate-mark nil)
- ;; Apparently these avoid file locking problems.
- (buffer-file-name nil)
- (buffer-file-truename nil))
- (unwind-protect
- (progn ,@body)
- (unless ,modified
- (restore-buffer-modified-p nil))))))
-
-(put 'nxml-with-unmodifying-text-property-changes 'lisp-indent-function 0)
-(def-edebug-spec nxml-with-unmodifying-text-property-changes t)
-
(defmacro nxml-with-invisible-motion (&rest body)
"Evaluate body without calling any point motion hooks."
`(let ((inhibit-point-motion-hooks t))
(provide 'nxml-util)
-;; arch-tag: 7d3b3af4-de2b-4410-bf67-94d64824324b
;;; nxml-util.el ends here