🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98589

Key-binding of emacs-functions [was "variables"]

#98589
From: Martin Maechler
Date: Wed, 01 May 1991 19:24
19 lines
1263 bytes
Only 'interactive' functions (also called "commands" in emacs-lisp
terminology) can be bound to keys.
(And only they can be called using M-x <fn-name> !)

So, you have to add the line 
	(interactive)
to your 'defun:

(defun
  toggle-wrap ()
   (interactive) ;;---- this is necessary
      (if (= truncate-lines nil)
        (setq truncate-lines 1))
      (if (> truncate-lines nil)
        (setq truncate-lines nil))
)

Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA
maechler@bellcore.com, Tel: (201) 829-4837(w)  933-0944(h), Fax (201) 538-9093.
Technical Details
Message-ID: <9105011924.AA25658@breeze.bellcore.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,b1a0f21d90dad16e,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-05-01 12:24:23 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage
From: maechler@BREEZE.BELLCORE.COM (Martin Maechler)
Newsgroups: gnu.emacs.bug
Subject: Key-binding of emacs-functions  [was "variables"]
Message-ID: <9105011924.AA25658@breeze.bellcore.com>
Date: 1 May 91 19:24:23 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: maechler@bellcore.com (Martin Maechler)
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 19
Approved: bug-gnu-emacs@prep.ai.mit.edu