all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: 7879@debbugs.gnu.org
Subject: bug#7879: 24.0.50; Wish: Make c-defun-name recognize objc-methods.
Date: Fri, 21 Jan 2011 10:07:17 +0100	[thread overview]
Message-ID: <4D394CC5.6010605@swipnet.se> (raw)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your report will be posted to the bug-gnu-emacs@gnu.org mailing list
and the gnu.emacs.bug news group, and at http://debbugs.gnu.org.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

Hello.

bug-cc-mode seems to be dead, so I send here instead.

It always annoyed me that add-log always put objc-methods as "-".
Internally add-log uses c-defun-name, so I'd like that defun to be
changed so it recognizes objc-names.  I have run with this for a while,
it handles all cases I've seen, but I'm sure some constructs make it
fail.  At least it is better than returning "-".

=== modified file 'lisp/progmodes/cc-cmds.el'
--- lisp/progmodes/cc-cmds.el	2010-10-31 11:54:02 +0000
+++ lisp/progmodes/cc-cmds.el	2010-12-02 09:03:09 +0000
@@ -1724,6 +1724,14 @@
   	    ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags
   	    (match-string-no-properties 1))

+	   ((and (derived-mode-p 'objc-mode)
+		 (looking-at "[-+]\s*("))
+	    (when (c-syntactic-re-search-forward ")\s*" nil t)
+	      (c-forward-token-2)
+	      (setq name-end (point))
+	      (c-backward-token-2)
+	      (buffer-substring-no-properties (point) name-end)))
+
   	   (t
   	    ;; Normal function or initializer.
   	    (when (c-syntactic-re-search-forward "[{(]" nil t)



	Jan D.



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
     `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/Users/jhd/src/emacs/current/nextstep/Emacs.app/Contents/Resources/etc/DEBUG.


In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.6.0, NS apple-appkit-1038.35)
  of 2011-01-21 on zeplin
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--verbose' '--enable-asserts' '--with-ns' 
'--without-x' 'CFLAGS=-g''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: C
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: sv_SE.UTF-8
   value of $XMODIFIERS: nil
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   desktop-save-mode: t
   delete-selection-mode: t
   icomplete-mode: t
   display-time-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
n M-x r e p o r t - e m <tab> <return>

Recent messages:
Loading /Users/jhd/lib/elisp/BAK-file.el (source)...done
Loading /Users/jhd/lib/elisp/ccsetup.el (source)...done
Loading icomplete...done
Loading desktop...done
Warning: desktop file appears to be in use by PID 29264.
Using it may cause conflicts.  Use it anyway? (y or n)  n
Desktop file in use; not loaded.
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug
desktop cus-start cus-load msb delsel advice help-fns advice-preload
icomplete cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs regexp-opt time tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)





             reply	other threads:[~2011-01-21  9:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  9:07 Jan Djärv [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-29 18:48 bug#11583: 24.0.97; 24 pretest Emacs.app crashes closing frames Steven Parkes
2012-05-30  2:52 ` Eli Zaretskii
2012-06-03  2:05   ` Steven Parkes
2012-06-03 14:54     ` Eli Zaretskii
2012-06-04 20:30       ` Steven Parkes
2012-07-14  9:10         ` bug#7879: 24.0.50; Wish: Make c-defun-name recognize objc-methods Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D394CC5.6010605@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=7879@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.