/[emacs]/emacs/lisp/emulation/keypad.el
ViewVC logotype

Diff of /emacs/lisp/emulation/keypad.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by kfstorm, Tue May 14 20:30:55 2002 UTC revision 1.2.2.1 by miles, Fri Apr 4 06:20:17 2003 UTC
# Line 113  decimal key must be specified." Line 113  decimal key must be specified."
113                   (character :tag "Numeric Keypad with Decimal Key"                   (character :tag "Numeric Keypad with Decimal Key"
114                              :match (lambda (widget value) (integerp value))                              :match (lambda (widget value) (integerp value))
115                              :value ?.)                              :value ?.)
116                   (const :tag "Numeric prefix arguments" prefix)                   (const :tag "Numeric prefix arguments" prefix)
117                   (const :tag "Cursor keys" cursor)                   (const :tag "Cursor keys" cursor)
118                   (const :tag "Shifted cursor keys" S-cursor)                   (const :tag "Shifted cursor keys" S-cursor)
119                   (const :tag "Remove bindings" none)                   (const :tag "Unspecified/User-defined" none)
120                   (other :tag "Keep existing bindings" nil))                   (other :tag "Keep existing bindings" nil))
121      :require 'keypad
122    :group 'keyboard)    :group 'keyboard)
123    
124  ;;;###autoload  ;;;###autoload
# Line 135  decimal key must be specified." Line 136  decimal key must be specified."
136                   (character :tag "Numeric Keypad with Decimal Key"                   (character :tag "Numeric Keypad with Decimal Key"
137                              :match (lambda (widget value) (integerp value))                              :match (lambda (widget value) (integerp value))
138                              :value ?.)                              :value ?.)
139                   (const :tag "Numeric prefix arguments" prefix)                   (const :tag "Numeric prefix arguments" prefix)
140                   (const :tag "Cursor keys" cursor)                   (const :tag "Cursor keys" cursor)
141                   (const :tag "Shifted cursor keys" S-cursor)                   (const :tag "Shifted cursor keys" S-cursor)
142                   (const :tag "Remove bindings" none)                   (const :tag "Unspecified/User-defined" none)
143                   (other :tag "Keep existing bindings" nil))                   (other :tag "Keep existing bindings" nil))
144      :require 'keypad
145    :group 'keyboard)    :group 'keyboard)
146    
147  ;;;###autoload  ;;;###autoload
# Line 157  decimal key must be specified." Line 159  decimal key must be specified."
159                   (character :tag "Numeric Keypad with Decimal Key"                   (character :tag "Numeric Keypad with Decimal Key"
160                              :match (lambda (widget value) (integerp value))                              :match (lambda (widget value) (integerp value))
161                              :value ?.)                              :value ?.)
162                   (const :tag "Numeric prefix arguments" prefix)                   (const :tag "Numeric prefix arguments" prefix)
163                   (const :tag "Cursor keys" cursor)                   (const :tag "Cursor keys" cursor)
164                   (const :tag "Shifted cursor keys" S-cursor)                   (const :tag "Shifted cursor keys" S-cursor)
165                   (const :tag "Remove bindings" none)                   (const :tag "Unspecified/User-defined" none)
166                   (other :tag "Keep existing bindings" nil))                   (other :tag "Keep existing bindings" nil))
167      :require 'keypad
168    :group 'keyboard)    :group 'keyboard)
169    
170  ;;;###autoload  ;;;###autoload
# Line 179  decimal key must be specified." Line 182  decimal key must be specified."
182                   (character :tag "Numeric Keypad with Decimal Key"                   (character :tag "Numeric Keypad with Decimal Key"
183                              :match (lambda (widget value) (integerp value))                              :match (lambda (widget value) (integerp value))
184                              :value ?.)                              :value ?.)
185                   (const :tag "Numeric prefix arguments" prefix)                   (const :tag "Numeric prefix arguments" prefix)
186                   (const :tag "Cursor keys" cursor)                   (const :tag "Cursor keys" cursor)
187                   (const :tag "Shifted cursor keys" S-cursor)                   (const :tag "Shifted cursor keys" S-cursor)
188                   (const :tag "Remove bindings" none)                   (const :tag "Unspecified/User-defined" none)
189                   (other :tag "Keep existing bindings" nil))                   (other :tag "Keep existing bindings" nil))
190      :require 'keypad
191    :group 'keyboard)    :group 'keyboard)
192    
193    
# Line 201  keys are bound. Line 205  keys are bound.
205   'S-cursor Bind shifted keypad keys to the shifted cursor movement keys.   'S-cursor Bind shifted keypad keys to the shifted cursor movement keys.
206   'cursor   Bind keypad keys to the cursor movement keys.   'cursor   Bind keypad keys to the cursor movement keys.
207   'numeric  Plain numeric keypad, i.e. 0 .. 9 and .  (or DECIMAL arg)   'numeric  Plain numeric keypad, i.e. 0 .. 9 and .  (or DECIMAL arg)
208   'none     Removes all bindings for keypad keys in function-key-map.   'none     Removes all bindings for keypad keys in function-key-map;
209               this enables any user-defined bindings for the keypad keys
210               in the global and local keymaps.
211    
212  If SETUP is 'numeric and the optional fourth argument DECIMAL is non-nil,  If SETUP is 'numeric and the optional fourth argument DECIMAL is non-nil,
213  the decimal key on the keypad is mapped to DECIMAL instead of `.'"  the decimal key on the keypad is mapped to DECIMAL instead of `.'"
# Line 238  the decimal key on the keypad is mapped Line 244  the decimal key on the keypad is mapped
244              [delete insert end down next left              [delete insert end down next left
245                      space right home up prior])                      space right home up prior])
246             ((eq setup 'S-cursor)             ((eq setup 'S-cursor)
247              [S-delete S-insert S-end S-down S-next S-left              [S-delete S-insert S-end S-down S-next S-left
248                        S-space S-right S-home S-up S-prior])                        S-space S-right S-home S-up S-prior])
249             ((eq setup 'none)             ((eq setup 'none)
250              nil)              nil)
# Line 255  the decimal key on the keypad is mapped Line 261  the decimal key on the keypad is mapped
261      (while (< i 11)      (while (< i 11)
262        (define-key function-key-map (vector (aref kp i))        (define-key function-key-map (vector (aref kp i))
263          (if bind (vector (aref bind i))))          (if bind (vector (aref bind i))))
264          (if (= i 6)
265              (cond ((eq (aref kp i) 'kp-space)
266                     (define-key function-key-map [kp-begin]
267                       (if bind (vector (aref bind i)))))
268                    ((eq (aref kp i) 'S-kp-space)
269                     (define-key function-key-map [S-kp-begin]
270                       (if bind (vector (aref bind i)))))))
271    
272        (setq i (1+ i)))))        (setq i (1+ i)))))
273    
274  ;;; keypad.el ends here  ;;; keypad.el ends here

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26