Commit fc44446e authored by Troels Henriksen's avatar Troels Henriksen

Major motion and editing functions and commands refactoring (see the

thread "paredit.lisp, regularization of motion commands, and more" on
climacs-devel for full details).

Breakage not found during testing, but still expected.
parent 7ebaf11b
This diff is collapsed.
......@@ -136,25 +136,17 @@ made to move a mark after the end of the buffer."))
(:documentation "Move `mark' `count' objects backwards. Returns
`mark'."))
(defmethod backward-object :around (mark &optional count)
(declare (ignore count))
(call-next-method)
mark)
(defmethod backward-object ((mark mark-mixin) &optional (count 1))
(decf (offset mark) count))
(defgeneric forward-object (mark &optional count)
(:documentation "Move `mark' `count' objects forwards. Returns
`mark'"))
(defmethod forward-object :around (mark &optional count)
(declare (ignore count))
(call-next-method)
mark)
(defmethod forward-object ((mark mark-mixin) &optional (count 1))
(incf (offset mark) count))
(incf (offset mark) count)
t)
(defmethod backward-object ((mark mark-mixin) &optional (count 1))
(decf (offset mark) count)
t)
(defclass standard-left-sticky-mark (left-sticky-mark mark-mixin) ()
(:documentation "A left-sticky-mark subclass suitable for use in a standard-buffer"))
......@@ -377,7 +369,7 @@ end of the buffer), nil otherwise."))
(defmethod beginning-of-line ((mark mark-mixin))
(loop until (beginning-of-line-p mark)
do (decf (offset mark))))
do (backward-object mark)))
(defgeneric end-of-line (mark)
(:documentation "Move the mark to the end of the line. The mark will be positioned
......@@ -432,6 +424,15 @@ at the end of the buffer if no following newline character exists. Returns mark.
(defmethod column-number ((mark mark-mixin))
(buffer-column-number (buffer mark) (offset mark)))
(defgeneric (setf column-number) (number mark)
(:documentation "Set the column number of the mark."))
(defmethod (setf column-number) (number mark)
(beginning-of-line mark)
(loop repeat number
until (end-of-line-p mark)
do (incf (offset mark))))
(defgeneric insert-buffer-object (buffer offset object)
(:documentation "Insert the object at the offset in the buffer. Any left-sticky marks
that are placed at the offset will remain positioned before the
......
......@@ -1006,7 +1006,7 @@
(incf valid-parse))))
(defmethod inter-lexeme-object-p ((lexer cl-lexer) object)
(whitespacep object))
(whitespacep (syntax (buffer lexer)) object))
(defmethod update-syntax (buffer (syntax cl-syntax))
(with-slots (lexer valid-parse) syntax
......@@ -1030,7 +1030,8 @@
(let ((space-width (space-width pane))
(tab-width (tab-width pane)))
(loop while (and (< start end)
(whitespacep (buffer-object buffer start)))
(whitespacep (syntax buffer)
(buffer-object buffer start)))
do (ecase (buffer-object buffer start)
(#\Newline (terpri pane)
(setf (aref *cursor-positions* (incf *current-line*))
......
......@@ -44,15 +44,17 @@
(:file "packages" :depends-on ("cl-automaton" "Persistent"))
(:file "buffer" :depends-on ("packages"))
(:file "motion" :depends-on ("packages" "buffer" "syntax"))
(:file "editing" :depends-on ("packages" "buffer" "syntax" "motion" "kill-ring"))
(:file "persistent-buffer"
:pathname #p"Persistent/persistent-buffer.lisp"
:depends-on ("packages" "buffer" "Persistent"))
(:file "base" :depends-on ("packages" "buffer" "persistent-buffer"))
(:file "base" :depends-on ("packages" "buffer" "persistent-buffer" "kill-ring"))
(:file "io" :depends-on ("packages" "buffer"))
(:file "abbrev" :depends-on ("packages" "buffer" "base"))
(:file "syntax" :depends-on ("packages" "buffer" "base"))
(:file "text-syntax" :depends-on ("packages" "base" "buffer" "syntax"))
(:file "text-syntax" :depends-on ("packages" "base" "buffer" "syntax" "motion"))
(:file "delegating-buffer" :depends-on ("packages" "buffer"))
(:file "kill-ring" :depends-on ("packages"))
(:file "undo" :depends-on ("packages"))
......@@ -72,12 +74,14 @@
"pane"))
(:file "lisp-syntax" :depends-on ("packages" "syntax" "buffer" "base" "pane"
"gui"))
(:file "lisp-syntax-commands" :depends-on ("lisp-syntax"))
(:file "lisp-syntax-commands" :depends-on ("lisp-syntax" "motion" "gui" "motion-commands" "editing-commands"))
(:file "gui" :depends-on ("packages" "syntax" "base" "buffer" "undo" "pane"
"kill-ring" "io" "text-syntax"
"abbrev" ))
"abbrev" "editing" "motion"))
;; (:file "buffer-commands" :depends-on ("gui"))
(:file "developer-commands" :depends-on ("gui" "lisp-syntax"))
(:file "motion-commands" :depends-on ("gui"))
(:file "editing-commands" :depends-on ("gui"))
(:file "file-commands" :depends-on ("gui"))
(:file "misc-commands" :depends-on ("gui"))
(:file "search-commands" :depends-on ("gui"))
......
This diff is collapsed.
This diff is collapsed.
......@@ -177,7 +177,7 @@
(let ((scan (beginning-of-buffer (clone-mark (point buffer)))))
;; skip the leading whitespace
(loop until (end-of-buffer-p scan)
until (not (whitespacep (object-after scan)))
until (not (whitespacep (syntax buffer) (object-after scan)))
do (forward-object scan))
;; stop looking if we're already 1,000 objects into the buffer
(unless (> (offset scan) 1000)
......
......@@ -192,12 +192,6 @@
;;;
;;; exploit the parse
(defmethod backward-expression (mark (syntax fundamental-syntax))
nil)
(defmethod forward-expression (mark (syntax fundamental-syntax))
nil)
;; do this better
(defmethod syntax-line-indentation (mark tab-width (syntax fundamental-syntax))
0)
......@@ -311,8 +311,6 @@
(declare (ignore region))
(redisplay-frame-pane *application-frame* pane))
(defvar *kill-ring* (make-instance 'kill-ring :max-size 7))
(defmethod execute-frame-command :around ((frame climacs) command)
(let ((current-window (car (windows frame))))
(handler-case
......
......@@ -675,7 +675,7 @@
(incf valid-parse))))
(defmethod inter-lexeme-object-p ((lexer html-lexer) object)
(whitespacep object))
(whitespacep (syntax (buffer lexer)) object))
(defmethod update-syntax (buffer (syntax html-syntax))
(with-slots (lexer valid-parse) syntax
......
......@@ -30,16 +30,26 @@
(in-package :climacs-lisp-syntax)
;; Movement commands.
(climacs-motion-commands:define-motion-commands expression lisp-table)
(climacs-motion-commands:define-motion-commands definition lisp-table)
(climacs-motion-commands:define-motion-commands up lisp-table
:noun "nesting level up"
:plural "levels")
(climacs-motion-commands:define-motion-commands down lisp-table
:noun "nesting level down"
:plural "levels")
(climacs-motion-commands:define-motion-commands list lisp-table)
(climacs-editing-commands:define-editing-commands expression lisp-table)
(climacs-editing-commands:define-deletion-commands expression lisp-table)
(define-command (com-eval-defun :name t :command-table lisp-table) ()
(let* ((pane (current-window))
(point (point pane))
(syntax (syntax (buffer pane))))
(eval-defun point syntax)))
(esa:set-key 'com-eval-defun
'lisp-table
'((#\x :control :meta)))
(define-command (com-package :name t :command-table lisp-table) ()
(let* ((pane (current-window))
(syntax (syntax (buffer pane)))
......@@ -62,35 +72,74 @@ string at point."
(when (typep token 'string-form)
(with-accessors ((offset1 start-offset)
(offset2 end-offset)) token
(fill-region (make-instance 'standard-right-sticky-mark
:buffer implementation
:offset offset1)
(make-instance 'standard-right-sticky-mark
:buffer implementation
:offset offset2)
#'(lambda (mark)
(syntax-line-indentation mark tab-width syntax))
fill-column
tab-width
t)))))
(esa:set-key 'com-fill-paragraph
'lisp-table
'((#\q :meta)))
(climacs-editing:fill-region (make-instance 'standard-right-sticky-mark
:buffer implementation
:offset offset1)
(make-instance 'standard-right-sticky-mark
:buffer implementation
:offset offset2)
#'(lambda (mark)
(syntax-line-indentation mark tab-width syntax))
fill-column
tab-width
syntax
t)))))
(define-command (com-indent-expression :name t :command-table lisp-table)
((count 'integer :prompt "Number of expressions"))
(let* ((pane (current-window))
(point (point pane))
(mark (clone-mark point))
(syntax (syntax (buffer pane)))
(view (stream-default-view pane))
(tab-space-count (tab-space-count view)))
(syntax (syntax (buffer pane))))
(if (plusp count)
(loop repeat count do (forward-expression mark syntax))
(loop repeat (- count) do (backward-expression mark syntax)))
(indent-region pane (clone-mark point) mark)))
(climacs-editing:indent-region pane (clone-mark point) mark)))
(esa:set-key 'com-fill-paragraph
'lisp-table
'((#\q :meta)))
(esa:set-key 'com-eval-defun
'lisp-table
'((#\x :control :meta)))
(esa:set-key `(com-indent-expression ,*numeric-argument-marker*)
'lisp-table
'((#\q :meta :control)))
\ No newline at end of file
'((#\q :meta :control)))
(esa:set-key `(com-backward-up ,*numeric-argument-marker*)
'lisp-table
'((#\u :control :meta)))
(esa:set-key `(com-forward-down ,*numeric-argument-marker*)
'lisp-table
'((#\d :control :meta)))
(esa:set-key `(com-backward-expression ,*numeric-argument-marker*)
'lisp-table
'((#\b :control :meta)))
(esa:set-key `(com-forward-expression ,*numeric-argument-marker*)
'lisp-table
'((#\f :control :meta)))
(esa:set-key `(com-backward-definition ,*numeric-argument-marker*)
'lisp-table
'((#\a :control :meta)))
(esa:set-key `(com-forward-definition ,*numeric-argument-marker*)
'lisp-table
'((#\e :control :meta)))
(esa:set-key `(com-forward-list ,*numeric-argument-marker*)
'lisp-table
'((#\n :control :meta)))
(esa:set-key `(com-backward-list ,*numeric-argument-marker*)
'lisp-table
'((#\p :control :meta)))
(esa:set-key `(com-kill-expression ,*numeric-argument-marker*)
'lisp-table
'((#\k :control :meta)))
\ No newline at end of file
......@@ -246,7 +246,7 @@
(macrolet ((fo () `(forward-object scan)))
(loop when (end-of-buffer-p scan)
do (return nil)
until (not (whitespacep (object-after scan)))
until (not (whitespacep syntax (object-after scan)))
do (fo)
finally (return t))))
......@@ -434,7 +434,7 @@
(defmethod skip-inter ((syntax lisp-syntax) (state lexer-line-comment-state) scan)
(macrolet ((fo () `(forward-object scan)))
(loop until (or (end-of-line-p scan)
(not (whitespacep (object-after scan))))
(not (whitespacep syntax (object-after scan))))
do (fo)
finally (return t))))
......@@ -520,7 +520,7 @@
(fo)
(go start))
(if (evenp bars-seen)
(unless (whitespacep (object-after scan))
(unless (whitespacep syntax (object-after scan))
(fo)
(go start))
(when (constituentp (object-after scan))
......@@ -1823,47 +1823,57 @@ be found, return nil."
(when (not (null list-child))
(funcall fn list-child)))))
(defmethod backward-expression (mark (syntax lisp-syntax))
(defmethod backward-one-expression (mark (syntax lisp-syntax))
(let ((potential-form (or (form-before syntax (offset mark))
(form-around syntax (offset mark)))))
(if potential-form
(setf (offset mark) (start-offset potential-form))
(error 'no-expression))))
(defmethod forward-expression (mark (syntax lisp-syntax))
(defmethod forward-one-expression (mark (syntax lisp-syntax))
(let ((potential-form (or (form-after syntax (offset mark))
(form-around syntax (offset mark)))))
(if potential-form
(setf (offset mark) (end-offset potential-form))
(error 'no-expression))))
(defmethod forward-list (mark (syntax lisp-syntax))
(defgeneric forward-one-list (mark syntax)
(:documentation
"Move `mark' forward by one list.
Return T if successful, or NIL if the buffer limit was reached."))
(defmethod forward-one-list (mark (syntax lisp-syntax))
(loop for start = (offset mark)
then (end-offset potential-form)
for potential-form = (or (form-after syntax start)
(form-around syntax start))
until (or (null potential-form)
(and (= start
(end-offset potential-form))
(null (form-after syntax start))))
when (typep potential-form 'list-form)
do (setf (offset mark) (end-offset potential-form))
(return)
finally (error 'no-expression)))
(defmethod backward-list (mark (syntax lisp-syntax))
then (end-offset potential-form)
for potential-form = (or (form-after syntax start)
(form-around syntax start))
until (or (null potential-form)
(and (= start
(end-offset potential-form))
(null (form-after syntax start))))
when (typep potential-form 'list-form)
do (setf (offset mark) (end-offset potential-form))
(return t)))
(defgeneric backward-one-list (mark syntax)
(:documentation
"Move `mark' backward by one list. Return T if successful, or
NIL if the buffer limit was reached."))
(defmethod backward-one-list (mark (syntax lisp-syntax))
(loop for start = (offset mark)
then (start-offset potential-form)
for potential-form = (or (form-before syntax start)
(form-around syntax start))
until (or (null potential-form)
(and (= start
(start-offset potential-form))
(null (form-before syntax start))))
when (typep potential-form 'list-form)
do (setf (offset mark) (start-offset potential-form))
(return)
finally (error 'no-expression)))
then (start-offset potential-form)
for potential-form = (or (form-before syntax start)
(form-around syntax start))
until (or (null potential-form)
(and (= start
(start-offset potential-form))
(null (form-before syntax start))))
when (typep potential-form 'list-form)
do (setf (offset mark) (start-offset potential-form))
(return t)))
(climacs-motion:define-motion-fns list)
(defun down-list-by-fn (mark syntax fn)
(let* ((offset (offset mark))
......@@ -1876,31 +1886,30 @@ be found, return nil."
fn
offset)))))
(when new-offset
(setf (offset mark) (1+ new-offset))))))
(progn (setf (offset mark) (1+ new-offset)) t)))))
(defmethod down-list (mark (syntax lisp-syntax))
(defmethod forward-one-down (mark (syntax lisp-syntax))
(down-list-by-fn mark syntax #'start-offset))
(defmethod backward-down-list (mark (syntax lisp-syntax))
(defmethod backward-one-down (mark (syntax lisp-syntax))
(down-list-by-fn mark syntax #'end-offset)
(backward-object mark))
(backward-object mark syntax))
(defun up-list-by-fn (mark syntax fn)
(let ((form (or (form-before syntax (offset mark))
(form-after syntax (offset mark))
(form-around syntax (offset mark)))))
(if form
(when form
(let ((parent (parent form)))
(when (not (null parent))
(let ((new-offset (find-list-parent-offset parent fn)))
(when new-offset
(setf (offset mark) new-offset)))))
(error 'no-expression))))
(setf (offset mark) new-offset))))))))
(defmethod backward-up-list (mark (syntax lisp-syntax))
(defmethod backward-one-up (mark (syntax lisp-syntax))
(up-list-by-fn mark syntax #'start-offset))
(defmethod up-list (mark (syntax lisp-syntax))
(defmethod forward-one-up (mark (syntax lisp-syntax))
(up-list-by-fn mark syntax #'end-offset))
(defmethod eval-defun (mark (syntax lisp-syntax))
......@@ -1911,7 +1920,7 @@ be found, return nil."
do (return (eval (read-from-string
(token-string syntax form)))))))
(defmethod beginning-of-definition (mark (syntax lisp-syntax))
(defmethod backward-one-definition (mark (syntax lisp-syntax))
(with-slots (stack-top) syntax
(loop for form in (children stack-top)
with last-toplevel-list = nil
......@@ -1925,15 +1934,18 @@ be found, return nil."
when (typep form 'form)
do (setf last-toplevel-list form)
finally (when last-toplevel-list form
(setf (offset mark) (start-offset last-toplevel-list))))))
(setf (offset mark)
(start-offset last-toplevel-list))
(return t)))))
(defmethod end-of-definition (mark (syntax lisp-syntax))
(defmethod forward-one-definition (mark (syntax lisp-syntax))
(with-slots (stack-top) syntax
(loop for form in (children stack-top)
when (and (typep form 'form)
(mark< mark (end-offset form)))
do (setf (offset mark) (end-offset form))
(loop-finish))))
(loop-finish)
finally (return t))))
(defun in-type-p-in-children (children offset type)
(loop for child in children
......
This diff is collapsed.
;;; -*- Mode: Lisp; Package: CLIMACS-MOTION; -*-
;;; (c) copyright 2006 by
;;; Taylor R. Campbell (campbell@mumble.net)
;;; (c) copyright 2006 by
;;; Troels Henriksen (athas@sigkill.dk)
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Library General Public
;;; License as published by the Free Software Foundation; either
;;; version 2 of the License, or (at your option) any later version.
;;;
;;; This library is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; Library General Public License for more details.
;;;
;;; You should have received a copy of the GNU Library General Public
;;; License along with this library; if not, write to the
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;;; Boston, MA 02111-1307 USA.
;;; Commands for moving the mark around
;;; See information in motion.lisp
;;;
;;; Given the general motion functions FORWARD-<unit> and
;;; BACKWARD-<unit>,
;;;
;;; (DEFINE-MOTION-COMMANDS <unit> <command-table>)
;;;
;;; defines the motion commands Forward <unit> and Backward <unit> in
;;; <command-table>. The following keyword parameters are recognized:
;;;
;;; :NOUN
;;; Noun to use in the docstring: `Move point forward by one
;;; <noun>.' Default is the unit name, downcased.
;;;
;;; :PLURAL
;;; Plural form for the prompt, `Number of <plural>', and the rest
;;; of the docstring; e.g.: `With a numeric argument N, move point
;;; forward by N <plural>.'
;;;
(in-package :climacs-motion-commands)
(defmacro define-motion-commands (unit command-table &key
noun
plural)
(labels ((symbol (&rest strings)
(intern (apply #'concat strings)))
(concat (&rest strings)
(apply #'concatenate 'STRING (mapcar #'string strings))))
(let ((forward (symbol "FORWARD-" unit))
(backward (symbol "BACKWARD-" unit))
(com-forward (symbol "COM-FORWARD-" unit))
(com-backward (symbol "COM-BACKWARD-" unit))
(noun (or noun (string-downcase unit)))
(plural (or plural (concat (string-downcase unit) "s"))))
`(PROGN
(DEFINE-COMMAND (,com-forward :NAME T
:COMMAND-TABLE ,command-table)
((COUNT 'INTEGER :PROMPT ,(concat "Number of " plural)))
,(concat "Move point forward by one " noun ".
With a numeric argument N, move point forward by N " plural ".
With a negative argument -N, move point backward by N " plural ".")
(handler-case (,forward (POINT (CURRENT-WINDOW))
(SYNTAX (BUFFER (CURRENT-WINDOW)))
COUNT)
(motion-limit-error ()
(esa:display-message ,(concat "No more " plural)))))
(DEFINE-COMMAND (,com-backward
:NAME T
:COMMAND-TABLE ,command-table)
((COUNT 'INTEGER :PROMPT ,(concat "Number of " plural)))
,(concat "Move point backward by one " noun ".
With a numeric argument N, move point backward by N " plural ".
With a negative argument -N, move point forward by N " plural ".")
(handler-case (,backward (POINT (CURRENT-WINDOW))
(SYNTAX (BUFFER (CURRENT-WINDOW)))
COUNT)
(motion-limit-error ()
(esa:display-message ,(concat "No more " plural)))))))))
;;; Manually define some commands
(define-command (com-beginning-of-line :name t :command-table movement-table) ()
"Move point to the beginning of the current line."
(beginning-of-line (point (current-window))))
(define-command (com-end-of-line :name t :command-table movement-table) ()
"Move point to the end of the current line."
(end-of-line (point (current-window))))
;; Object movement comands - defined specially because FORWARD-OBJECT
;; and BACKWARD-OBJECT is part of the buffer protocol, not the
;; high-level motion abstraction.
(define-command (com-forward-object :name t :command-table movement-table)
((count 'integer :prompt "Number of objects"))
"Move point forward by one object.
With a numeric argument N, move point forward by N objects.
With a negative argument -N, move point backward by M objects."
(handler-case
(forward-object (point (current-window))
count)
(motion-limit-error nil
(display-message "No more objects"))))
(define-command (com-backward-object :name t :command-table movement-table)
((count 'integer :prompt "number of objects"))
"Move point backward by one object.
With a numeric argument N, move point backward by N objects.
With a negative argument -N, move point forward by N objects."
(handler-case
(backward-object (point (current-window))
count)
(motion-limit-error nil
(display-message "No more objects"))))
;;; Autogenerate commands
(define-motion-commands word movement-table)
(define-motion-commands line movement-table)
(define-motion-commands page movement-table)
(define-motion-commands paragraph movement-table)
(define-motion-commands sentence movement-table)
;;; Bind gestures to commands
(set-key `(com-forward-object ,*numeric-argument-marker*)
'movement-table
'((#\f :control)))
(set-key `(com-forward-object ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :right #-mcclim :right-arrow)))
(set-key `(com-backward-object ,*numeric-argument-marker*)
'movement-table
'((#\b :control)))
(set-key `(com-backward-object ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :left #-mcclim :left-arrow)))
(set-key `(com-forward-word ,*numeric-argument-marker*)
'movement-table
'((#\f :meta)))
(set-key `(com-forward-word ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :right #-mcclim :right-arrow :control)))
(set-key `(com-backward-word ,*numeric-argument-marker*)
'movement-table
'((#\b :meta)))
(set-key `(com-backward-word ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :left #-mcclim :left-arrow :control)))
(set-key `(com-forward-line ,*numeric-argument-marker*)
'movement-table
'((#\n :control)))
(set-key `(com-forward-line ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :down #-mcclim :down-arrow)))
(set-key `(com-backward-line ,*numeric-argument-marker*)
'movement-table
'((#\p :control)))
(set-key `(com-backward-line ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :up #-mcclim :up-arrow)))
(set-key 'com-beginning-of-line
'movement-table
'((:home)))
(set-key 'com-beginning-of-line
'movement-table
'((#\a :control)))
(set-key 'com-end-of-line
'movement-table
'((#\e :control)))
(set-key 'com-end-of-line
'movement-table
'((:end)))
(set-key `(com-forward-page ,*numeric-argument-marker*)
'movement-table
'((#\x :control) (#\])))
(set-key `(com-backward-page ,*numeric-argument-marker*)
'movement-table
'((#\x :control) (#\[)))
(set-key `(com-backward-paragraph ,*numeric-argument-marker*)
'movement-table
'((#\{ :shift :meta)))
(set-key `(com-backward-paragraph ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :up #-mcclim :up-arrow :control)))
(set-key `(com-forward-paragraph ,*numeric-argument-marker*)
'movement-table
'((#\} :shift :meta)))
(set-key `(com-forward-paragraph ,*numeric-argument-marker*)
'movement-table
'((#+mcclim :down #-mcclim :down-arrow :control)))
\ No newline at end of file
This diff is collapsed.
......@@ -32,7 +32,10 @@
#:invalid-motion #:motion-before-beginning #:motion-after-end
#:size #:number-of-lines
#:offset #:mark< #:mark<= #:mark= #:mark> #:mark>=
#:forward-object #:backward-object
#:forward-object
#:backward-object
#:forward-line-start #:backward-line-start
#:forward-line-end #:backward-line-end
#:beginning-of-buffer #:end-of-buffer
#:beginning-of-buffer-p #:end-of-buffer-p
#:beginning-of-line #:end-of-line
......@@ -47,44 +50,41 @@
#:buffer-object #:buffer-sequence
#:object-before #:object-after #:region-to-sequence
#:low-mark #:high-mark #:modified-p #:clear-modify
#:binseq-buffer #:obinseq-buffer #:binseq2-buffer
#:persistent-left-sticky-mark #:persistent-right-sticky-mark
#:persistent-left-sticky-line-mark #:persistent-right-sticky-line-mark
#:p-line-mark-mixin #:buffer-line-offset
#:delegating-buffer #:implementation))
(defpackage :climacs-kill-ring
(:use :clim-lisp :flexichain)
(:export #:kill-ring
#:kill-ring-length #:kill-ring-max-size
#:append-next-p
#:reset-yank-position #:rotate-yank-position #:kill-ring-yank
#:kill-ring-standard-push #:kill-ring-concatenating-push
#:kill-ring-reverse-concatenating-push))
(defpackage :climacs-base
(:use :clim-lisp :climacs-buffer)
(:use :clim-lisp :climacs-buffer :climacs-kill-ring)
(:export #:do-buffer-region
#:do-buffer-region-lines
#:previous-line #:next-line
#:open-line #:kill-line
#:empty-line-p
#:line-indentation
#:buffer-display-column
#:number-of-lines-in-region
#:constituentp #:whitespacep
#:constituentp
#:forward-word #:backward-word
#:delete-word #:backward-delete-word
#:buffer-region-case
#:upcase-buffer-region #:upcase-region
#:downcase-buffer-region #:downcase-region
#:capitalize-buffer-region #:capitalize-region
#:upcase-word #:downcase-word #:capitalize-word