all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* proper use of add-function
@ 2018-05-22 22:58 Eric Abrahamsen
  2018-05-22 23:18 ` Noam Postavsky
  2018-05-22 23:31 ` Michael Heerdegen
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2018-05-22 22:58 UTC (permalink / raw)
  To: help-gnu-emacs

And another very basic question:

I can't get `add-function' to do its thing. I want to add a :filter-args
function to #'canonically-space-region, and because this is a minor
mode, I want it set locally. I've tried everything I can think of, but
either get no results (my advice function isn't called) or an error
saying that it wants a symbol, but I gave it a lambda. If I give it a
symbol, nothing happens.

(add-function
   :filter-args
   (local 'canonically-space-region)
   #'my-canonical-space-region)

(defun my-canonical-space-region (bounds)
  ;; etc
  (list (car bounds) (nth 1 bounds)))

What's wrong with this?

Thanks,
Eric




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-23  0:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-22 22:58 proper use of add-function Eric Abrahamsen
2018-05-22 23:18 ` Noam Postavsky
2018-05-22 23:31 ` Michael Heerdegen
2018-05-22 23:36   ` Eric Abrahamsen
2018-05-22 23:58     ` Michael Heerdegen
2018-05-23  0:09       ` Eric Abrahamsen
2018-05-23  0:19         ` Noam Postavsky
2018-05-23  0:29           ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.