Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
647ac0c3
Commit
647ac0c3
authored
Jun 11, 1999
by
David Byers
Browse files
Define kbd more agressively to override buggy definitions in some Emacsen
parent
f02db491
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
647ac0c3
1999-06-11 David Byers <davby@ida.liu.se>
* compatibility.el (kbd): Redefine kbd if it seems to be
misbehaving.
1999-01-16 David Byers <davby@ida.liu.se>
* lyskom-rest.el (j-or-n-p): Don't compare character to int. It's
...
...
src/compatibility.el
View file @
647ac0c3
...
...
@@ -65,7 +65,6 @@ LysKOM"))
(
if
(
not
(
,
predicate
))
(
progn
(
,@
forms
))))))
(
defmacro
lyskom-compatibility-definition
(
predicate
definition
)
"If PREDICATE is nil, evaluate DEFINITION at compile and run time.
Definition should be a function definition of some kind, with syntax
...
...
@@ -140,15 +139,27 @@ of the lyskom-provide-* functions instead."
;;; ======================================================================
;;; Defining keys
;;;
;;; Lots of Emacsen have buggy definitions of kbd (or no definition at all)
;;; Although it's crufty to redefine a function from subr.el, I will do so
;;; if it appears to be misbehaving. Don't like it? Tough!
;;;
(
lyskom-compatibility-definition
(
condition-case
error
(
or
(
equal
(
kbd
(
identity
"<down-mouse-2>"
))
[down-mouse-2]
)
(
error
"Bad definition of kbd"
))
(
error
nil
))
(
lyskom-provi
de
-
macro
kbd
(
keys
)
"Convert KEYS to the internal Emacs key representation.
(
de
f
macro
kbd
(
keys
)
"Convert KEYS to the internal Emacs key representation.
KEYS should be a string in the format used for saving keyboard macros
\(see `insert-kbd-macro')."
(
if
(
or
(
stringp
keys
)
(
vectorp
keys
))
(
read-kbd-macro
keys
)
`
(
read-kbd-macro
,
keys
)))
(
if
(
or
(
stringp
keys
)
(
vectorp
keys
))
(
read-kbd-macro
keys
)
`
(
read-kbd-macro
,
keys
)))
)
;;; ======================================================================
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment