From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Wu Newsgroups: gmane.emacs.help Subject: Re: string func to use in .emacs Date: Sun, 25 Jan 2004 19:26:35 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87brorzhac.fsf@tulip.whu.ca> References: <87llnwlij0.fsf@tulip.whu.ca> <87ptd8gld8.fsf@tulip.whu.ca> <87fze3orby.fsf@gmx.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1075077524 27753 80.91.224.253 (26 Jan 2004 00:38:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2004 00:38:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 26 01:38:39 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Akuly-0003W2-00 for ; Mon, 26 Jan 2004 01:38:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkufP-0002Ac-EJ for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2004 19:31:51 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!cpe00095b30c1ed-cm000039823460.cpe.net.cable.rogers.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: cpe00095b30c1ed-cm000039823460.cpe.net.cable.rogers.com (63.138.206.3) Original-X-Trace: news.uni-berlin.de 1075076802 24578791 63.138.206.3 ([117651]) User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:y5mER6PJqUbStRn0qUhaTWSh4bg= Original-Xref: shelby.stanford.edu gnu.emacs.help:120404 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16349 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16349 On Sun, 25 Jan 2004 18:45:05 +0100, Mario Domgörgen wrote: > Peter Wu writes: >> What I am looking for is like this: >> >> input := "Emacs " >> output := "Emacs" >> >> The trailing blank space is trimmed. > ,----[ C-h f delete-trailing-whitespace RET ] > | delete-trailing-whitespace is an interactive compiled Lisp function in > | `simple'. (delete-trailing-whitespace) > | > | Delete all the trailing whitespace across the current buffer. All > | whitespace after the last non-whitespace character in a line is > | deleted. This respects narrowing, created by C-x n n and friends. A > | formfeed is not considered whitespace by this function. > | > | [back] > `---- > Look at this function to start with.... This function seems to trim the trailing whitespaces in a buffer. How can I use it to trim a string variable? -- ,,, (o o) Peter Wu ---ooO-(_)-Ooo--- Powered by GNU/Linux 2.4.22