Commit f73178ba authored by David Byers's avatar David Byers

Word completion för kommandon fungerar bättre i XEmacs

parent 89250803
2000-09-15 David Byers <davby@ida.liu.se>
* command.el (lyskom-command-complete-word): Prevent multiple
spaces at end of a word (you'd get them when you typed a full word
and then a space).
(lyskom-read-extended-command): Bind last-exact-completion for
XEmacs compatibility.
(last-exact-completion): New variable.
2000-09-14 David Byers <davby@sen2.ida.liu.se>
* Release av 0.46.1-BETA-2
......
......@@ -44,7 +44,7 @@ REDHATCLIENTVERSION = $(shell echo $(CLIENTVERSION) | tr - .)
RPMROOT = /usr/src/redhat
FTPDIR=/home/davby/www-pub
REMOTEDIR=sanna.lysator.liu.se:/lysator/ftp/pub/lyskom/elisp-client
#REMOTEDIR=sanna.lysator.liu.se:/lysator/ftp/pub/lyskom/elisp-client
#FTPDIR = /usr/ftp/pub/lyskom/elisp-client
LISPDIR = /usr/gnu/share/emacs/site-lisp
LANGUAGES = swedish english
......
......@@ -208,11 +208,14 @@
(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)
(name nil)
(last-exact-completion nil)
(prefix-text
(cond ((eq prefix-arg '-) "- ")
((equal prefix-arg '(4)) "C-u ")
......@@ -372,8 +375,9 @@ and back of the string."
(cond ((null completion) (minibuffer-message " [No match]") nil)
((eq completion t) nil)
(t (let* ((tmp (buffer-string)))
(when (string-equal (lyskom-unicase completion)
(lyskom-unicase tmp))
(when (and (string-equal (lyskom-unicase completion)
(lyskom-unicase tmp))
(not (string-match "\\s-$" completion)))
(if (stringp (setq tmp (try-completion
(concat tmp " ")
minibuffer-completion-table
......
......@@ -111,7 +111,7 @@ install: lyskom-@@CLIENTVERSION@@.elc
cp lyskom-@@CLIENTVERSION@@.el lyskom-@@CLIENTVERSION@@.elc $(LISPDIR)
rm -f $(LISPDIR)/lyskom.el
ln -s $(LISPDIR)/lyskom-@@CLIENTVERSION@@.el $(LISPDIR)/lyskom.el
rm -s $(LISPDIR)/lyskom.elc
rm -f $(LISPDIR)/lyskom.elc
ln -s $(LISPDIR)/lyskom-@@CLIENTVERSION@@.elc $(LISPDIR)/lyskom.elc
clean:
......
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