Skip to main content

Questions tagged [defun]

3 votes
1 answer
182 views

Say, an external package defines these functions: (defun my/inner (x) (1+ x)) (defun my/outer () (my/inner 7)) We want to create a function that wraps my/outer, replacing my/inner with the ...
Post Self's user avatar
  • 163
0 votes
3 answers
90 views

Consider the following code (defun somefunc (text) (message "hello, somefunc called with %s" text) ) (defun func-caller (func) (func "some string") ) (func-caller 'somefunc) ...
Harald's user avatar
  • 404
0 votes
0 answers
53 views

I want to be able to yank the text to char including the character using avy. For this I wrote the following command: (defun my/yank-to-char-avy () "Delete region from point to a character.&...
Rareform's user avatar
  • 291
0 votes
2 answers
158 views

I have this code: (defmacro with-ignore-mouse-events (&rest body) "Macro to ignore mouse events before evaluating BODY." `(progn (when (input-pending-p) (let ((event (...
Gabriele's user avatar
  • 1,720
1 vote
2 answers
124 views

I think I'm missing something about imenu. I'm interested in viewing the top-level definitions in file order. When I run imenu I get a prompt in the minibuffer that says Index item:. If I then hit TAB ...
Eric Auld's user avatar
  • 205
1 vote
1 answer
148 views

I was working on a mode, setq'ed them with my functions and... emacs broke (really) For some reason these variable are global. I made them buffer-local, but is there a good reason for having them ...
Lorenzo Marcantonio's user avatar
3 votes
2 answers
266 views

I tried to use GDB to debug Emacs. More specifically, I want to observe the behavior of a function written in C. vertical-motion is a built-in function in ‘C source code’. However, the name of a C ...
shynur's user avatar
  • 6,200
2 votes
2 answers
188 views

I know that nil is a constant so its value cell cannot be changed, but why its function cell cannot be set as well? ELISP> (defun t ()) t ELISP> (defun nil ()) *** Eval error *** Cannot define ...
shynur's user avatar
  • 6,200

15 30 50 per page