LoginSignup
0
0

More than 3 years have passed since last update.

Emacsの--loadと--scriptで指定したファイルはどちらが先に実行されるか?

Last updated at Posted at 2020-03-21

Emacsの--loadと--scriptで指定したファイルはどちらが先に実行されるか?

ちょっとわからなかったのでやってみた。備忘録として残しておく。

$ emacs --version
GNU Emacs 25.1.1
Copyright (C) 2016 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

やったのはこんな感じ。

script.el
(print (format "script: %s" (current-time)))

load.el
(print (format "load: %s" (current-time)))

実行する。

$ emacs -nw -q -l load.el --script script.el

"script: (22780 20842 88910 0)"

"load: (22780 20842 90294 0)"

--script の方が先に読まれていそう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0