php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

while keyword says 'At top level'

Open sleetdrop opened this issue 2 years ago • 2 comments

When I input

<?php

while

then type space or ( the cursor doesn't move, and says 'At top level' in the echo area.

If input while in a function or method, it works. Is this related default PSR style or sth?

I am using emacs 29.1 and php-mode 20231217.1125 from melpa

sleetdrop avatar Jan 18 '24 03:01 sleetdrop

@sleetdrop Thanks for the report.

I still don't understand the situation, so could you please explain the following points?

  • What behavior did you expect?
  • What unexpected behavior occurred as a result of this operation?

It may be helpful to provide the output of M-x php-mode-debug to resolve the issue.

I still haven't determined which function outputs the "At top level" message. If it is an error, it would be helpful to attach the backtrace output by M-x toggle-debug-on-error to help identify the problem.

Or, if you are able to record a video of your screen, please attach it. This will help us to quickly understand the situation.

We look forward to hearing any additional information.

zonuexe avatar Jan 19 '24 02:01 zonuexe

I expect to write a php while statement block, but the cursor hangs there. here is the screen recording

https://github.com/emacs-php/php-mode/assets/88603/4a15558a-6582-4da0-a046-548219dd3d1a

and I saw the following message in *Message* buffer Debug on Error enabled globally c-append-to-state-cache: At top level [9 times]

sleetdrop avatar Jan 19 '24 06:01 sleetdrop