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
60e22571
Commit
60e22571
authored
Sep 02, 2000
by
David Byers
Browse files
Hopefully fixed bug in command completion.
parent
dcaab97b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
60e22571
2000-09-02 David Byers <davby@sen2.ida.liu.se>
* completing-read.el (lyskom-completing-strip-name): Added
DONT-STRIP-SPACES argument.
2000-09-02 David Byers <davby@ida.liu.se>
* distribution-Makefile (INFODIR): Changed to default location for
Emacs installations.
(LISPDIR): Same here.
Sat Sep 2 14:24:57 2000 David Byers <davby@sen2.ida.liu.se>
* slow.el (lyskom-expand-slow-command): Use
...
...
src/command.el
View file @
60e22571
...
...
@@ -255,24 +255,28 @@ transformed for matching."
"Look up the command that corresponds to a certain string."
(
lyskom-complete-command
string
predicate
'lyskom-lookup
))
(
defsubst
lyskom-command-match-string-regexp
(
string
)
(
concat
"^"
(
replace-in-string
(
regexp-quote
(
lyskom-unicase
(
lyskom-completing-strip-name
string
t
)))
"\\s-+"
"\\\\S-*\\\\s-+"
)
"\\s-*"
))
(
defun
lyskom-complete-command
(
string
predicate
all
)
"Completion function for LysKOM commands."
(
let
((
alternatives
nil
)
(
m-string
(
lyskom-com
pleting
-match-string-regexp
string
))
(
m-string
(
lyskom-com
mand
-match-string-regexp
string
))
(
exact
nil
))
(
lyskom-traverse
el
lyskom-command-alternatives
(
when
(
and
(
string-match
m-string
(
elt
el
2
))
(
or
(
null
predicate
)
(
funcall
predicate
el
)))
(
setq
alternatives
(
cons
(
if
(
eq
all
'lyskom-lookup
)
el
(
elt
el
0
))
alternatives
))
(
if
(
eq
(
match-end
0
)
(
length
(
elt
el
2
)))
(
setq
exact
t
))))
(
if
(
eq
(
match-end
0
)
(
length
(
elt
el
2
)))
(
setq
exact
el
))))
(
cond
((
eq
all
'lyskom-lookup
)
(
elt
(
car
alternatives
)
1
))
((
eq
all
'lambda
)
(
or
(
=
(
length
alternatives
)
1
)
exact
)
)
((
eq
all
'lyskom-lookup
)
(
and
exact
(
elt
exact
1
))
)
((
eq
all
'lambda
)
exact
)
(
all
alternatives
)
((
null
alternatives
)
nil
)
((
=
(
length
alternatives
)
1
)
(
if
(
string-equal
string
(
lyskom-maybe-recode-string
(
car
alternatives
)))
t
(
lyskom-maybe-recode-string
(
car
alternatives
))))
((
and
(
=
(
length
alternatives
)
1
)
exact
)
t
)
(
t
(
lyskom-maybe-recode-string
(
lyskom-complete-string
alternatives
))))))
...
...
src/completing-read.el
View file @
60e22571
...
...
@@ -550,15 +550,18 @@ function work as a name-to-conf-stat translator."
result
))
(
defun
lyskom-completing-strip-name
(
string
)
"Strip parens and crap from a name"
(
defun
lyskom-completing-strip-name
(
string
&optional
dont-strip-spaces
)
"Strip parens and crap from a name.
If optional DONT-STRIP-SPACES is non-nil, don't strip spaces at front
and back of the string."
(
while
(
string-match
"([^()]*)"
string
)
(
setq
string
(
replace-match
" "
t
t
string
)))
(
while
(
string-match
"\\s-\\s-+"
string
)
(
setq
string
(
replace-match
" "
t
t
string
)))
(
while
(
string-match
"([^()]*$"
string
)
(
setq
string
(
substring
string
0
(
match-beginning
0
))))
(
if
(
string-match
"^\\s-*\\(.*\\S-\\)\\s-*$"
string
)
(
if
(
and
(
not
dont-strip-spaces
)
(
string-match
"^\\s-*\\(.*\\S-\\)\\s-*$"
string
))
(
match-string
1
string
)
string
))
...
...
src/distribution-Makefile
View file @
60e22571
...
...
@@ -17,8 +17,8 @@ EMACS=emacs
# INFODIR is where documentation goes (if there is any)
# ======================================================================
LISPDIR=/usr/
gnu
/share/emacs/site-lisp
INFODIR=/usr/
gnu
/info
LISPDIR=/usr/
local
/share/emacs/site-lisp
INFODIR=/usr/
local
/info
# ======================================================================
...
...
src/lyskom-rest.el
View file @
60e22571
...
...
@@ -3606,7 +3606,7 @@ One parameter - the prompt string."
(
function
(
lambda
(
x
)
(
aset
tmp
(
char-to-int
x
)
t
)))
(
lyskom-maybe-recode-string
lyskom-line-start-chars-string
'iso-8859-1
))
(
lyskom-maybe-recode-string
lyskom-line-start-chars-string
'iso-8859-1
t
))
tmp
))
...
...
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