[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112113: * lisp/nxml/nxml-util.el (nx
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112113: * lisp/nxml/nxml-util.el (nxml-with-unmodifying-text-property-changes): |
Date: |
Sat, 23 Mar 2013 10:21:25 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112113
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sat 2013-03-23 10:21:25 +0800
message:
* lisp/nxml/nxml-util.el (nxml-with-unmodifying-text-property-changes):
Remove.
* lisp/nxml/rng-valid.el (rng-validate-mode)
(rng-after-change-function, rng-do-some-validation):
* lisp/nxml/rng-maint.el (rng-validate-buffer):
* lisp/nxml/nxml-rap.el (nxml-tokenize-forward, nxml-ensure-scan-up-to-date):
* lisp/nxml/nxml-outln.el (nxml-show-all, nxml-set-outline-state):
* lisp/nxml/nxml-mode.el (nxml-mode, nxml-degrade, nxml-after-change)
(nxml-extend-after-change-region): Use with-silent-modifications.
modified:
lisp/ChangeLog
lisp/nxml/nxml-mode.el
lisp/nxml/nxml-outln.el
lisp/nxml/nxml-rap.el
lisp/nxml/nxml-util.el
lisp/nxml/rng-maint.el
lisp/nxml/rng-valid.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-03-23 01:38:56 +0000
+++ b/lisp/ChangeLog 2013-03-23 02:21:25 +0000
@@ -1,5 +1,16 @@
2013-03-23 Leo Liu <address@hidden>
+ * nxml/nxml-util.el (nxml-with-unmodifying-text-property-changes):
+ Remove.
+
+ * nxml/rng-valid.el (rng-validate-mode)
+ (rng-after-change-function, rng-do-some-validation):
+ * nxml/rng-maint.el (rng-validate-buffer):
+ * nxml/nxml-rap.el (nxml-tokenize-forward, nxml-ensure-scan-up-to-date):
+ * nxml/nxml-outln.el (nxml-show-all, nxml-set-outline-state):
+ * nxml/nxml-mode.el (nxml-mode, nxml-degrade, nxml-after-change)
+ (nxml-extend-after-change-region): Use with-silent-modifications.
+
* nxml/rng-nxml.el (rng-set-state-after): Do not let-bind
timer-idle-list.
=== modified file 'lisp/nxml/nxml-mode.el'
--- a/lisp/nxml/nxml-mode.el 2013-02-12 17:36:54 +0000
+++ b/lisp/nxml/nxml-mode.el 2013-03-23 02:21:25 +0000
@@ -540,7 +540,7 @@
(widen)
(nxml-clear-dependent-regions (point-min) (point-max))
(setq nxml-scan-end (copy-marker (point-min) nil))
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-clear-inside (point-min) (point-max))
(nxml-with-invisible-motion
(nxml-scan-prolog)))))
@@ -601,7 +601,7 @@
(save-excursion
(save-restriction
(widen)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-clear-inside (point-min) (point-max))))))
;;; Change management
@@ -625,7 +625,7 @@
(widen)
(save-match-data
(nxml-with-invisible-motion
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-after-change1
start end pre-change-length)))))))))
@@ -910,7 +910,7 @@
(widen)
(save-match-data
(nxml-with-invisible-motion
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-extend-after-change-region1
start end pre-change-length)))))))))
(if (consp region) region))))
=== modified file 'lisp/nxml/nxml-outln.el'
--- a/lisp/nxml/nxml-outln.el 2013-01-01 09:11:05 +0000
+++ b/lisp/nxml/nxml-outln.el 2013-03-23 02:21:25 +0000
@@ -149,7 +149,7 @@
(defun nxml-show-all ()
"Show all elements in the buffer normally."
(interactive)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(remove-text-properties (point-min)
(point-max)
'(nxml-outline-state nil)))
@@ -370,7 +370,7 @@
(get-text-property pos 'nxml-outline-state))
(defun nxml-set-outline-state (pos state)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(if state
(put-text-property pos (1+ pos) 'nxml-outline-state state)
(remove-text-properties pos (1+ pos) '(nxml-outline-state nil)))))
=== modified file 'lisp/nxml/nxml-rap.el'
--- a/lisp/nxml/nxml-rap.el 2013-01-01 09:11:05 +0000
+++ b/lisp/nxml/nxml-rap.el 2013-03-23 02:21:25 +0000
@@ -293,7 +293,7 @@
(cond ((memq xmltok-type '(comment
cdata-section
processing-instruction))
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-set-inside (1+ xmltok-start) (point) xmltok-type)))
(xmltok-dependent-regions
(nxml-mark-parse-dependent-regions)))
@@ -338,7 +338,7 @@
'(comment
processing-instruction
cdata-section))
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(nxml-set-inside (1+ xmltok-start)
(point)
xmltok-type)))
=== modified file 'lisp/nxml/nxml-util.el'
--- a/lisp/nxml/nxml-util.el 2013-01-01 09:11:05 +0000
+++ b/lisp/nxml/nxml-util.el 2013-03-23 02:21:25 +0000
@@ -78,27 +78,6 @@
(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))
=== modified file 'lisp/nxml/rng-maint.el'
--- a/lisp/nxml/rng-maint.el 2013-01-01 09:11:05 +0000
+++ b/lisp/nxml/rng-maint.el 2013-03-23 02:21:25 +0000
@@ -259,7 +259,7 @@
(defun rng-validate-buffer ()
(save-restriction
(widen)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(rng-clear-cached-state (point-min) (point-max)))
;; 1+ to clear empty overlays at (point-max)
(rng-clear-overlays (point-min) (1+ (point-max))))
=== modified file 'lisp/nxml/rng-valid.el'
--- a/lisp/nxml/rng-valid.el 2013-03-23 01:38:56 +0000
+++ b/lisp/nxml/rng-valid.el 2013-03-23 02:21:25 +0000
@@ -244,7 +244,7 @@
(> (prefix-numeric-value arg) 0)))
(save-restriction
(widen)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(rng-clear-cached-state (point-min) (point-max)))
;; 1+ to clear empty overlays at (point-max)
(rng-clear-overlays (point-min) (1+ (point-max)))
@@ -305,7 +305,7 @@
(defun rng-after-change-function (start end pre-change-len)
(setq rng-message-overlay-inhibit-point nil)
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(rng-clear-cached-state start end))
;; rng-validate-up-to-date-end holds the position before the change
;; Adjust it to reflect the change.
@@ -469,7 +469,7 @@
(condition-case-unless-debug err
(and (rng-validate-prepare)
(let ((rng-dt-namespace-context-getter '(nxml-ns-get-context)))
- (nxml-with-unmodifying-text-property-changes
+ (with-silent-modifications
(rng-do-some-validation-1 continue-p-function))))
;; errors signaled from a function run by an idle timer
;; are ignored; if we don't catch them, validation
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112113: * lisp/nxml/nxml-util.el (nxml-with-unmodifying-text-property-changes):,
Leo Liu <=