Function: dtrt-indent-advise-hack-one-local-variable

dtrt-indent-advise-hack-one-local-variable is a natively compiled function defined in dtrt-indent.el.

Signature

(dtrt-indent-advise-hack-one-local-variable VAR VAL &rest _)

Documentation

Advice for hack-one-local-variable to disable dtrt-indent when necessary.

VAR corresponds to the first argument of hack-one-local-variable.

Source Code

;; Defined in /nix/store/xl774j723v677bsfsybzln3vi6w0fpm3-emacs-packages-deps/share/emacs/site-lisp/elpa/dtrt-indent-20260709.2011/dtrt-indent.el
;;-----------------------------------------------------------------
;; Installation

(defun dtrt-indent-advise-hack-one-local-variable (var _val &rest _)
  "Advice for `hack-one-local-variable' to disable dtrt-indent when necessary.
VAR corresponds to the first argument of `hack-one-local-variable'."
  (cond
   ((eql (nth 2 (dtrt-indent--search-hook-mapping major-mode)) var)
    (setq dtrt-indent-explicit-offset t))
   ((eql 'indent-tabs-mode var)
    (setq dtrt-indent-explicit-tab-mode t))))