ken wrote:
On 07/06/2009 04:57 AM Thien-Thi Nguyen wrote:
() Nobuko Three <nbko3@xxxxxxxxx>
() Sun, 5 Jul 2009 10:29:13 -0700 (PDT)
Normally after emacs is crashed, you know you need to use M-x
recover-session, but it could happen that you go to lunch after
crash, you come back, you start emacs again, you forget to do
recover-session and open foo.bar and then also miss the
"foo.txt has auto save data..." message.
How do you deal with this problem?
Go to lunch before the crash!
Think faster but type slower!
Or, (setq message-log-max t),
+ `C-h e' every now and then.
thi
In buffers which have auto-save data I'd like to see an orange
background. In addition, I'd like to hear a beep when I try to type
into that buffer with the standard message/prompt in the minibuffer that
there's auto-save data... should I pull it in or discard it.
Attached is code that does that, plus undoes all those effects when
you do recover the file.
--
Kevin Rodgers
Denver, Colorado, USA
recover-this-file-find-file-hook.el
Description: application/emacs-lisp
Thread at a glance:
Previous Message by Date:
Re: c-mode and underscore
Xah Lee wrote:
On Jul 7, 3:56 pm, geophile <jack.orenst...@xxxxxxxxx> wrote:
I am trying to get c-mode to treat underscore as a word, so that
forward-word backward-word don't stop on underscores.
My .emacs file includes:
(modify-syntax-entry ?_ "w" c-mode-syntax-table)
which does not appear to be effective. But if I run this command
manually, it is effective.
I'm pretty sure that the line above is being reached in my .emacs
file, as later commands are effective.
your code mod the global syntax table. you want to mode the syntax
table for that mode. It works when u call manually because when u are
in that mode, it mods that mod's syntax table.
How could c-mode-syntax-table refer to the current (not global) syntax
table?
hook is a good solution.
It is consistent with the hypothesis that the problem is that
c-mode-syntax-table does not have its correct value when .emacs is
loaded. Indeed, this code from progmodes/cc-mode.el reveals why it
is nil when .emacs is loaded and thus does refer to the current syntax
table as you said:
;;;###autoload
(defvar c-mode-syntax-table nil
"Syntax table used in c-mode buffers.")
(or c-mode-syntax-table
(setq c-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table c))))
The autoload cookie causes the defvar to be copied into loaddefs.el
and thus dumped into the emacs executable. Why does cc-mode.el do that
instead of the obvious
(defvar c-mode-syntax-table (funcall (c-lang-const
c-make-mode-syntax-table c))
"Syntax table used in c-mode buffers.")
e.g.
(add-hook 'w3m-mode-hook
(lambda ()
(define-key w3m-mode-map (kbd "<up>") 'previous-line) ; was w3m-
previous-anchor. Use Shift+Tab.
(define-key w3m-mode-map (kbd "<down>") 'next-line) ; was w3m-next-
anchor. Use Tab.
(define-key w3m-mode-map (kbd "<left>") 'backward-char) ; was w3m-
view-previous-page. Use B.
(define-key w3m-mode-map (kbd "<right>") 'forward-char) ; was w3m-
view-this-url. Use Enter.
))
you want to find the syntax table name for that mode to modify.
If you're going to use a hook, you may as well just refer to the current
syntax table with (syntax-table) instead of by name.
--
Kevin Rodgers
Denver, Colorado, USA
Next Message by Date:
Re: how to specify the current directory when I start a shell in aquamacs
n179911 <n179911@xxxxxxxxx> writes:
> Hi,
>
> I start aquamacs in a directory, say '~/dir1/dir2'
> and then in aquamacs, i do 'M-x shell'
>
> and it launches a shell, but why when I do 'pwd' in the shell, it goes
> back to my HOME, i.e ~?
>
> Is there anyway to configure aquamacs to start a shell when I do M-x
> shell to the directory of where I launched aquamacs?
>
> In my above example, it would be ~/dir1/dir2?
C-x C-f ~/dir1/dir2 RET
M-x shell RET
C-x b *scratch* RET
M-x set-default-directory RET ~/dir/dir2
M-x shell RET
--
__Pascal Bourguignon__
Previous Message by Thread:
Re: how to make the "file has auto save data..." message unskippable?
On 07/06/2009 04:57 AM Thien-Thi Nguyen wrote:
> () Nobuko Three <nbko3@xxxxxxxxx>
> () Sun, 5 Jul 2009 10:29:13 -0700 (PDT)
>
> Normally after emacs is crashed, you know you need to use M-x
> recover-session, but it could happen that you go to lunch after
> crash, you come back, you start emacs again, you forget to do
> recover-session and open foo.bar and then also miss the
> "foo.txt has auto save data..." message.
>
> How do you deal with this problem?
>
> Go to lunch before the crash!
> Think faster but type slower!
> Or, (setq message-log-max t),
> + `C-h e' every now and then.
>
> thi
In buffers which have auto-save data I'd like to see an orange
background. In addition, I'd like to hear a beep when I try to type
into that buffer with the standard message/prompt in the minibuffer that
there's auto-save data... should I pull it in or discard it.