Skip to content
Snippets Groups Projects
Commit 3b3cf6fd authored by chiles's avatar chiles
Browse files

Changed ARRAY-ELEMENT-FROM-MARK to use AREF for the Netnews stuff.  I
documented this to be an internal interface since a few other modes use it.
parent 5191b189
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/diredcoms.lisp,v 1.1.1.5 1991/02/08 16:33:52 ram Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/diredcoms.lisp,v 1.1.1.6 1991/07/26 10:17:14 chiles Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -777,15 +777,17 @@
(push (cons pathname (file-write-date pathname))
marked-files)))))))
;;; ARRAY-ELEMENT-FROM-MARK counts the lines between it and the beginning
;;; of the buffer. The number is used to index vector as if each line
;;; mapped to an element starting with the zero'th element (lines are
;;; numbered starting at 1).
;;; ARRAY-ELEMENT-FROM-MARK -- Internal Interface.
;;;
;;; This counts the lines between it and the beginning of the buffer. The
;;; number is used to index vector as if each line mapped to an element
;;; starting with the zero'th element (lines are numbered starting at 1).
;;; This must use AREF since some modes use this with extendable vectors.
;;;
(defun array-element-from-mark (mark vector
&optional (error-msg "Invalid line."))
(when (blank-line-p (mark-line mark)) (editor-error error-msg))
(svref vector
(aref vector
(1- (count-lines (region
(buffer-start-mark (line-buffer (mark-line mark)))
mark)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment