Browse Source

lisp/org.el: Do not skip loading org-loaddefs when using `eval-buffer'

* lisp/org.e: Do not skip loading "org-loaddefs.el" when Org mode is
loaded through M-x eval-buffer.

Fixes https://orgmode.org/list/874jwyalo1.fsf@localhost
Ihor Radchenko 2 years ago
parent
commit
3b0c4ad207
1 changed files with 9 additions and 10 deletions
  1. 9 10
      lisp/org.el

+ 9 - 10
lisp/org.el

@@ -82,16 +82,15 @@
 (require 'find-func)
 (require 'format-spec)
 
-(or (eq this-command 'eval-buffer)
-    (condition-case nil
-	(load (concat (file-name-directory load-file-name)
-		      "org-loaddefs.el")
-	      nil t t t)
-      (error
-       (message "WARNING: No org-loaddefs.el file could be found from where org.el is loaded.")
-       (sit-for 3)
-       (message "You need to run \"make\" or \"make autoloads\" from Org lisp directory")
-       (sit-for 3))))
+(condition-case nil
+    (load (concat (file-name-directory load-file-name)
+		  "org-loaddefs.el")
+	  nil t t t)
+  (error
+   (message "WARNING: No org-loaddefs.el file could be found from where org.el is loaded.")
+   (sit-for 3)
+   (message "You need to run \"make\" or \"make autoloads\" from Org lisp directory")
+   (sit-for 3)))
 
 (eval-and-compile (require 'org-macs))
 (require 'org-compat)