From: Dave Pearson Newsgroups: comp.os.msdos.djgpp,comp.emacs Subject: Re: "shell" command in DJGPP Emacs? Date: 9 Oct 2002 11:50:04 GMT Organization: (davep 'org) Lines: 29 Message-ID: References: <3da26e84 DOT 3476875 AT news-server DOT optonline DOT net> <3da2bdfe DOT 2802949 AT news-server DOT optonline DOT net> <3da2c999 DOT 5774704 AT news-server DOT optonline DOT net> <3da36202 DOT 44798149 AT news-server DOT optonline DOT net> NNTP-Posting-Host: hagbard.davep.org X-Trace: news.demon.co.uk 1034164319 12820 158.152.34.118 (9 Oct 2002 11:51:59 GMT) X-Complaints-To: abuse AT demon DOT net NNTP-Posting-Date: 9 Oct 2002 11:50:04 GMT X-URL: http://www.davep.org/ User-Agent: slrn/0.9.7.4 (Linux) X-DDate: Boomtime, Day 63 of the season of Bureaucracy, Anno Mung 3168 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com * daniel gerard mcgrath : > On 8 Oct 2002 12:59:28 GMT, Dave Pearson wrote: > > >(defun count-lines-in-file (file) > > "Count lines in FILE. > > > >If called as an interactive command, also display the count." > > (interactive "fFile: ") > > (with-temp-buffer > > (insert-file-contents-literally file) > > (let ((count (count-lines (point-min) (point-max)))) > > (when (interactive-p) > > (message "%d" count)) > > count))) > > I don't have a "with-temp-buffer" function. Why not? Help us to help you, what version of GNU emacs (if it is GNU emacs you're running) are you using? `with-temp-buffer' existed in GNU emacs as far back as 20.7 (that's the earliest version I've got here), probably earlier. -- Dave Pearson: | lbdb.el - LBDB interface. http://www.davep.org/ | sawfish.el - Sawfish mode. Emacs: | uptimes.el - Record emacs uptimes. http://www.davep.org/emacs/ | quickurl.el - Recall lists of URLs.