GNU bug report logs -
#72223
31.0.50; c-ts-mode-indent-style custom function should accept a `mode`(c/c++) parameter
Previous Next
Reported by: Meow King <mr.meowking <at> anche.no>
Date: Sun, 21 Jul 2024 08:41:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 72223 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 20 Jul 2024 22:10:06 +0800
> From: Meow King via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
>
> Currently, the `c-ts-mode--get-indent-style` function:
> ```
> (defun c-ts-mode--get-indent-style (mode)
> "Helper function to set indentation style.
> MODE is either `c' or `cpp'."
> (let ((style
> (if (functionp c-ts-mode-indent-style)
> (funcall c-ts-mode-indent-style)
> (alist-get c-ts-mode-indent-style (c-ts-mode--indent-styles mode)))))
> `((,mode ,@style))))
> ```
> We can use `c-ts-mode-indent-style` to customize our indentation.
> However, the function doesn't accept a `mode` parameter, without which
> we cannot determine the current customizing indentation style of what
> language (c/c++).
Isn't the mode available as the value of major-mode?
This bug report was last modified 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.