Commit 12da63be authored by Linus Tolke Y's avatar Linus Tolke Y

emacs19s keymaps supported.

parent 9a245db0
No preview for this file type
......@@ -413,15 +413,23 @@ parst matching ([^)]) in string and alist are disgarded."
(if lyskom-initial-completing-map
nil
(setq lyskom-initial-completing-map (make-keymap))
(if (fboundp 'map-keymap) ;lucid-emacs' way of doing things.
(map-keymap
(function (lambda (keydesc binding)
(define-key lyskom-initial-completing-map keydesc
'lyskom-hack-minibuf)))
global-map)
(cond
((fboundp 'map-keymap) ;lucid-emacs' way of doing things.
(map-keymap
(function (lambda (keydesc binding)
(define-key lyskom-initial-completing-map keydesc
'lyskom-hack-minibuf)))
global-map))
((string-match "^19" emacs-version)
(let ((i (length (car (cdr lyskom-initial-completing-map)))))
(while (>= (setq i (1- i)) 0)
(aset (car (cdr lyskom-initial-completing-map))
i 'lyskom-hack-minibuf)))
)
(t ; emacs-18.
(let ((i (length lyskom-initial-completing-map)))
(while (>= (setq i (1- i)) 0)
(aset lyskom-initial-completing-map i 'lyskom-hack-minibuf))))
(aset lyskom-initial-completing-map i 'lyskom-hack-minibuf)))))
(define-key lyskom-initial-completing-map "\C-g" 'lyskom-complete-quit))
......
......@@ -746,17 +746,28 @@ BUG: does not descend in the maps."
(lambda (event function)
(define-key map event function)))
newmap))
((arrayp newmap)
(while (< r (length newmap))
(if (aref newmap r)
(define-key map (char-to-string r) (aref newmap r)))
(setq r (1+ r))))
(t
(mapcar
(function
(lambda (ele)
(define-key map (char-to-string (car ele)) (cdr ele))))
(cdr newmap))))
((and (string-match "^19" emacs-version)
(arrayp (car (cdr newmap))))
(while (< r (length (car (cdr newmap))))
(if (aref (car (cdr newmap)) r)
(define-key map (char-to-string r) (aref (car (cdr newmap)) r)))
(setq r (1+ r))))
((arrayp newmap)
(while (< r (length newmap))
(if (aref newmap r)
(define-key map (char-to-string r) (aref newmap r)))
(setq r (1+ r))))
(t
(mapcar
(function
(lambda (ele)
(define-key map
(cond
((integerp (car ele))
(char-to-string (car ele)))
((vector (car ele))))
(cdr ele))))
(cdr newmap))))
map))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment