help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function for enabling or disabling emacs bars


From: Emanuel Berg
Subject: Re: Function for enabling or disabling emacs bars
Date: Mon, 14 Mar 2022 18:55:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

angelomolina--- via Users list for the GNU Emacs text editor wrote:

>> (defun emacsbars (&optional num)
>>  "Enables or disables Emacs Bars"
>>  (interactive "p")
>>  (menu-bar-mode num)
>>  (tool-bar-mode num)
>>  (scroll-bar-mode num))
>>  
>> #+end_src
>>
>> Try with:
>>
>> M-x emacsbars RET --> show bars
>>
>> C-u  -1  M-x emacsbars RET --> hide bars
>>
>
> Could I also call it using (emacsbars 1) and
> (emacsbars -1)?

Try it and find out!

But the answer is yes ...

Note that calling it without and argument from Lisp implies
nil which strangely enough implies enable!

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]