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
This commit is contained in:
Ihor Radchenko 2022-09-25 11:18:29 +08:00
parent 764642f55b
commit 3b0c4ad207
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 9 additions and 10 deletions

View File

@ -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)