Browse Source

New alias `org-condition-case-unless-debug'.

* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.

* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
Bastien Guerry 12 years ago
parent
commit
1fe42fd0bc
2 changed files with 8 additions and 2 deletions
  1. 7 1
      lisp/org-compat.el
  2. 1 1
      lisp/org-odt.el

+ 7 - 1
lisp/org-compat.el

@@ -428,7 +428,7 @@ With two arguments, return floor and remainder of their quotient."
   (let ((q (floor x y)))
     (list q (- x (if y (* y q) q)))))
 
-;; `pop-to-buffer-same-window' has been introduced with Emacs 24.1.
+;; `pop-to-buffer-same-window' has been introduced in Emacs 24.1.
 (defun org-pop-to-buffer-same-window
   (&optional buffer-or-name norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME in the selected window."
@@ -437,6 +437,12 @@ With two arguments, return floor and remainder of their quotient."
        'pop-to-buffer-same-window buffer-or-name norecord)
     (funcall 'switch-to-buffer buffer-or-name norecord)))
 
+;; `condition-case-unless-debug' has been introduced in Emacs 24.1
+(defalias 'org-condition-case-unless-debug
+  (if (fboundp 'condition-case-unless-debug)
+      'condition-case-unless-debug
+    'condition-case-no-debug))
+
 (provide 'org-compat)
 
 ;;; org-compat.el ends here

+ 1 - 1
lisp/org-odt.el

@@ -445,7 +445,7 @@ variable, the list of valid values are populated based on
 		     xml-files))
 	     ;; delete temporary directory.
 	     (delete-directory org-odt-zip-dir t)))))
-     (condition-case-no-debug err
+     (org-condition-case-unless-debug err
 	 (prog1 (progn ,@body)
 	   (funcall --cleanup-xml-buffers))
        ((quit error)