[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacs20 obsolete? (Re: How to find all reverse depends of a package?)



Santiago Vila <sanvila@unex.es> wrote:

> Could someone please tell me how to make Home and End to work as they
> did in emacs20, both in console and X?

  (global-set-key [home]          'beginning-of-buffer)
  (global-set-key [?\e ?\[ ?1 ?~] 'beginning-of-buffer)

  (global-set-key [end]           'end-of-buffer)
  (global-set-key [?\e ?\[ ?4 ?~] 'end-of-buffer)

Of course, the control sequences are terminal-specific. These are the
ones I get with the Linux console (I suppose they come from VT100
terminals). To find the particular sequence emitted by your terminal for
a given key, you can type "C-q <key>" in the *scratch* buffer.

Also, you can make those bindings happen only under X or only in a
console environment with

  (when (window-system)
     ...)

and

  (unless (window-system)
     ...)

constructs.

HTH,

-- 
Florent



Reply to: