help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Smartparens documentation question.


From: R. Clayton
Subject: Smartparens documentation question.
Date: Thu, 08 Apr 2021 12:34:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

In smartparens I read in the documentation for the function
show-smartparens-mode that

  If called from Lisp, also enable the mode if ARG is omitted or nil, and
  toggle it if ARG is ‘toggle’; disable the mode otherwise.

This strikes me as backwards, because I thought the idiom is nil args turn
things off and non-nil args turn things on, but ok, sure, maybe it's a
minor-mode thing.  However, poking around in smartparens.el shows

  ;;;###autoload
  (defun turn-on-show-smartparens-mode ()
    "Turn on `show-smartparens-mode'."
    (interactive)
    (unless (or (member major-mode sp-ignore-modes-list)
                (and (not (derived-mode-p 'comint-mode))
                     (eq (get major-mode 'mode-class) 'special)))
      (show-smartparens-mode t)))

which seems consistent with the idiom and contradictory to the documentation.

What is the explanation for what's going on here?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]