Skip to main content
5 votes
Accepted

How to get Emacs to know that a symbol has a function definition

Your question is a little confusing, but I suspect you actually mean that you've byte-compiled the prelude-ivy.el library (as opposed to "reading the source file"), and that the compiler has produced ...
phils's user avatar
  • 51.7k
4 votes
Accepted

Looking for an `ignore` function which returns t

Have you tried using ignorealways? always is a natively compiled function defined in subr.el.gz. Signature (always &rest ARGUMENTS) Documentation Ignore ARGUMENTS, do nothing, and return t. ...
db48x's user avatar
  • 18.4k
3 votes
Accepted

What is the correct way of passing a function with a default argument to a function?

You almost have it: drop the quote from the apply-partially form so that it reads: :filter (apply-partially 'my-pass-it-on-filter "/tmp/mytmp") The point is that apply-partially returns the ...
Fran Burstall's user avatar
2 votes
Accepted

oddp vs cl-oddp in elisp script

If you load library cl.el then C-h f oddp tells you this: oddp is an alias for cl-oddp in cl.el. (oddp INTEGER) Return t if INTEGER is odd. This function does not change global state, including the ...
Drew's user avatar
  • 78k
2 votes
Accepted

Display lambda expression as let-bound symbol

Assuming you are using dynamic binding you can search through the obarray for your value: ;;; Assumes dynamic binding. This is a macro because a function would ;;; introduce more bound variables ...
npostavs's user avatar
  • 9,213
2 votes
Accepted

Elisp equivalent of FUNCTION-LAMBDA-EXPRESSION?

symbol-function can return an actual function object for the argument symbol, which would be displayed as its printed representation (either a lambda form or compiled byte-code -- but you could load ...
phils's user avatar
  • 51.7k
2 votes
Accepted

Convert function-quoted form #'... to string

I don't know why you need this, but one way is: (format "%s" #'(lambda () (interactive))) ⇒ "(closure (t) nil (interactive))"
rpluim's user avatar
  • 5,345
1 vote
Accepted

How can I save a function defintion

You can use symbol-function to obtain the current function slot value for a given symbol, which is typically what you'd be after here. You can store that value anywhere you want, and restore it later (...
phils's user avatar
  • 51.7k
1 vote

How to pass the current scopes function symbol as an argument to an elisp function

You'll end up doing it the same way most programming modes do syntax highlighting: by matching regular expressions against the buffer contents. You'll want to search backwards for the beginning of the ...
db48x's user avatar
  • 18.4k
1 vote
Accepted

Error with org-fstree: Symbol's function definition is void: reduce

The package org-fstree is very old. The correction code below fixes several problems in the elisp file org-fstree.el of the package. It also prepares the package for autoload. That means that the ...
Tobias's user avatar
  • 33.3k
1 vote

Monkey patch and restore builtin set-window-dedicated-p during advice

Notice that your code will misbehave if ad-do-it ends up signalling an error (so the subsequent fset is not executed any more to restore the normal state). Here's a slightly more verbose way to get ...
Stefan's user avatar
  • 26.5k
1 vote
Accepted

Monkey patch and restore builtin set-window-dedicated-p during advice

Both fset and defalias can point to a symbol or its current function definition, depending on whether you pass them the symbol or symbol-function applied to the symbol. The latter gets the value of ...
Drew's user avatar
  • 78k

Only top scored, non community-wiki answers of a minimum length are eligible