[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Picture mode does not provide any hook on exit
From: |
M Jared Finder |
Subject: |
Picture mode does not provide any hook on exit |
Date: |
Tue, 28 Mar 2006 09:20:18 -0800 |
I suggest adding a hook "picture-mode-exit-hook" which is run in
picture-mode-exit. Here's why:
Normally, activating a major mode calls kill-all-local-variables which runs
change-major-mode-hook.
Picture-mode does not do this, which makes sense because picture-mode is used
as a temporary major
mode. I use it all the time to draw pictures in my code comments.
I have written a minor mode that is incompatible with picture mode (both my
mode and picture-mode
try to remap self-insert-command). Normally, I would disable my minor mode by
putting a null keymap
into minor-mode-overriding-map-alist, which would get killed when the major
mode changed. But since
picture-mode does not call kill-all-local-variables, this keymap does not get
removed until I
expcitily re-enter the old major mode.
Adding an exit hook would allow me to remove the null keymap from
minor-mode-overriding-map-alist,
without disturbing any other local variables.
-- MJF
In GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.8.13) of 2006-03-23
on pacem, modified by
Debian X server distributor `The X.Org Foundation', version 11.0.60900000
configured using
`configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr'
'--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/22.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.0.50/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.0.50/leim'
'--with-x=yes' '--with-x-toolkit=gtk' 'CFLAGS=-DDEBIAN -g -O2 -Wno-pointer-sign'
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu'' Important settings:
value of $LC_ALL:
nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of
$LC_MESSAGES: nil value of
$LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value
of $LANG: nil
locale-coding-system: nil default-enable-multibyte-characters: t Major mode:
Emacs-Lisp Minor
modes in effect: eldoc-mode: t global-balanced-mode: t balanced-mode: t
hrule-mode: t
cua-mode: t global-reveal-mode: t reveal-mode: t global-hi-lock-mode: t
hi-lock-mode: t
show-paren-mode: t tooltip-mode: t auto-compression-mode: t
mouse-wheel-mode: t
menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode:
t
column-number-mode: t line-number-mode: t transient-mark-mode: t Recent
input: <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <up> <up> <up> <up>
<up> <up> <down>
<return> <up> <return> ( d e f u n SPC b a l a n c e d - e n a b l e - b a l
a n c e d - m o d e
SPC ( ) <return> " H o o k SPC f u n c t i o n <menu> r e p o r t SPC e m
<tab> <return> Recent
messages: Balanced mode disabled Undo! [4 times] Quit Undo! [3 times] Redo!
Longlines mode disabled
Longlines mode enabled Auto-saving...done (No changes need to be saved)
Auto-saving...done
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Picture mode does not provide any hook on exit,
M Jared Finder <=