unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: One more time: binding overwrite-mode to Apple kbd
Date: Thu, 20 Jul 2006 16:31:21 -0600	[thread overview]
Message-ID: <e9p0ab$9ip$1@sea.gmane.org> (raw)
In-Reply-To: <20060719204537.2126.SLAWOMIR.NOWACZYK.847@student.lu.se>

Slawomir Nowaczyk wrote:
> On Mon, 17 Jul 2006 15:56:32 +0200
> David Kastrup <dak@gnu.org> wrote:
> 
> #> M-x picture-mode RET
> 
> It there some reason why there is no picture-mode-toggle command?

Try this:

(defvar toggle-picture-mode nil
   "The previous major mode, before Picture mode.")

(defadvice picture-mode (before toggle-major-mode activate)
   "Set `toggle-picture-mode'."
   (set (make-local-variable 'toggle-picture-mode) major-mode)
   (put 'toggle-picture-mode 'permanent-local t))

(defun toggle-picture-mode ()
   "Select the previous major mode."
   (if toggle-picture-mode
       (progn
	(setq toggle-picture-mode nil)
	(funcall toggle-picture-mode))
     (error "No previous major mode")))

-- 
Kevin Rodgers
Sr. Software Engineer, IHS

  reply	other threads:[~2006-07-20 22:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-16 16:07 One more time: binding overwrite-mode to Apple kbd kj
2006-07-16 17:16 ` Pascal Bourguignon
2006-07-16 18:39   ` kj
2006-07-16 18:59     ` Peter Dyballa
     [not found]     ` <mailman.4146.1153076350.9609.help-gnu-emacs@gnu.org>
2006-07-18 20:35       ` bmovies
2006-07-18 21:26         ` Peter Dyballa
2006-07-17  8:44 ` don provan
2006-07-17 10:58   ` Mathias Dahl
2006-07-17 12:48     ` kj
2006-07-17 13:56       ` David Kastrup
2006-07-19 19:02         ` Slawomir Nowaczyk
2006-07-20 22:31           ` Kevin Rodgers [this message]
2006-07-21  1:11             ` Slawomir Nowaczyk
2006-07-17 19:30       ` don provan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e9p0ab$9ip$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).