Questions tagged [functions]

use this tag for Elisp `functions` for their usage, definitions, re-definitions, defining aliases, and other standard features of function execution fundamental to Lisp programming languages. Add additional Elisp tags when the functions are about specific Emacs features.

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

Difference between load-file and load

I went through the documentation of both the function but they don't seem to shed much information. What is the actual difference between them apart from the fact that load is a built-in function in C ...
2
votes
1answer
348 views

Monkey patching a function

Some context: I'm doing some linux kernel development on a Debian VM so naturally I'm using tramp. I want to use semantic-symref, but the trouble is that: Semantic will eventually call cedet-gnu-...
5
votes
2answers
259 views

Define an emacs function to take arguments in the same way as something like M-x goto-line

I want to write an emacs function for debug purposes in c++ code. Basically I'm fed up typing the following: std::cout << "variable is: " << variable << std::endl; Instead I want ...
3
votes
1answer
292 views

function calls from command line, using emacsclient

I used to read my emails from command line with emacs -f gnus. To read my emails using emacsclient, I'm doing emacsclient -c --eval '(gnus)'. Just want to know, is there a simpler alternative to that? ...
5
votes
1answer
64 views

How can I create an function to build a table of contents at a marker?

I'm planning to move StackMode to a literate program once it matures, but until then I'm using the conventional ^L section markers. My files look like this: ;;; Code: ^L ;;; Section 1 Title (defun ...
2
votes
7answers
693 views

How to get the function help without typing?

I'm already used to press C-h f and type a function name to ask for help on that function. But if the function name is already under the cursor (e.g. while visiting the .emacs configuration file), is ...
25
votes
2answers
1k views

Can functions access their name?

In C there is the magic variable __func__ that holds the current function name. In Bash, there is an array FUNCNAME holding the names of all functions in the calling stack !!! Is there a similar ...
8
votes
2answers
239 views

Argspec or arity of a bytecode function in Emacs 24

I have code that tests the arity of a function. I use it to determine whether optional arguments added in recent versions of a package are present. It calls subr-arity for built-in functions and ...