Function: pulsar-highlight-permanently-dwim

pulsar-highlight-permanently-dwim is an interactive and natively compiled function defined in pulsar.el.

Signature

(pulsar-highlight-permanently-dwim LOCUS)

Documentation

Do-What-I-Mean with a permanent highlighting of the current LOCUS.

When there is a highlight, remove it, else add it.

If the region is active, LOCUS corresponds to its boundaries. If there is no region, then LOCUS corresponds to the boundaries of the current line.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/3sr3j7hp5p1wsd8fv5763k239hzdxi1c-emacs-packages-deps/share/emacs/site-lisp/elpa/pulsar-1.4.1/pulsar.el
;;;###autoload
(defun pulsar-highlight-permanently-dwim (locus)
  "Do-What-I-Mean with a permanent highlighting of the current LOCUS.
When there is a highlight, remove it, else add it.

If the region is active, LOCUS corresponds to its boundaries.  If there
is no region, then LOCUS corresponds to the boundaries of the current
line."
  (interactive
   (list
    (cond
     ((region-active-p)
      (cons (region-beginning) (region-end)))
     (t
      (pulsar--get-line-boundaries)))))
  (if-let* ((overlays (pulsar--permanent-p locus)))
      (dolist (overlay overlays) (delete-overlay overlay))
    (pulsar-highlight-permanently locus)))