Article View: gnu.emacs.bug
Article #98635counting the number of chars in region
From: Stephen Gildea
Date: Wed, 17 Apr 1991 15:41
Date: Wed, 17 Apr 1991 15:41
28 lines
1714 bytes
1714 bytes
I have sometimes found it convenient to get a count of the number of
characters in the region. It seems to me that ESC = is a logical
place to add this functionality. Here are diffs from Emacs 18.57:
*** /usr/local/emacs/lisp/simple.el Wed Jan 9 17:04:21 1991
--- simple.el Tue Apr 16 17:05:17 1991
***************
*** 230,238 ****
(goto-char (point-min)))
(defun count-lines-region (start end)
! "Print number of lines in the region."
(interactive "r")
! (message "Region has %d lines" (count-lines start end)))
(defun what-line ()
"Print the current line number (in the buffer) of point."
--- 230,239 ----
(goto-char (point-min)))
(defun count-lines-region (start end)
! "Print number of lines and charcters in the region."
(interactive "r")
! (message "Region has %d lines, %d characters"
! (count-lines start end) (- end start)))
(defun what-line ()
"Print the current line number (in the buffer) of point."
Technical Details
Message-ID:
<9104171541.AA27165@alex.lcs.mit.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!ncar!gatech!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,a00a5e6e3251be5,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-04-17 23:23:22 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!ncar!gatech!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!unreplyable!garbage From: gildea@EXPO.LCS.MIT.EDU (Stephen Gildea) Newsgroups: gnu.emacs.bug Subject: counting the number of chars in region Message-ID: <9104171541.AA27165@alex.lcs.mit.edu> Date: 17 Apr 91 15:41:37 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: X Consortium, MIT Laboratory for Computer Science Lines: 28 Approved: bug-gnu-emacs@prep.ai.mit.edu