unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C-M-h not working properly for PHP class
@ 2013-06-28  7:11 Luca Ferrari
  2013-06-29 11:54 ` Chris Van Dusen
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Ferrari @ 2013-06-28  7:11 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
if I use C-M-h (bound to (c-mark-function) in a php script it works
fine, while in a php class it marks the whole class instead of the
current function. I'm using php-mode on Emacs 24.2.1, does anybody
knows a wrokaround for this?

Thanks,
Luca



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-M-h not working properly for PHP class
  2013-06-28  7:11 C-M-h not working properly for PHP class Luca Ferrari
@ 2013-06-29 11:54 ` Chris Van Dusen
       [not found]   ` <CAKoxK+6WUkmCMz5TnoEw=+xhqgZTuRMxnB1uB6mQ_HP+n7mHZw@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Van Dusen @ 2013-06-29 11:54 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

On Jun 28, 2013, at 2:11 AM, Luca Ferrari <fluca1978@infinito.it> wrote:

> Hi all,
> if I use C-M-h (bound to (c-mark-function) in a php script it works
> fine, while in a php class it marks the whole class instead of the
> current function. I'm using php-mode on Emacs 24.2.1, does anybody
> knows a wrokaround for this?
> 
> Thanks,
> Luca
> 

The built-in mark-defun works for me.

Chris.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-M-h not working properly for PHP class
       [not found]   ` <CAKoxK+6WUkmCMz5TnoEw=+xhqgZTuRMxnB1uB6mQ_HP+n7mHZw@mail.gmail.com>
@ 2013-07-02  7:27     ` Luca Ferrari
  2013-07-02  9:58       ` Chris Van Dusen
  2013-07-02 10:57       ` Dmitry Gutov
  0 siblings, 2 replies; 6+ messages in thread
From: Luca Ferrari @ 2013-07-02  7:27 UTC (permalink / raw)
  To: help-gnu-emacs

(Ops...sorry this should have been sent to the list)

I need a little help to fix the problem with the php-mode. I tried to
do the following:

(add-hook 'php-mode-hook
          (lambda ()
            (local-set-key  (kbd "C-M h") 'mark-defun ) ) )

but when I load the php-mode and ask (C-h k) to what is bound C-M h
Emacs says it is still bound to c-mark-defun.
What am I missing?

Thanks,
Luca

On Mon, Jul 1, 2013 at 3:32 PM, Luca Ferrari <fluca1978@infinito.it> wrote:
> On Sat, Jun 29, 2013 at 1:54 PM, Chris Van Dusen <cavandusen@gmail.com> wrote:
>> The built-in mark-defun works for me.
>
> Confirm: it works for me too, while c-mark-function does not work
> always on php source files: within classes it marks everything.
>
> Thanks,
> Luca



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-M-h not working properly for PHP class
  2013-07-02  7:27     ` Luca Ferrari
@ 2013-07-02  9:58       ` Chris Van Dusen
  2013-07-03  6:23         ` Luca Ferrari
  2013-07-02 10:57       ` Dmitry Gutov
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Van Dusen @ 2013-07-02  9:58 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs


On Jul 2, 2013, at 2:27 AM, Luca Ferrari <fluca1978@infinito.it> wrote:

> (Ops...sorry this should have been sent to the list)
> 
> I need a little help to fix the problem with the php-mode. I tried to
> do the following:
> 
> (add-hook 'php-mode-hook
>          (lambda ()
>            (local-set-key  (kbd "C-M h") 'mark-defun ) ) )
> 
> but when I load the php-mode and ask (C-h k) to what is bound C-M h
> Emacs says it is still bound to c-mark-defun.
> What am I missing?
> 

Which php-mode are you using?  The one available from https://github.com/ejmr/php-mode
(not sure if this is the same one from melba) uses mark-defun exactly because c-mark-defun 
doesn't recognize classes.

I've found this version of php-mode to be the most complete (and maintained).

hth,
Chris.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-M-h not working properly for PHP class
  2013-07-02  7:27     ` Luca Ferrari
  2013-07-02  9:58       ` Chris Van Dusen
@ 2013-07-02 10:57       ` Dmitry Gutov
  1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2013-07-02 10:57 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

Luca Ferrari <fluca1978@infinito.it> writes:

> (Ops...sorry this should have been sent to the list)
>
> I need a little help to fix the problem with the php-mode. I tried to
> do the following:
>
> (add-hook 'php-mode-hook
>           (lambda ()
>             (local-set-key  (kbd "C-M h") 'mark-defun ) ) )

Try (kbd "C-M-h") instead.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-M-h not working properly for PHP class
  2013-07-02  9:58       ` Chris Van Dusen
@ 2013-07-03  6:23         ` Luca Ferrari
  0 siblings, 0 replies; 6+ messages in thread
From: Luca Ferrari @ 2013-07-03  6:23 UTC (permalink / raw)
  To: Chris Van Dusen; +Cc: help-gnu-emacs

On Tue, Jul 2, 2013 at 11:58 AM, Chris Van Dusen <cavandusen@gmail.com> wrote:
> Which php-mode are you using?  The one available from https://github.com/ejmr/php-mode
> (not sure if this is the same one from melba) uses mark-defun exactly because c-mark-defun
> doesn't recognize classes.
>
> I've found this version of php-mode to be the most complete (and maintained).
>


I was not aware of this implementation, I was using this one (quite
old) http://php-mode.sourceforge.net/
Let me try the one you pointed me to.

Thanks,
Luca



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-03  6:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28  7:11 C-M-h not working properly for PHP class Luca Ferrari
2013-06-29 11:54 ` Chris Van Dusen
     [not found]   ` <CAKoxK+6WUkmCMz5TnoEw=+xhqgZTuRMxnB1uB6mQ_HP+n7mHZw@mail.gmail.com>
2013-07-02  7:27     ` Luca Ferrari
2013-07-02  9:58       ` Chris Van Dusen
2013-07-03  6:23         ` Luca Ferrari
2013-07-02 10:57       ` Dmitry Gutov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).