Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 253

for questions about Emacs Lisp as a Lisp dialect, that is, questions *about the language* itself. DO NOT USE it for questions about customization or how to write an application. Emacs Lisp is the scripting and programming language that the Emacs editor is built on.

3
votes
It looks like the problem is not with the defalias, but rather where and how you're calling λ. funcall takes, as its arguments, a function and that function's arguments, so your funcall example works …
answered Dec 15 '14 by Dan
11
votes
Here's the docstring for cdr: (cdr LIST) Return the cdr of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `cdr-safe'. See Info node `(elisp
answered Jun 22 '15 by Dan
3
votes
You can create a state variable to keep track of which function you called most recently, and condition the call in the third function on its value: (defun fn1 () (message "Function 1")) (defun fn …
answered Apr 28 '15 by Dan
1
vote
If you have a lot of key/value pairs, a hash table is an option to consider (if not so many, an alist is fine). If you like, you can use mini-alists or mini-plists as the hash table's values: (let ( …
answered Oct 5 '15 by Dan
7
votes
From its docstring, I'm guessing that you can't incorporate the countdown message functionality into read-char-exclusive. However, you can wrap it up in your own timer: (let ((choice nil) (cou …
answered Nov 15 '14 by Dan
2
votes
Give completing-read a list of lists, and it will respect the order: (completing-read "test: " '(("a") ("b") ("c"))) (completing-read "test: " '(("c") ("b") ("a"))) The docstring says: (complet …
answered Feb 10 '15 by Dan
3
votes
It did not give you an error message, so you successfully required it. Have a look at the manual on named features and require's docstring; they indicate that, when you (require FEATURE), "normally t …
answered Oct 23 '14 by Dan
13
votes
The default membership test for a hash table is eql. If you'd like to use a string as the key, set it to equal instead: (setf hash (make-hash-table :test #'equal)) (puthash "a" 1 hash) (gethash "a" …
answered Jun 23 '15 by Dan
2
votes
Turns out it's a simple function to write, although it may not be all that efficient: (defun nth-elt (elt list) "Return element number of ELT in LIST." (let ((loc (length (member elt list)))) …
answered Apr 3 '15 by Dan
11
votes
Turns out that the manual implies that you can't actually do reader macros. According to Appendix C Porting Common Lisp: Reader macros. Common Lisp includes a second type of macro that works at …
answered Nov 11 '15 by Dan
3
votes
Got it: helped along by @abo-abo's answer, the following predicate function detects dotted pairs: (defun dotted-p (x) "Returns `t' if X is a dotted-pair." (not (consp (cdr x)))) (dotted-p '(a . …
answered Apr 3 '15 by Dan
19
votes
Use cl-map, instead: (cl-map 'vector #'1+ [1 2 3 4]) A little extra background: cl-map is the Common Lisp map function that generalizes to sequence types: (cl-map 'vector #'1+ '[1 2 3 4]) ;; ==> [ …
answered Nov 1 '14 by Dan
0
votes
Here's a simple function that works with an alist nested inside another alist: (defun assoc2 (outer inner alist) "`assoc', but for an assoc list inside an assoc list." (assoc inner (assoc outer a …
answered Nov 6 '14 by Dan
3
votes
The following command (minimally-tested) will collect all of the words in the buffer and display the unique ones (ignoring case) in a new buffer. (defun show-unique-words (&optional alphabetical) " …
answered Aug 2 '15 by Dan
4
votes
It looks like the answer is no, you cannot. The elisp manual node on Comments states that: In Lisp, a semicolon (;) starts a comment if it is not within a string or character constant. The …
answered Aug 12 '16 by Dan

15 30 50 per page