home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume11 / test.el / part02 / tst-utilities.el < prev    next >
Lisp/Scheme  |  1987-09-08  |  568b  |  22 lines

  1. ;;; tst-utilities.el - handy defuns from the GnuTest project -*- emacs-lisp -*-
  2. ;;; Copyright (c) 1987 wang Institute of Graduate Studies
  3.  
  4. (defun last-line (&optional buffer)
  5.   "Returns number of lines in BUFFER (current-buffer if nil)"
  6.   (save-excursion
  7.    (set-buffer (or buffer (current-buffer)))
  8.    (count-lines (point-min) (point-max))
  9.    )
  10.   )
  11.   
  12. (defun current-line ()
  13.   "Returns current line number"
  14.   (1+ (count-lines (point-min) (point)))
  15.   )
  16.  
  17. (defun debug-on-error ()
  18.   "Sets the variable debug-on-error to t."
  19.   (interactive)
  20.   (setq debug-on-error t)
  21.   )
  22.