Extend M-x count-lines to show the number of characters in the region
authorChris Hanson <org/chris-hanson/cph>
Fri, 6 Jan 1995 01:08:00 +0000 (01:08 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 6 Jan 1995 01:08:00 +0000 (01:08 +0000)
as well as the number of lines.

v7/src/edwin/lincom.scm

index 12a016f2928005d1286f82993ad12f2dff1c1e89..83fba944311d9b14f40d784a9e9d24734fc5b89b 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/lincom.scm,v 1.120 1992/02/06 22:51:59 arthur Exp $
+;;;    $Id: lincom.scm,v 1.121 1995/01/06 01:08:00 cph Exp $
 ;;;
-;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
+;;;    Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
   "Type number of lines from point to mark."
   "r"
   (lambda (region)
-    (message "Region has " (region-count-lines region) " lines")))
+    (message "Region has "
+            (region-count-lines region)
+            " lines, "
+            (- (region-end-index region) (region-start-index region))
+            " characters.")))
 
 (define-command what-line
   "Print the current line number (in the buffer) of point."