소스 검색

Fix macro definition of with-silent-modification

* lisp/org-macs.el: Better backup definition for `with-silent-modifications'.
Carsten Dominik 14 년 전
부모
커밋
5d74e1b754
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      lisp/org-macs.el

+ 6 - 5
lisp/org-macs.el

@@ -49,11 +49,12 @@
 	 (with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1
        (interactive-p))))
 
-(if (or (< emacs-major-version 23)
-	(and (<= emacs-major-version 23)
-	     (< emacs-minor-version 2)))
-    (defmacro with-silent-modifications
-      (org-unmodified)))
+(if (and (not (fboundp 'with-silent-modifications))
+	 (or (< emacs-major-version 23)
+	     (and (= emacs-major-version 23)
+		  (< emacs-minor-version 2))))
+    (defmacro with-silent-modifications (&rest body)
+      `(org-unmodified ,@body)))
 
 (defmacro org-bound-and-true-p (var)
   "Return the value of symbol VAR if it is bound, else nil."