emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lispref/keymaps.texi [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lispref/keymaps.texi [emacs-unicode-2]
Date: Tue, 29 Jun 2004 13:09:24 -0400

Index: emacs/lispref/keymaps.texi
diff -c emacs/lispref/keymaps.texi:1.43.2.2 emacs/lispref/keymaps.texi:1.43.2.3
*** emacs/lispref/keymaps.texi:1.43.2.2 Mon Jun 28 07:28:50 2004
--- emacs/lispref/keymaps.texi  Tue Jun 29 16:45:29 2004
***************
*** 95,100 ****
--- 95,121 ----
  keymaps shadow both local and global keymaps.  @xref{Active Keymaps},
  for details.
  
+   The Emacs Lisp representation for a key sequence is a string or vector.
+ You can enter key sequence constants using the ordinary string or vector
+ representation; it is also convenient to use @code{kbd}:
+ 
+ @defmac kbd keyseq-text
+ This macro converts the text @var{keyseq-text} (a string constant)
+ into a key sequence (a string or vector constant).  The contents
+ of @var{keyseq-text} should describe the key sequence using the syntax
+ used in this manual:
+ 
+ @example
+ (kbd "C-x") @result{} "\C-x"
+ (kbd "C-x C-f") @result{} "\C-x\C-f"
+ (kbd "C-c C-c") @result{} "\C-c\C-c"
+ (kbd "C-x 4 C-f") @result{} "\C-x4\C-f"
+ (kbd "X") @result{} "X"
+ (kbd "RET") @result{} "\^M"
+ (kbd "C-c 3") @result{} "\C-c3"
+ @end example
+ @end defmac
+ 
  @node Format of Keymaps
  @section Format of Keymaps
  @cindex format of keymaps
***************
*** 880,885 ****
--- 901,910 ----
      @result{} find-file
  @end group
  @group
+ (lookup-key (current-global-map) (kbd "C-x C-f"))
+     @result{} find-file
+ @end group
+ @group
  (lookup-key (current-global-map) "\C-x\C-f12345")
      @result{} 2
  @end group
***************
*** 1126,1132 ****
  
  @group
  ;; @r{Build sparse submap for @kbd{C-x} and bind @kbd{f} in that.}
! (define-key map "\C-xf" 'forward-word)
      @result{} forward-word
  @end group
  @group
--- 1151,1157 ----
  
  @group
  ;; @r{Build sparse submap for @kbd{C-x} and bind @kbd{f} in that.}
! (define-key map (kbd "C-x f") 'forward-word)
      @result{} forward-word
  @end group
  @group
***************
*** 1139,1152 ****
  
  @group
  ;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
! (define-key map "\C-p" ctl-x-map)
  ;; @code{ctl-x-map}
  @result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
  @end group
  
  @group
  ;; @r{Bind @kbd{C-f} to @code{foo} in the @code{ctl-x-map}.}
! (define-key map "\C-p\C-f" 'foo)
  @result{} 'foo
  @end group
  @group
--- 1164,1177 ----
  
  @group
  ;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
! (define-key map (kbd "C-p") ctl-x-map)
  ;; @code{ctl-x-map}
  @result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
  @end group
  
  @group
  ;; @r{Bind @kbd{C-f} to @code{foo} in the @code{ctl-x-map}.}
! (define-key map (kbd "C-p C-f") 'foo)
  @result{} 'foo
  @end group
  @group
***************
*** 1333,1339 ****
  (@pxref{Init File}) for simple customization.  For example,
  
  @smallexample
! (global-set-key "\C-x\C-\\" 'next-line)
  @end smallexample
  
  @noindent
--- 1358,1364 ----
  (@pxref{Init File}) for simple customization.  For example,
  
  @smallexample
! (global-set-key (kbd "C-x C-\\") 'next-line)
  @end smallexample
  
  @noindent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]