How to bind the command helm-find-files-up-one-level to "C-<DEL>"?

119 views
Skip to first unread message

Show Dont

unread,
Mar 6, 2015, 5:23:28 AM3/6/15
to emacs...@googlegroups.com
When I use "C-x C-f" and hit "C-<DEL>", I get the message that '[Auto expasion disable]' int the left of mode line.How to restore the function of  "C-<DEL>" as pure Emacs without helm? 

Michael Heerdegen

unread,
Mar 6, 2015, 4:30:06 PM3/6/15
to emacs...@googlegroups.com
That's a question different from that in the subject.

Here's what I do:

--8<---------------cut here---------------start------------->8---
(define-key helm-find-files-map
[(control backspace)] #'helm-find-files-up-one-level)
(define-key helm-read-file-map
[(control backspace)] #'helm-find-files-up-one-level)
--8<---------------cut here---------------end--------------->8---

Using nil as binding above would reveal the global binding
(`backward-kill-word' probably).

Message has been deleted

Show Dont

unread,
Mar 6, 2015, 10:25:09 PM3/6/15
to emacs...@googlegroups.com, michael_...@web.de
It works well for me, Thank you very much !!

在 2015年3月7日星期六 UTC+8上午5:30:06,Michael Heerdegen写道:

Igor Sosa Mayor

unread,
Mar 7, 2015, 1:40:06 AM3/7/15
to emacs...@googlegroups.com
Michael Heerdegen <michael_...@web.de>
writes:

> Here's what I do:
>
> (define-key helm-find-files-map
> [(control backspace)] #'helm-find-files-up-one-level)
> (define-key helm-read-file-map
> [(control backspace)] #'helm-find-files-up-one-level)

Could you maybe explain what is the reason for using # in define-keys?

Many thanks in advance.

--
:: Igor Sosa Mayor :: joseleop...@gmail.com ::
:: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ ::
:: jabberid: rogorido :: ::

Eric Abrahamsen

unread,
Mar 7, 2015, 1:48:25 AM3/7/15
to emacs...@googlegroups.com
Igor Sosa Mayor
<joseleop...@gmail.com> writes:

> Michael Heerdegen <michael_...@web.de>
> writes:
>
>> Here's what I do:
>>
>> (define-key helm-find-files-map
>> [(control backspace)] #'helm-find-files-up-one-level)
>> (define-key helm-read-file-map
>> [(control backspace)] #'helm-find-files-up-one-level)
>
> Could you maybe explain what is the reason for using # in define-keys?

The correspondence here is "#'" to indicate a symbol's function value,
and plain old "'" to indicate a symbol's variable value. These are
reader macros standing in for regular function calls:

' -> quote
#' -> function

In this case (and many other cases) there's little practical difference.
"#'" is a hint to the (human) reader that the symbol is a function, and
I think also a hint to the compiler, in certain circumstances, that the
symbol's function value can be compiled.

Hope that helps,
Eric

Igor Sosa Mayor

unread,
Mar 27, 2015, 10:44:49 AM3/27/15
to emacs...@googlegroups.com
Eric Abrahamsen <er...@ericabrahamsen.net>
writes:

> The correspondence here is "#'" to indicate a symbol's function value,
> and plain old "'" to indicate a symbol's variable value. These are
> reader macros standing in for regular function calls:
>
> ' -> quote
> #' -> function
>
> In this case (and many other cases) there's little practical difference.
> "#'" is a hint to the (human) reader that the symbol is a function, and
> I think also a hint to the compiler, in certain circumstances, that the
> symbol's function value can be compiled.

I think, I forgot to answer you... Sorry. Many thanks for your
explanations. It's a little bit clearer now to me.

Reply all
Reply to author
Forward
0 new messages