rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.52k stars 194 forks source link

Error when running `emacs -q -l nano.el` in Termux. #70

Closed alissa-tung closed 3 years ago

alissa-tung commented 3 years ago

Symbol’s function definition is void: tool-bar-mode

Is this caused by any GUI options? I tried to install Emacs with X, but it seems no longer seen as x11-repo/emacs.

window-system is a variable defined in ‘C source code’.
Its value is nil
It is a terminal-local variable; global value is the same.

  Probably introduced at or before Emacs version 21.1.

Documentation:
Name of window system through which the selected frame is displayed.
alissa-tung commented 3 years ago

If so, is there any chance to improve the error message when use without X, or enable this feature to run it in terminal?

alissa-tung commented 3 years ago

Confirmed. Arch Termux works.

rougier commented 3 years ago

Does it work if you comment out the faulty line?

alissa-tung commented 3 years ago

Does it work if you comment out the faulty line?

Does it work if you comment out the faulty line?

Just had a try. It can boot after commented out that line. And scroll-bar-mode also had the problem but without modify it can still boot unlike tool-bar.

rougier commented 3 years ago

So we can add a specific test before trying to disable the tool-bar. For example

(if (fboundp 'tool-bar-mode) (tool-bar-mode nil))

Coud lyou try this line?

alissa-tung commented 3 years ago

So we can add a specific test before trying to disable the tool-bar. For example

(if (fboundp 'tool-bar-mode) (tool-bar-mode nil))

Coud lyou try this line?

Works. May be same for scroll bar

rougier commented 3 years ago

Can you make a PR?

alissa-tung commented 3 years ago

Can you make a PR?

my pleasure. I noticed that nix has Emacs built without any dependency on X11 libraries. so I gonna test on both environments later.