Questions tagged [boolean]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
2answers
75 views

How do I splat the arguments to the `or` function?

I would like to evaluate a list of booleans like (nil nil t) into a single boolean, such that if any element is true, then the expression evaluates to true. I first looked at the (or) function in ...
0
votes
1answer
93 views

why does this function return integers instead of `t` or `nil`

Why does this function print non-zero integers on non-empty lines? ;; taken from https://emacs.stackexchange.com/a/16826/10896 (defun current-line-empty-p () (interactive) (setq answer (string-...
7
votes
3answers
2k views

What Emacs Lisp boolean/logical convenience functions exist?

What boolean/logical convenience functions / macros are available for Emacs Lisp in either the core set of functions or external packages? I'm interested in just about anything other than the built-in ...
8
votes
2answers
558 views

Understanding elisp idiom(boolean values vs. quoted arguments)?

I have some basic questions about elisp. I often see something like (search-forward "something" nil 'noerror) And sometimes I see something like (search-forward "something" nil :noerror) What is ...
9
votes
3answers
2k views

Quick way to toggle a variable

It would be nice to have a quick way to toggle a variable. Here's something that I have in mind. Call a "toggle var" function. The completing-read should list only variables that have single values (...