all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Meow King via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 72223@debbugs.gnu.org
Subject: bug#72223: 31.0.50; c-ts-mode-indent-style custom function should accept a `mode`(c/c++) parameter
Date: Sat, 20 Jul 2024 22:10:06 +0800	[thread overview]
Message-ID: <87ed7otatf.fsf@anche.no> (raw)


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++).



---


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.42, cairo version 1.18.0)
Repository revision: 3a790abd869ddadc343710deb0c4368227ba6611
Repository branch: master
System Description: NixOS 24.11 (Vicuna)





             reply	other threads:[~2024-07-20 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-20 14:10 Meow King via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-21  8:46 ` bug#72223: 31.0.50; c-ts-mode-indent-style custom function should accept a `mode`(c/c++) parameter Eli Zaretskii
     [not found]   ` <87h6cjm7ic.fsf@anche.no>
2024-07-21  9:35     ` Eli Zaretskii

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=87ed7otatf.fsf@anche.no \
    --to=bug-gnu-emacs@gnu.org \
    --cc=72223@debbugs.gnu.org \
    --cc=mr.meowking@anche.no \
    /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.