forked from mirrors/org-mode
Merge org-with-buffer-modified-unmodified' into
org-unmodified'
* org.el (org-entry-blocked-p): Use `org-unmodified' instead of `org-with-buffer-modified-unmodified'. (org-agenda-prepare-buffers): Fix indentation. * org-macs.el (org-unmodified): Rename from `org-with-buffer-modified-unmodified'. (org-with-buffer-modified-unmodified): Delete.
This commit is contained in:
parent
ef1bb160c6
commit
82899fa841
|
@ -87,16 +87,6 @@
|
|||
Otherwise return nil."
|
||||
(and v (not (equal v "nil")) v))
|
||||
|
||||
(defmacro org-unmodified (&rest body)
|
||||
"Execute body without changing `buffer-modified-p'.
|
||||
Also, do not record undo information."
|
||||
`(set-buffer-modified-p
|
||||
(prog1 (buffer-modified-p)
|
||||
(let ((buffer-undo-list t)
|
||||
(inhibit-modification-hooks t))
|
||||
,@body))))
|
||||
(def-edebug-spec org-unmodified (body))
|
||||
|
||||
(defun org-substitute-posix-classes (re)
|
||||
"Substitute posix classes in regular expression RE."
|
||||
(let ((ss re))
|
||||
|
@ -127,13 +117,16 @@ Also, do not record undo information."
|
|||
(def-edebug-spec org-preserve-lc (body))
|
||||
|
||||
;; Copied from bookmark.el
|
||||
(defmacro org-with-buffer-modified-unmodified (&rest body)
|
||||
(defmacro org-unmodified (&rest body)
|
||||
"Run BODY while preserving the buffer's `buffer-modified-p' state."
|
||||
(org-with-gensyms (was-modified)
|
||||
`(let ((,was-modified (buffer-modified-p)))
|
||||
(unwind-protect
|
||||
(progn ,@body)
|
||||
(let ((buffer-undo-list t)
|
||||
(inhibit-modification-hooks t))
|
||||
,@body)
|
||||
(set-buffer-modified-p ,was-modified)))))
|
||||
(def-edebug-spec org-unmodified (body))
|
||||
|
||||
(defmacro org-without-partial-completion (&rest body)
|
||||
`(if (and (boundp 'partial-completion-mode)
|
||||
|
|
|
@ -12157,7 +12157,7 @@ changes because there are unchecked boxes in this entry."
|
|||
|
||||
(defun org-entry-blocked-p ()
|
||||
"Is the current entry blocked?"
|
||||
(org-with-buffer-modified-unmodified
|
||||
(org-unmodified
|
||||
(if (org-entry-get nil "NOBLOCKING")
|
||||
nil ;; Never block this entry
|
||||
(not
|
||||
|
|
Loading…
Reference in a new issue