Skip to content
GitLab
Menu
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
06145c59
Commit
06145c59
authored
Nov 18, 2000
by
Joel Rosdahl
Browse files
Revived the minibuffer completion code from 0.46-BETA-P.
parent
5ff0ea96
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
06145c59
2000-11-18 Joel Rosdahl <joel@rosdahl.net>
* command.el (lyskom-read-extended-command): Revived the
minibuffer completion code from 0.46-BETA-P.
(lyskom-ok-command): Ditto.
2000-11-18 Per Starbck (commit by Per Cederqvist <ceder@moria>)
* commands2.el (kom-status-person): Use mod instead of %, since
...
...
src/Makefile
View file @
06145c59
...
...
@@ -36,7 +36,7 @@
# makefile too!
#
CLIENTVERSION
=
0.46.1-BETA-
2
CLIENTVERSION
=
0.46.1-BETA-
3
DOCFILES
=
NEWS-0.46 NEWS-0.46.1
DEBIANCLIENTVERSION
=
$(
shell
echo
$(CLIENTVERSION)
|
tr
- .
)
...
...
src/command.el
View file @
06145c59
...
...
@@ -190,8 +190,8 @@
(
defun
lyskom-ok-command
(
alternative
administrator
)
"Returns non-nil if it is ok to do such a command right now."
(
if
administrator
(
not
(
memq
(
elt
alternative
1
)
lyskom-admin-removed-commands
))
(
not
(
memq
(
elt
alternative
1
)
lyskom-noadmin-removed-commands
))))
(
not
(
memq
(
cdr
alternative
)
lyskom-admin-removed-commands
))
(
not
(
memq
(
cdr
alternative
)
lyskom-noadmin-removed-commands
))))
(
defun
kom-extended-command
()
"Read a LysKOM function name and call the function."
...
...
@@ -201,21 +201,18 @@
(
fnc
(
call-interactively
fnc
))
(
t
(
kom-next-command
))))
)
(
defvar
lyskom-command-completion-map
nil
)
(
if
lyskom-command-completion-map
nil
(
setq
lyskom-command-completion-map
(
make-sparse-keymap
))
(
define-key
lyskom-command-completion-map
(
kbd
"SPC"
)
'lyskom-command-complete-word
))
(
defvar
last-exact-completion
)
(
defun
lyskom-read-extended-command
(
&optional
prefix-arg
)
"Reads and returns a command"
(
let*
((
completion-ignore-case
t
)
(
minibuffer-setup-hook
minibuffer-setup-hook
)
(
alternatives
(
mapcar
(
lambda
(
pair
)
(
cons
(
cdr
pair
)
(
car
pair
)))
(
lyskom-get-strings
lyskom-commands
'lyskom-command
)))
(
name
nil
)
(
last-exact-completion
nil
)
(
prefix-text
(
cond
((
eq
prefix-arg
'-
)
"- "
)
((
equal
prefix-arg
'
(
4
))
"C-u "
)
...
...
@@ -230,22 +227,18 @@
(
lyskom-get-string
'extended-command
))))
(
lyskom-with-lyskom-minibuffer
(
set-keymap-parent
lyskom-command-completion-map
minibuffer-local-must-match-map
)
(
let
((
minibuffer-completion-table
'lyskom-complete-command
)
(
minibuffer-completion-predicate
(
lambda
(
alt
)
(
lyskom-ok-command
alt
lyskom-is-administrator
)))
(
minibuffer-completion-confirm
nil
))
(
setq
name
(
lyskom-read-from-minibuffer
prompt
nil
lyskom-command-completion-map
nil
'lyskom-command-history
t
)))
(
lyskom-lookup-command-by-name
name
(
lambda
(
alt
)
(
lyskom-ok-command
alt
lyskom-is-administrator
))))))
(
setq
name
(
lyskom-completing-read
prompt
(
lyskom-maybe-frob-completion-table
alternatives
)
;; lyskom-is-administrator is buffer-local and
;; must be evalled before the call to
;; completing-read
;; Yes, this is not beautiful
(
list
'lambda
'
(
alternative
)
(
list
'lyskom-ok-command
'alternative
lyskom-is-administrator
))
t
nil
'lyskom-command-history
)))
(
cdr
(
lyskom-string-assoc
name
alternatives
))))
(
defun
lyskom-update-command-completion
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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