From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Incompatibility of CC mode Date: Wed, 04 Apr 2007 10:02:11 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175695563 26925 80.91.229.12 (4 Apr 2007 14:06:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2007 14:06:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: bug-cc-mode@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Wed Apr 04 16:05:51 2007 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1HZ66s-0007r8-98 for sf-cc-mode-help@m.gmane.org; Wed, 04 Apr 2007 16:05:35 +0200 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 905D8121F5; Wed, 4 Apr 2007 07:05:13 -0700 (PDT) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HZ66B-0005fb-EI for cc-mode-help@lists.sourceforge.net; Wed, 04 Apr 2007 07:04:31 -0700 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1HZ669-0002xR-Rk for cc-mode-help@lists.sourceforge.net; Wed, 04 Apr 2007 07:04:31 -0700 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HZ63v-0002d7-5N; Wed, 04 Apr 2007 10:02:11 -0400 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4463 gmane.emacs.devel:69047 Archived-At: Is there any good reason for this incompatibility? If not, let's get rid of it. ------- Start of forwarded message ------- X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=failed version=3.1.0 DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=dTIuFhXeJa1XzScGibBwsvdZozFDIredsI5PPbrUpWmgu46kECkDaB39BkotrBhmcTA1bfRnZsfRJRW43M0hcxmZsOK961kXDmqGSofe63dYoQ60HNZ9Ps43xDen9/w/blSp7/yvJSIP9APBajtKPsf9e9WypGhd4pqBpiNBRD8= Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: Paul Curry Date: Mon, 2 Apr 2007 15:46:32 -0500 Subject: c-subword-mode - inconsistent behavior The functions c-capitalize-subword, c-downcase-subword, c-upcase-subword claim to behave like their normal emacs counterparts, but all three functions move the point when given a negative argument. Furthermore, c-capitalize-subword doesn't even work with a negative argument on my machine. I changed the functions to better mimic the behavior of capitalize/downcase/upcase/-word: they no longer move point with a negative argument. Here's my code: (defun c-capitalize-subword (arg) "Do the same as `capitalize-word' but on subwords. See the command `c-subword-mode' for a description of subwords. Optional argument ARG is the same as for `capitalize-word'." (interactive "p") (let ((count (abs arg)) (start (point))) (dotimes (i count) (when (if (< arg 0) (re-search-backward (concat "\\<[" c-alpha "]") nil t) (re-search-forward (concat "[" c-alpha "]") nil t)) (goto-char (match-beginning 0))) (let* ((p (point)) (pp (1+ p)) (np (c-forward-subword))) (upcase-region p pp) (downcase-region pp np) (if (< arg 0) (c-backward-subword) (goto-char np)))) (if (< arg 0) (goto-char start)))) (defun c-downcase-subword (arg) "Do the same as `downcase-word' but on subwords. See the command `c-subword-mode' for a description of subwords. Optional argument ARG is the same as for `downcase-word'." (interactive "p") (let ((start (point))) (downcase-region (point) (c-forward-subword arg)) (if (< arg 0) (goto-char start)))) (defun c-upcase-subword (arg) "Do the same as `upcase-word' but on subwords. See the command `c-subword-mode' for a description of subwords. Optional argument ARG is the same as for `upcase-word'." (interactive "p") (let ((start (point))) (upcase-region (point) (c-forward-subword arg)) (if (< arg 0) (goto-char start)))) _______________________________________________ bug-gnu-emacs mailing list bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs ------- End of forwarded message ------- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV