Explorar o código

org.el: assume `display-warning' is defined

* lisp/org.el (org-display-warning): Assume `display-warning' is
defined.

It is present in emacs since at least 2002
Aaron Ecay %!s(int64=8) %!d(string=hai) anos
pai
achega
7772ba6e69
Modificáronse 1 ficheiros con 2 adicións e 11 borrados
  1. 2 11
      lisp/org.el

+ 2 - 11
lisp/org.el

@@ -21958,18 +21958,9 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
       (get-text-property (or (next-single-property-change 0 prop s) 0)
 			 prop s)))
 
-(defun org-display-warning (message) ;; Copied from Emacs-Muse
+(defun org-display-warning (message)
   "Display the given MESSAGE as a warning."
-  (if (fboundp 'display-warning)
-      (display-warning 'org message :warning)
-    (let ((buf (get-buffer-create "*Org warnings*")))
-      (with-current-buffer buf
-        (goto-char (point-max))
-        (insert "Warning (Org): " message)
-        (unless (bolp)
-          (newline)))
-      (display-buffer buf)
-      (sit-for 0))))
+  (display-warning 'org message :warning))
 
 (defun org-eval (form)
   "Eval FORM and return result."