From nsiivola at common-lisp.net Mon Apr 12 12:38:42 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Mon, 12 Apr 2004 08:38:42 -0400 Subject: [Linedit-cvs] CVS update: src/complete.lisp src/linedit.asd src/packages.lisp src/utility-functions.lisp src/utility-macros.lisp src/version.lisp-expr Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv26951 Modified Files: complete.lisp linedit.asd packages.lisp utility-functions.lisp utility-macros.lisp version.lisp-expr Log Message: * Make completion not stuble on logical pathnames. * Fix META-ESCAPE to deal with character literals. Not 100% sure this is the right fix, though, but seems to do the job. Date: Mon Apr 12 08:38:41 2004 Author: nsiivola Index: src/complete.lisp diff -u src/complete.lisp:1.5 src/complete.lisp:1.6 --- src/complete.lisp:1.5 Fri Mar 5 14:52:22 2004 +++ src/complete.lisp Mon Apr 12 08:38:41 2004 @@ -28,15 +28,62 @@ (defun underlying-directory-p (pathname) (case (file-kind pathname) (:directory t) - (:symbolic-link (file-kind (merge-pathnames (read-link pathname) pathname))))) + (:symbolic-link + (file-kind (merge-pathnames (read-link pathname) pathname))))) (defun relative-pathname-p (pathname) (let ((dir (pathname-directory pathname))) (or (null dir) (eq :relative (car dir))))) -;; This version of directory-complete isn't nice to symlinks, and -;; should be replaced by something backed by foreign glue. +(defun logical-pathname-p (pathname) + (typep (pathname pathname) 'logical-pathname)) + +(defun logical-pathname-complete (string) + (values (list string) (length string))) + +#+nil +(defun logical-pathname-complete (string) + (let* ((host (pathname-host string)) + (rest (subseq string (1+ (mismatch host string)))) + (rules (remove-if-not (lambda (rule) + (mismatch rest (first rule))))) + (physicals (mapcar (lambda (rule) + (namestring + (translate-pathname string + (first rule) + (second rule)))) + rules)) + (matches (apply #'append (mapcar #'directory-complete physicals))) + (logicals (mapcar (lambda (physical) + (let ((rule (find-if (lambda (rule) + (misma + + (flet ((maybe-translate-logical-pathname (string) + (handler-case + (translate-logical-pathname string) + (error () + (return-from logical-pathname-complete (values nil 0)))))) + (directory-complete + (namestring + (maybe-translate-logical-pathname string))))) + ;; FIXME: refactor chared code with directory complete + (loop with all + with common + with max + for cand in matches + do (let ((diff (mismatch string cand))) + (unless (< diff (length string)) + (setf common (if common + (subseq common 0 (mismatch common cand)) + cand) + max (max max (length cand)) + all (cons cand all)))) + finally (if (or (null common) + (<= (length common) (length string))) + (return (values all max)) + (return (values (list common) (length common)))))))))))))))) + (defun directory-complete (string) (declare (simple-string string)) (let* ((common nil) @@ -56,7 +103,8 @@ (diff (mismatch string full))) (dbg "~& completed: ~A, diff: ~A~%" full diff) (unless (< diff (length string)) - (dbg "~& common ~A mismatch ~A~&" common (mismatch common full)) + (dbg "~& common ~A mismatch ~A~&" common + (mismatch common full)) (setf common (if common (subseq common 0 (mismatch common full)) full) @@ -72,7 +120,9 @@ (declare (simple-string string)) (when (plusp (length string)) (if (in-quoted-string-p editor) - (directory-complete string) + (if (logical-pathname-p string) + (logical-pathname-complete string) + (directory-complete string)) (let* ((length (length string)) (first-colon (position #\: string)) (last-colon (position #\: string :from-end t)) Index: src/linedit.asd diff -u src/linedit.asd:1.28 src/linedit.asd:1.29 --- src/linedit.asd:1.28 Mon Mar 8 01:45:27 2004 +++ src/linedit.asd Mon Apr 12 08:38:41 2004 @@ -54,7 +54,7 @@ (error 'operation-error :component c :operation o))) (defsystem :linedit - :version "0.15.9" + :version "0.15.10" :depends-on (:uffi :terminfo :osicat) :components (;; Common Index: src/packages.lisp diff -u src/packages.lisp:1.16 src/packages.lisp:1.17 --- src/packages.lisp:1.16 Fri Mar 5 13:21:36 2004 +++ src/packages.lisp Mon Apr 12 08:38:41 2004 @@ -28,4 +28,6 @@ #:*default-lines* #+sbcl #:install-repl #+sbcl #:uninstall-repl + #:start-debug + #:end-debug )) Index: src/utility-functions.lisp diff -u src/utility-functions.lisp:1.10 src/utility-functions.lisp:1.11 --- src/utility-functions.lisp:1.10 Fri Mar 5 17:10:59 2004 +++ src/utility-functions.lisp Mon Apr 12 08:38:41 2004 @@ -46,9 +46,12 @@ (word-delimiter-p (char string index)))) (defun start-debug (pathname &rest open-args) + "Start linedit debugging output to pathname, with additional +open-args passed to `open'." (setf *debug* (apply #'open pathname :direction :output open-args))) (defun end-debug () + "End linedit debugging output." (close *debug*) (setf *debug* nil)) @@ -64,9 +67,13 @@ (defun meta-escape (string) (declare (simple-string string)) (let (stack) - (loop for i from 1 upto (length string) + (loop with last + for i from 1 upto (length string) for char across string - when (eql #\\ char) + ;; KLUDGE: Deal with character literals. Not quite sure this is + ;; the right and robust way to do it, though. + when (and (eql #\\ char) (not (eql #\# last))) do (push #\\ stack) - do (push char stack)) + do (push char stack) + (setf last char)) (coerce (nreverse stack) 'simple-string))) Index: src/utility-macros.lisp diff -u src/utility-macros.lisp:1.6 src/utility-macros.lisp:1.7 --- src/utility-macros.lisp:1.6 Thu Mar 4 11:47:09 2004 +++ src/utility-macros.lisp Mon Apr 12 08:38:41 2004 @@ -56,12 +56,13 @@ (with-unique-names (value) `(let ((,value ,condition)) (unless ,value - (error "BUG: You seem to have found a bug in Linedit. Please report~ - this incident along with directions to reproduce and the ~ - following message to linedit-devel at common-lisp.net:~ - ~ - `Invariant ~S violated.'" - ',condition))))) + (let ((*print-pretty* nil)) + (error "BUG: You seem to have found a bug in Linedit. Please report~ + this incident along with directions to reproduce and the ~ + following message to linedit-devel at common-lisp.net:~ + ~ + `Invariant ~S violated.'" + ',condition)))))) (defmacro ensure (symbol expr) `(or ,symbol (setf ,symbol ,expr))) Index: src/version.lisp-expr diff -u src/version.lisp-expr:1.12 src/version.lisp-expr:1.13 --- src/version.lisp-expr:1.12 Fri Mar 5 13:58:58 2004 +++ src/version.lisp-expr Mon Apr 12 08:38:41 2004 @@ -1 +1 @@ -0.15.9 +0.15.10 From nsiivola at common-lisp.net Mon Apr 12 13:34:51 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Mon, 12 Apr 2004 09:34:51 -0400 Subject: [Linedit-cvs] CVS update: src/editor.lisp src/linedit.asd src/terminal-translations.lisp src/utility-functions.lisp src/version.lisp-expr Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv3774 Modified Files: editor.lisp linedit.asd terminal-translations.lisp utility-functions.lisp version.lisp-expr Log Message: Be nicer when updating terminal translations in a live system, put linedit::*debug* in a better place. Date: Mon Apr 12 09:34:50 2004 Author: nsiivola Index: src/editor.lisp diff -u src/editor.lisp:1.13 src/editor.lisp:1.14 --- src/editor.lisp:1.13 Fri Mar 5 17:10:59 2004 +++ src/editor.lisp Mon Apr 12 09:34:50 2004 @@ -29,7 +29,6 @@ (defvar *history* nil) (defvar *killring* nil) -(defvar *debug* nil) (defclass editor (line rewindable) ((commands :reader editor-commands Index: src/linedit.asd diff -u src/linedit.asd:1.29 src/linedit.asd:1.30 --- src/linedit.asd:1.29 Mon Apr 12 08:38:41 2004 +++ src/linedit.asd Mon Apr 12 09:34:50 2004 @@ -54,7 +54,7 @@ (error 'operation-error :component c :operation o))) (defsystem :linedit - :version "0.15.10" + :version "0.15.11" :depends-on (:uffi :terminfo :osicat) :components (;; Common Index: src/terminal-translations.lisp diff -u src/terminal-translations.lisp:1.4 src/terminal-translations.lisp:1.5 --- src/terminal-translations.lisp:1.4 Fri Mar 5 04:21:46 2004 +++ src/terminal-translations.lisp Mon Apr 12 09:34:50 2004 @@ -25,8 +25,9 @@ (defmacro deftrans (name &rest chords) `(dolist (chord ',chords) - (when (gethash chord *terminal-translations*) - (warn "Multiple translations for ~A." chord)) + (let ((old (gethash chord *terminal-translations*))) + (when (and old (not (equal old ,name))) + (warn "Overriding old translation ~S for ~S with ~S." old chord ,name))) (setf (gethash chord *terminal-translations*) ,name))) (deftrans "C-Space" 0) Index: src/utility-functions.lisp diff -u src/utility-functions.lisp:1.11 src/utility-functions.lisp:1.12 --- src/utility-functions.lisp:1.11 Mon Apr 12 08:38:41 2004 +++ src/utility-functions.lisp Mon Apr 12 09:34:50 2004 @@ -24,6 +24,8 @@ (declaim (type simple-string *word-delimiters*)) (defparameter *word-delimiters* "()[]{}',` \"") +(defvar *debug* nil) + (defun required () (error "Required argument missing.")) Index: src/version.lisp-expr diff -u src/version.lisp-expr:1.13 src/version.lisp-expr:1.14 --- src/version.lisp-expr:1.13 Mon Apr 12 08:38:41 2004 +++ src/version.lisp-expr Mon Apr 12 09:34:50 2004 @@ -1 +1 @@ -0.15.10 +0.15.11 From jsquires at common-lisp.net Fri Apr 23 02:33:19 2004 From: jsquires at common-lisp.net (Julian E. C. Squires) Date: Thu, 22 Apr 2004 22:33:19 -0400 Subject: [Linedit-cvs] CVS update: src/command-functions.lisp src/command-keys.lisp src/complete.lisp src/terminal-translations.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv21248 Modified Files: command-functions.lisp command-keys.lisp complete.lisp terminal-translations.lisp Log Message: Added unimplemented stubs for sexp motion commands. * Added homedir (~ and ~user) completion. Requires latest osicat. * Added preliminary close-all-sexps, bound to C-O. Date: Thu Apr 22 22:33:19 2004 Author: jsquires Index: src/command-functions.lisp diff -u src/command-functions.lisp:1.9 src/command-functions.lisp:1.10 --- src/command-functions.lisp:1.9 Fri Mar 5 04:34:00 2004 +++ src/command-functions.lisp Thu Apr 22 22:33:18 2004 @@ -200,6 +200,26 @@ ;; accessors. Why? Was I not thinking, or am I not thinking now? (setf (editor-mark editor) (get-point editor))) +;;; SEXP MOTION + +;; FIXME: all of these only operate on the current editing line. +;; Also, obviously, all save close-all-sexp are unimplemented. + +(defun forward-sexp (chord editor) + (declare (ignore chord editor)) nil) + +(defun backward-sexp (chord editor) + (declare (ignore chord editor)) nil) + +(defun kill-sexp (chord editor) + (declare (ignore chord editor)) nil) + +(defun close-all-sexp (chord editor) + (move-to-eol chord editor) + (do ((string (get-string editor) (get-string editor))) + ((not (find-open-paren string (length string)))) + (add-char #\) editor))) + ;;; SIGNALS (defun interrupt-lisp (chord editor) Index: src/command-keys.lisp diff -u src/command-keys.lisp:1.6 src/command-keys.lisp:1.7 --- src/command-keys.lisp:1.6 Mon Oct 20 14:14:31 2003 +++ src/command-keys.lisp Thu Apr 22 22:33:18 2004 @@ -38,7 +38,7 @@ (defcommand "C-K" 'kill-to-eol) (defcommand "C-L") (defcommand "C-N" 'history-next) -(defcommand "C-O") +(defcommand "C-O" 'close-all-sexp) (defcommand "C-P" 'history-previous) (defcommand "C-Q") (defcommand "C-R") @@ -88,6 +88,10 @@ (defcommand "M-8") (defcommand "M-9") (defcommand "M-0") + +(defcommand "C-M-b" 'backward-sexp) +(defcommand "C-M-f" 'forward-sexp) +(defcommand "C-M-k" 'kill-sexp) (defcommand "C-Space" 'set-mark) (defcommand "C-Backspace" 'delete-word-backwards) Index: src/complete.lisp diff -u src/complete.lisp:1.6 src/complete.lisp:1.7 --- src/complete.lisp:1.6 Mon Apr 12 08:38:41 2004 +++ src/complete.lisp Thu Apr 22 22:33:18 2004 @@ -83,12 +83,31 @@ (<= (length common) (length string))) (return (values all max)) (return (values (list common) (length common)))))))))))))))) - + +;; We can't easily do zsh-style tab-completion of ~us into ~user, but +;; at least we can expand ~ and ~user. The other bug here at the +;; moment is that ~nonexistant will complete to the same as ~. +(defun tilde-expand-string (string) + "Returns the supplied string, with a prefix of ~ or ~user expanded +to the appropriate home directory." + (if (and (> (length string) 0) + (eql (schar string 0) #\~)) + (flet ((chop (s) (subseq s 0 (1- (length s))))) + (let* ((slash-idx (loop for i below (length string) + when (eql (schar string i) #\/) return i)) + (suffix (and slash-idx (subseq string slash-idx))) + (uname (subseq string 1 slash-idx)) + (homedir (or (cdr (assoc :home (osicat:user-info uname))) + (chop (namestring (user-homedir-pathname)))))) + (concatenate 'string homedir (or suffix "")))) + string)) + (defun directory-complete (string) (declare (simple-string string)) (let* ((common nil) (all nil) (max 0) + (string (tilde-expand-string string)) (dir (pathname-directory-pathname string)) (namefun (if (relative-pathname-p string) #'namestring Index: src/terminal-translations.lisp diff -u src/terminal-translations.lisp:1.5 src/terminal-translations.lisp:1.6 --- src/terminal-translations.lisp:1.5 Mon Apr 12 09:34:50 2004 +++ src/terminal-translations.lisp Thu Apr 22 22:33:18 2004 @@ -96,6 +96,10 @@ (deftrans "M-8" (#\Esc #\8) 184) (deftrans "M-9" (#\Esc #\9) 185) +(deftrans "C-M-f" (#\Esc #\Ack)) +(deftrans "C-M-b" (#\Esc #\Stx)) +(deftrans "C-M-k" (#\Esc #\Vt)) + (deftrans "Up-arrow" (#\Esc #\[ #\A)) (deftrans "Down-arrow" (#\Esc #\[ #\B)) (deftrans "Right-arrow" (#\Esc #\[ #\C)) From jsquires at common-lisp.net Sat Apr 24 15:41:03 2004 From: jsquires at common-lisp.net (Julian E. C. Squires) Date: Sat, 24 Apr 2004 11:41:03 -0400 Subject: [Linedit-cvs] CVS update: src/command-functions.lisp src/editor.lisp src/line.lisp src/matcher.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv16128 Modified Files: command-functions.lisp editor.lisp line.lisp matcher.lisp Log Message: Fixed bug where point could get a screwy value by moving through history. Improved quoted string detection a little. * Added basic sexp-motion commands. Date: Sat Apr 24 11:41:02 2004 Author: jsquires Index: src/command-functions.lisp diff -u src/command-functions.lisp:1.10 src/command-functions.lisp:1.11 --- src/command-functions.lisp:1.10 Thu Apr 22 22:33:18 2004 +++ src/command-functions.lisp Sat Apr 24 11:41:02 2004 @@ -202,23 +202,36 @@ ;;; SEXP MOTION -;; FIXME: all of these only operate on the current editing line. -;; Also, obviously, all save close-all-sexp are unimplemented. - (defun forward-sexp (chord editor) - (declare (ignore chord editor)) nil) + (declare (ignore chord)) + (setf (get-point editor) (editor-sexp-end editor))) (defun backward-sexp (chord editor) - (declare (ignore chord editor)) nil) + (declare (ignore chord)) + (setf (get-point editor) (editor-sexp-start editor))) +;; FIXME: KILL-SEXP is fairly broken, but works for enough of my +;; common use cases. Most of its flaws lie in how the EDITOR-SEXP- +;; functions deal with objects other than lists and strings. (defun kill-sexp (chord editor) - (declare (ignore chord editor)) nil) + (declare (ignore chord)) + (with-editor-point-and-string ((point string) editor) + (let ((start (editor-sexp-start editor)) + (end (min (1+ (editor-sexp-end editor)) (length string)))) + (buffer-push (subseq string start end) (editor-killring editor)) + (setf (get-string editor) (concat (subseq string 0 start) + (subseq string end)) + (get-point editor) start)))) (defun close-all-sexp (chord editor) (move-to-eol chord editor) (do ((string (get-string editor) (get-string editor))) ((not (find-open-paren string (length string)))) - (add-char #\) editor))) + (add-char (case (schar string (find-open-paren string (length string))) + (#\( #\)) + (#\[ #\]) + (#\{ #\})) + editor))) ;;; SIGNALS Index: src/editor.lisp diff -u src/editor.lisp:1.14 src/editor.lisp:1.15 --- src/editor.lisp:1.14 Mon Apr 12 09:34:50 2004 +++ src/editor.lisp Sat Apr 24 11:41:02 2004 @@ -195,6 +195,31 @@ (dbg "~&editor-word: ~S - ~S~%" start end) (subseq (get-string editor) start end))) +(defun editor-sexp-start (editor) + (with-editor-point-and-string ((point string) editor) + (setf point (loop for n from (min point (1- (length string))) downto 0 + when (not (whitespacep (schar string n))) + return n)) + (case (and point (schar string point)) + ((#\) #\] #\}) (or (find-open-paren string point) 0)) + ((#\( #\[ #\{) (max (1- point) 0)) + (#\" (or (find-open-quote string point) + (max (1- point) 0))) + (t (editor-previous-word-start editor))))) + +(defun editor-sexp-end (editor) + (with-editor-point-and-string ((point string) editor) + (setf point (loop for n from point below (length string) + when (not (whitespacep (schar string n))) + return n)) + (case (and point (schar string point)) + ((#\( #\[ #\{) (or (find-close-paren string point) + (length string))) + ((#\) #\] #\}) (min (1+ point) (length string))) + (#\" (or (find-close-quote string (1+ point)) + (min (1+ point) (length string)))) + (t (editor-next-word-end editor))))) + (defun editor-complete (editor) (funcall (editor-completer editor) (editor-word editor) editor)) @@ -217,5 +242,4 @@ (get-point editor) (+ start (length word)))))) (defun in-quoted-string-p (editor) - (let ((i (editor-word-start editor))) - (and (plusp i) (eql #\" (schar (get-string editor) (1- i)))))) + (quoted-p (get-string editor) (get-point editor))) Index: src/line.lisp diff -u src/line.lisp:1.3 src/line.lisp:1.4 --- src/line.lisp:1.3 Mon Oct 20 11:34:03 2003 +++ src/line.lisp Sat Apr 24 11:41:02 2004 @@ -25,6 +25,11 @@ ((string :accessor get-string :initform "" :initarg :string) (point :accessor get-point :initform 0 :initarg :point))) +(defmethod (setf get-string) :around (string line) + (prog1 (call-next-method) + (when (>= (get-point line) (length string)) + (setf (get-point line) (length string))))) + (defmethod (setf get-point) :around (point line) (when (<= 0 point (length (get-string line))) (call-next-method))) Index: src/matcher.lisp diff -u src/matcher.lisp:1.4 src/matcher.lisp:1.5 --- src/matcher.lisp:1.4 Sat Feb 28 07:11:16 2004 +++ src/matcher.lisp Sat Apr 24 11:41:02 2004 @@ -21,6 +21,28 @@ (in-package :linedit) +;;;; QUOTES + +;; FIXME: should checking for #\", "\"", et cetera. + +(defun quoted-p (string index) + (let ((quoted-p nil)) + (dotimes (n (min index (length string)) quoted-p) + (when (eql (schar string n) #\") + (setf quoted-p (not quoted-p)))))) + +(defun find-open-quote (string index) + (when (quoted-p string index) + (loop for n from (1- index) downto 0 + when (eql (schar string n) #\") return n))) + +(defun find-close-quote (string index) + (when (quoted-p string index) + (loop for n from (1+ index) below (length string) + when (eql (schar string n) #\") return n))) + +;;;; PARENS + ;; FIXME: This is not the Right Way to do paren matching. ;; * use stack, not counting ;; * don't count #\( #\) &co @@ -76,4 +98,3 @@ "")) string) open))) - From nsiivola at common-lisp.net Sun Apr 25 11:40:18 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Sun, 25 Apr 2004 07:40:18 -0400 Subject: [Linedit-cvs] CVS update: src/complete.lisp src/utility-functions.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv32280 Modified Files: complete.lisp utility-functions.lisp Log Message: * Fixed a bug in completion (when completion was attempted on a fully completed name) * Default of :if-exists :append to start-debug Date: Sun Apr 25 07:40:18 2004 Author: nsiivola Index: src/complete.lisp diff -u src/complete.lisp:1.7 src/complete.lisp:1.8 --- src/complete.lisp:1.7 Thu Apr 22 22:33:18 2004 +++ src/complete.lisp Sun Apr 25 07:40:18 2004 @@ -73,12 +73,12 @@ with max for cand in matches do (let ((diff (mismatch string cand))) - (unless (< diff (length string)) - (setf common (if common - (subseq common 0 (mismatch common cand)) - cand) - max (max max (length cand)) - all (cons cand all)))) + (when (and diff (> diff (length string))) + (setf common (if common + (subseq common 0 (mismatch common cand)) + cand) + max (max max (length cand)) + all (cons cand all)))) finally (if (or (null common) (<= (length common) (length string))) (return (values all max)) @@ -121,7 +121,7 @@ do (let* ((full (funcall namefun entry)) (diff (mismatch string full))) (dbg "~& completed: ~A, diff: ~A~%" full diff) - (unless (< diff (length string)) + (unless (and diff (< diff (length string))) (dbg "~& common ~A mismatch ~A~&" common (mismatch common full)) (setf common (if common Index: src/utility-functions.lisp diff -u src/utility-functions.lisp:1.12 src/utility-functions.lisp:1.13 --- src/utility-functions.lisp:1.12 Mon Apr 12 09:34:50 2004 +++ src/utility-functions.lisp Sun Apr 25 07:40:18 2004 @@ -50,7 +50,9 @@ (defun start-debug (pathname &rest open-args) "Start linedit debugging output to pathname, with additional open-args passed to `open'." - (setf *debug* (apply #'open pathname :direction :output open-args))) + (setf *debug* (apply #'open pathname + :direction :output + (append open-args '(:if-exists :append))))) (defun end-debug () "End linedit debugging output." From nsiivola at common-lisp.net Sun Apr 25 12:25:47 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Sun, 25 Apr 2004 08:25:47 -0400 Subject: [Linedit-cvs] CVS update: src/backend.lisp src/linedit.asd src/version.lisp-expr Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv31104 Modified Files: backend.lisp linedit.asd version.lisp-expr Log Message: * Incremented version number in preparation for release. Date: Sun Apr 25 08:25:47 2004 Author: nsiivola Index: src/backend.lisp diff -u src/backend.lisp:1.6 src/backend.lisp:1.7 --- src/backend.lisp:1.6 Thu Mar 4 08:52:53 2004 +++ src/backend.lisp Sun Apr 25 08:25:47 2004 @@ -1,4 +1,4 @@ -;; Copyright (c) 2003 Nikodemus Siivola +;; Copyright (c) 2003, 2004 Nikodemus Siivola ;; ;; Permission is hereby granted, free of charge, to any person obtaining ;; a copy of this software and associated documentation files (the Index: src/linedit.asd diff -u src/linedit.asd:1.30 src/linedit.asd:1.31 --- src/linedit.asd:1.30 Mon Apr 12 09:34:50 2004 +++ src/linedit.asd Sun Apr 25 08:25:47 2004 @@ -54,7 +54,7 @@ (error 'operation-error :component c :operation o))) (defsystem :linedit - :version "0.15.11" + :version "0.15.12" :depends-on (:uffi :terminfo :osicat) :components (;; Common Index: src/version.lisp-expr diff -u src/version.lisp-expr:1.14 src/version.lisp-expr:1.15 --- src/version.lisp-expr:1.14 Mon Apr 12 09:34:50 2004 +++ src/version.lisp-expr Sun Apr 25 08:25:47 2004 @@ -1 +1 @@ -0.15.11 +0.15.12 From nsiivola at common-lisp.net Sun Apr 25 13:53:28 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Sun, 25 Apr 2004 09:53:28 -0400 Subject: [Linedit-cvs] CVS update: src/complete.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv11107 Modified Files: complete.lisp Log Message: * Define RELATIVE-PATHNAME-P conditionally. Date: Sun Apr 25 09:53:27 2004 Author: nsiivola Index: src/complete.lisp diff -u src/complete.lisp:1.8 src/complete.lisp:1.9 --- src/complete.lisp:1.8 Sun Apr 25 07:40:18 2004 +++ src/complete.lisp Sun Apr 25 09:53:27 2004 @@ -31,10 +31,13 @@ (:symbolic-link (file-kind (merge-pathnames (read-link pathname) pathname))))) -(defun relative-pathname-p (pathname) - (let ((dir (pathname-directory pathname))) - (or (null dir) - (eq :relative (car dir))))) +;;; KLUDGE: now exported from Osicat, but will work with older versions +;;; for a while. +#.(when (eq (find-package :osicat) (symbol-package 'relative-pathname-p)) + '(defun relative-pathname-p (pathname) + (let ((dir (pathname-directory pathname))) + (or (null dir) + (eq :relative (car dir)))))) (defun logical-pathname-p (pathname) (typep (pathname pathname) 'logical-pathname)) From nsiivola at common-lisp.net Sun Apr 25 14:43:03 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Sun, 25 Apr 2004 10:43:03 -0400 Subject: [Linedit-cvs] CVS update: src/LICENSE src/command-functions.lisp src/command-keys.lisp src/complete.lisp src/editor.lisp src/line.lisp src/matcher.lisp src/packages.lisp src/terminal-translations.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv14999 Modified Files: LICENSE command-functions.lisp command-keys.lisp complete.lisp editor.lisp line.lisp matcher.lisp packages.lisp terminal-translations.lisp Log Message: * Copyright updates: add 2004 and Julian. * Make the dependency on Osicat 0.4.0 explicit. Yuk. Asdf/asdf-install should grow version management... Date: Sun Apr 25 10:43:02 2004 Author: nsiivola Index: src/LICENSE diff -u src/LICENSE:1.1.1.1 src/LICENSE:1.2 --- src/LICENSE:1.1.1.1 Wed Aug 13 17:05:41 2003 +++ src/LICENSE Sun Apr 25 10:43:02 2004 @@ -1,20 +1,20 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (c) 2003, 2004 Nikodemus Siivola + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Index: src/command-functions.lisp diff -u src/command-functions.lisp:1.11 src/command-functions.lisp:1.12 --- src/command-functions.lisp:1.11 Sat Apr 24 11:41:02 2004 +++ src/command-functions.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) Index: src/command-keys.lisp diff -u src/command-keys.lisp:1.7 src/command-keys.lisp:1.8 --- src/command-keys.lisp:1.7 Thu Apr 22 22:33:18 2004 +++ src/command-keys.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) Index: src/complete.lisp diff -u src/complete.lisp:1.9 src/complete.lisp:1.10 --- src/complete.lisp:1.9 Sun Apr 25 09:53:27 2004 +++ src/complete.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) @@ -31,14 +31,6 @@ (:symbolic-link (file-kind (merge-pathnames (read-link pathname) pathname))))) -;;; KLUDGE: now exported from Osicat, but will work with older versions -;;; for a while. -#.(when (eq (find-package :osicat) (symbol-package 'relative-pathname-p)) - '(defun relative-pathname-p (pathname) - (let ((dir (pathname-directory pathname))) - (or (null dir) - (eq :relative (car dir)))))) - (defun logical-pathname-p (pathname) (typep (pathname pathname) 'logical-pathname)) @@ -87,9 +79,9 @@ (return (values all max)) (return (values (list common) (length common)))))))))))))))) -;; We can't easily do zsh-style tab-completion of ~us into ~user, but -;; at least we can expand ~ and ~user. The other bug here at the -;; moment is that ~nonexistant will complete to the same as ~. +;;; We can't easily do zsh-style tab-completion of ~us into ~user, but +;;; at least we can expand ~ and ~user. The other bug here at the +;;; moment is that ~nonexistant will complete to the same as ~. (defun tilde-expand-string (string) "Returns the supplied string, with a prefix of ~ or ~user expanded to the appropriate home directory." @@ -100,7 +92,7 @@ when (eql (schar string i) #\/) return i)) (suffix (and slash-idx (subseq string slash-idx))) (uname (subseq string 1 slash-idx)) - (homedir (or (cdr (assoc :home (osicat:user-info uname))) + (homedir (or (cdr (assoc :home (user-info uname))) (chop (namestring (user-homedir-pathname)))))) (concatenate 'string homedir (or suffix "")))) string)) Index: src/editor.lisp diff -u src/editor.lisp:1.15 src/editor.lisp:1.16 --- src/editor.lisp:1.15 Sat Apr 24 11:41:02 2004 +++ src/editor.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) Index: src/line.lisp diff -u src/line.lisp:1.4 src/line.lisp:1.5 --- src/line.lisp:1.4 Sat Apr 24 11:41:02 2004 +++ src/line.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) Index: src/matcher.lisp diff -u src/matcher.lisp:1.5 src/matcher.lisp:1.6 --- src/matcher.lisp:1.5 Sat Apr 24 11:41:02 2004 +++ src/matcher.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) Index: src/packages.lisp diff -u src/packages.lisp:1.17 src/packages.lisp:1.18 --- src/packages.lisp:1.17 Mon Apr 12 08:38:41 2004 +++ src/packages.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,37 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +;;;; Check requirements -- this might be best done in a separate file, +;;;; or an asdf method. +#.(cond + ((stringp osicat:*osicat-version*) + (error "This version of Linedit requires Osicat version 0.4.0 or later, +but current Osicat version is ~A." osicat:*osicat-version*)) + ((consp osicat:*osicat-version*) + (unless (<= 4 (second osicat:*osicat-version*)) + (error "This version of Linedit requires Osicat version 0.4.0 or later, +but current Osicat version is ~{~A~^.~}." osicat:*osicat-version*))) + (t (error "No Osicat version found."))) + +;;;; Package (defpackage :linedit (:use :cl :osicat) @@ -31,3 +45,4 @@ #:start-debug #:end-debug )) + Index: src/terminal-translations.lisp diff -u src/terminal-translations.lisp:1.6 src/terminal-translations.lisp:1.7 --- src/terminal-translations.lisp:1.6 Thu Apr 22 22:33:18 2004 +++ src/terminal-translations.lisp Sun Apr 25 10:43:02 2004 @@ -1,23 +1,23 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; -;; Permission is hereby granted, free of charge, to any person obtaining -;; a copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; +;;;; Permission is hereby granted, free of charge, to any person obtaining +;;;; a copy of this software and associated documentation files (the +;;;; "Software"), to deal in the Software without restriction, including +;;;; without limitation the rights to use, copy, modify, merge, publish, +;;;; distribute, sublicense, and/or sell copies of the Software, and to +;;;; permit persons to whom the Software is furnished to do so, subject to +;;;; the following conditions: +;;;; +;;;; The above copyright notice and this permission notice shall be included +;;;; in all copies or substantial portions of the Software. +;;;; +;;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;;;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;;;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;;;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;;;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (in-package :linedit) From nsiivola at common-lisp.net Sun Apr 25 15:03:27 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Sun, 25 Apr 2004 11:03:27 -0400 Subject: [Linedit-cvs] CVS update: src/command-functions.lisp src/command-keys.lisp src/complete.lisp src/editor.lisp src/line.lisp src/matcher.lisp src/terminal-translations.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv25792 Modified Files: command-functions.lisp command-keys.lisp complete.lisp editor.lisp line.lisp matcher.lisp terminal-translations.lisp Log Message: * Type Julian's name correctly Date: Sun Apr 25 11:03:26 2004 Author: nsiivola Index: src/command-functions.lisp diff -u src/command-functions.lisp:1.12 src/command-functions.lisp:1.13 --- src/command-functions.lisp:1.12 Sun Apr 25 10:43:02 2004 +++ src/command-functions.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/command-keys.lisp diff -u src/command-keys.lisp:1.8 src/command-keys.lisp:1.9 --- src/command-keys.lisp:1.8 Sun Apr 25 10:43:02 2004 +++ src/command-keys.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/complete.lisp diff -u src/complete.lisp:1.10 src/complete.lisp:1.11 --- src/complete.lisp:1.10 Sun Apr 25 10:43:02 2004 +++ src/complete.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/editor.lisp diff -u src/editor.lisp:1.16 src/editor.lisp:1.17 --- src/editor.lisp:1.16 Sun Apr 25 10:43:02 2004 +++ src/editor.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/line.lisp diff -u src/line.lisp:1.5 src/line.lisp:1.6 --- src/line.lisp:1.5 Sun Apr 25 10:43:02 2004 +++ src/line.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/matcher.lisp diff -u src/matcher.lisp:1.6 src/matcher.lisp:1.7 --- src/matcher.lisp:1.6 Sun Apr 25 10:43:02 2004 +++ src/matcher.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the Index: src/terminal-translations.lisp diff -u src/terminal-translations.lisp:1.7 src/terminal-translations.lisp:1.8 --- src/terminal-translations.lisp:1.7 Sun Apr 25 10:43:02 2004 +++ src/terminal-translations.lisp Sun Apr 25 11:03:26 2004 @@ -1,4 +1,4 @@ -;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian S. Quires +;;;; Copyright (c) 2003, 2004 Nikodemus Siivola, Julian Squires ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the From jsquires at common-lisp.net Tue Apr 27 19:56:54 2004 From: jsquires at common-lisp.net (Julian E. C. Squires) Date: Tue, 27 Apr 2004 15:56:54 -0400 Subject: [Linedit-cvs] CVS update: src/terminal-translations.lisp Message-ID: Update of /project/linedit/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv7002 Modified Files: terminal-translations.lisp Log Message: * Fixed encoding of C-M- keys, such that they work on my OS X machine, and lisps like openmcl where the control characters aren't named like #\Ack. Date: Tue Apr 27 15:56:54 2004 Author: jsquires Index: src/terminal-translations.lisp diff -u src/terminal-translations.lisp:1.8 src/terminal-translations.lisp:1.9 --- src/terminal-translations.lisp:1.8 Sun Apr 25 11:03:26 2004 +++ src/terminal-translations.lisp Tue Apr 27 15:56:54 2004 @@ -96,9 +96,9 @@ (deftrans "M-8" (#\Esc #\8) 184) (deftrans "M-9" (#\Esc #\9) 185) -(deftrans "C-M-f" (#\Esc #\Ack)) -(deftrans "C-M-b" (#\Esc #\Stx)) -(deftrans "C-M-k" (#\Esc #\Vt)) +(deftrans "C-M-f" (#\Esc #\^F) 134) +(deftrans "C-M-b" (#\Esc #\^B) 130) +(deftrans "C-M-k" (#\Esc #\^K) 139) (deftrans "Up-arrow" (#\Esc #\[ #\A)) (deftrans "Down-arrow" (#\Esc #\[ #\B))