From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: August Karlstrom Newsgroups: gmane.emacs.help Subject: Re: Finding Unused Identifiers Date: Thu, 09 Mar 2006 13:08:46 GMT Organization: Telia Internet Message-ID: References: <4406fc36$0$11610$3b214f66@tunews.univie.ac.at> <1YDNf.5345$F56.2416@newsread3.news.atl.earthlink.net> <1kwdawrs69lxs$.1nqpbp8apcebt.dlg@40tude.net> <440b0026$0$8024$3b214f66@tunews.univie.ac.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141909868 13621 80.91.229.2 (9 Mar 2006 13:11:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2006 13:11:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 09 14:11:06 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FHKum-00008n-9D for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2006 14:10:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FHKul-0005C0-Dk for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2006 08:10:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer1.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 40 Original-NNTP-Posting-Host: 83.250.237.84 Original-X-Complaints-To: abuse@telia.com Original-X-Trace: newsb.telia.net 1141909726 83.250.237.84 (Thu, 09 Mar 2006 14:08:46 CET) Original-NNTP-Posting-Date: Thu, 09 Mar 2006 14:08:46 CET Original-Xref: shelby.stanford.edu gnu.emacs.help:138063 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33674 Archived-At: Kevin Rodgers wrote: > August Karlstrom wrote: > > Thanks Markus for your remarks. When I tested my functions I had > > previously changed the syntax class for `-' to "w" (word) and then > > forgot that, so I never noticed the problem. I wonder why the syntax > > class of dash is not "word" by default in LISP buffers. > > Because "-" is a symbol constituent, not a word constituent: > > - Syntax class: word constituent > "Word constituents" (designated by `w') are parts of normal > English words and are typically used in variable and command names > in programs. All upper- and lower-case letters, and the digits, > are typically word constituents. > > - Syntax class: symbol constituent > "Symbol constituents" (designated by `_') are the extra characters > that are used in variable and command names along with word > constituents. For example, the symbol constituents class is used > in Lisp mode to indicate that certain characters may be part of > symbol names even though they are not part of English words. > These characters are `$&*+-_<>'. In standard C, the only > non-word-constituent character that is valid in symbols is > underscore (`_'). OK, thanks for pointing that out. So what is the shortest regular expression to match an identifier containing characters with symbol syntax? Does every such character have to be listed as in e.g. \\<[[:word:]_-]+\\> ? August -- I am the "ILOVEGNU" signature virus. Just copy me to your signature. This email was infected under the terms of the GNU General Public License.