Questions tagged [symbols]
79 questions
9
votes
1 answer
Function naming with forward slash?
I see this elisp code (Bernt Hansen):
(defun bh/hide-other ()
(interactive)
(save-excursion
(org-back-to-heading 'invisible-ok)
(hide-other)
(org-cycle)
(org-cycle)
(org-cycle)))
and I wonder if the bh/hide-other name with…

147pm
- 2,959
- 1
- 18
- 42
4
votes
2 answers
(symbol-name sym) vs. (format "%s" sym)
I noticed some code in use-package-core.el where format is used to get a keyword's name as a string,
(format "%s" keyword)
Is there a reason this is preferable to using symbol-name?
(symbol-name keyword)
I would've expected symbol-name to be…

ivan
- 1,948
- 10
- 20
4
votes
1 answer
Why requiring fails with dynamic symbols?
I just encountered this behavior of Emacs.
This works:
(require 'test)
But this doesn't
(require (make-symbol "test"))
Why is that and can I workaround it somehow?

qwe
- 243
- 1
- 8
3
votes
1 answer
symbol-name without adding to obarray
I found out that querying a symbol's name using symbol-name adds the symbol to obarray.
(intern-soft "random-name") ; gives nil
(symbol-name 'random-name) ; adds random-name to obarray, gives "random-name" (string).
(intern-soft "random-name") ;…

nomad
- 257
- 1
- 6
2
votes
2 answers
Each Element of Obarray is A Bucket?
I am reading the GNU Emacs Lisp Reference Manual, 9.3 Creating and Interning Symbols:
Each element of the obarray is a bucket which holds all the symbols with a given hash code; to look for a given name, it is sufficient to look through all the…

shynur
- 5,253
- 1
- 4
- 25
1
vote
1 answer
Display abbreviated form of a function name?
I've seen videos where someone an elisp function call like
(so-and-so/do-stuff)
But were able to shorted the displayed function name to something like
(so/do-stuff)
How do they do that? I'd like to use it in my init.el so I can display…

ivan
- 1,948
- 10
- 20