all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* defalias inside a defun
@ 2024-04-06  0:59 Heime
  2024-04-09  9:43 ` Joost Kremers
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2024-04-06  0:59 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Would it be acceptable to call a defalias inside a defun ?\

I have the function avus and want to make a few alias functions 
when requiring a specific file.  For instance including gala-bash-func
as an alternative to avus-bash-func defined in avus-bash.el

(defun gala ()
  "Require libraries based on major mode."
  (interactive)

  (cond

    ((eq major-mode 'sh-mode)
          (require 'avus-bash)
          (defalias 'gala-bash-func #'avus-bash-func))))





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

end of thread, other threads:[~2024-04-09 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06  0:59 defalias inside a defun Heime
2024-04-09  9:43 ` Joost Kremers
2024-04-09 12:13   ` Heime
2024-04-09 13:48     ` Stefan Monnier via Users list for the GNU Emacs text editor

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.