unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).