Questions tagged [elisp-conventions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16
votes
2answers
2k views

Convention about using C-x or C-c as prefix keys

What are the conventions for using C-x, C-c, or M- as prefix keys? For example: is C-x, etc., for saving or visiting buffers? Is C-c, etc., for text editing? Background Maybe this is a silly ...
4
votes
1answer
323 views

Double hyphen in Elisp function names

Why do some people use -- in their function names? Here's an example from elfeed-search.el: (defun elfeed-search--header () "Returns the string to be used as the Elfeed header." (if (eql (car ...
3
votes
2answers
69 views

When writing a new major mode, should it add itself to auto-mode-alist?

I am defining a new major mode, foo-mode, which is closely and only associated with .foo files. Should foo-mode.el fiddle with auto-mode-alist to add this association, or is that the user's ...
2
votes
1answer
65 views

Difference between pcase-let & cl-destructuring-bind?

I noticed both pcase-let and cl-destructuring-bind seem to perform the same operation. Is there any difference or reason to use one instead of the other? eg: (pcase-let ((`(,filename ,buf) (pop ...
1
vote
1answer
30 views

How to automate user-testing with elisp?

Is it possible to automate testing user input? An example of this could be multiple editing operations, undo, saving, reverting the buffer etc. Then checking the buffer contents is what the test ...