all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Catching no generic method in EIEIO
@ 2016-05-25 16:03 Phillip Lord
  2016-05-25 16:06 ` Dmitry Gutov
  2016-05-25 18:19 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Phillip Lord @ 2016-05-25 16:03 UTC (permalink / raw)
  To: help-gnu-emacs



Using EIEIO I can define a `slot-missing' method to catch "No Such Slot"
errors for objects which do not have this slot.

I've looked but as far as I can see, there is no ability to catch a
missing implementation for a method.

So:

(defclass One()())

(defclass Two()())

(defmethod met((o One))
  'hello)

(met (One))
(met (Two))

The last form crashes -- I could, of course, implement this using
defmethod on Two, but I want to this for any method.

Phil



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

end of thread, other threads:[~2016-05-28 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 16:03 Catching no generic method in EIEIO Phillip Lord
2016-05-25 16:06 ` Dmitry Gutov
2016-05-25 18:19 ` Stefan Monnier
2016-05-26 15:07   ` Phillip Lord
2016-05-28 18:29     ` Stefan Monnier

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.