bugEmacs delight.el - Bugs: bug #57757, Can't delight c-mode or its...

 
 

bug #57757: Can't delight c-mode or its derivatives (e.g. php-mode)

Submitter:  None
Submitted:  Thu 06 Feb 2020 05:23:53 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 07 Feb 2020 10:03:10 AM UTC, comment #2: 

The workaround seems to work fine. Thanks!

Anonymous
Fri 07 Feb 2020 02:47:59 AM UTC, comment #1: 

This is on account of Emacs bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=2034

cc-mode.el assumes that mode-name is always a string (which was true in Emacs 22 and earlier), while delight.el makes use of the fact that it can (since Emacs 23) contain any mode-line construct.  The two are therefore incompatible.

php-mode is affected because it derives from c-mode.

If the aforementioned bug was to be resolved, delight should then work with c-mode, php-mode, and other related major modes.  As such I'm marking this as "invalid".

> I tried to configure delight to change php-mode's indicador from 'PHP//lw' to plain 'PHP'.

As you are wanting to eliminate the effects of c-update-modeline, I can offer you a workaround: simply add this to your init file:

(advice-add 'c-update-modeline :override #'ignore)


This will of course affect c-mode and other related major modes as well.

Tangentially, to learn what those cc-mode mode-name suffixes mean, refer to:

C-h i g (ccmode)Minor Modes


Phil Sainty <psainty>
Group administrator
Thu 06 Feb 2020 05:23:53 PM UTC, original submission:  

I tried to configure delight to change php-mode's indicador from 'PHP//lw' to plain 'PHP'.

I tried in php-mode's use-package declaration:

(use-package php-mode
  :delight (php-mode "PHP" :major))

And in delight's own use-package declaration:

(use-package delight
  :config
  (delight '((php-mode "PHP" :major))))

Both work but I keep getting and error message in messages:

File mode specification error: (wrong-type-argument stringp (inhibit-mode-name-delight PHP//lh PHP))


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psainty (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-07 psainty StatusNone Invalid
        SummaryCan't delight php-mode Can't delight c-mode or its derivatives (e.g. php-mode)

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code