aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/so-long.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/so-long.el b/lisp/so-long.el
index 6928c902d12..e80abc76a53 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -1576,8 +1576,12 @@ This command is called automatically when long lines are detected, when
1576 1576
1577The effects of the action can be undone by calling `so-long-revert'. 1577The effects of the action can be undone by calling `so-long-revert'.
1578 1578
1579If ACTION is provided, it is used instead of `so-long-action'. With a prefix 1579If ACTION is provided, it is used instead of `so-long-action'.
1580argument, select the action to use interactively." 1580
1581With a prefix argument, select the action to use interactively.
1582
1583If an action was already active in the buffer, it will be reverted before
1584invoking the new action."
1581 (interactive 1585 (interactive
1582 (list (and current-prefix-arg 1586 (list (and current-prefix-arg
1583 (intern 1587 (intern
@@ -1587,6 +1591,10 @@ argument, select the action to use interactively."
1587 ;; Ensure that `so-long-deferred' only triggers `so-long' once (at most). 1591 ;; Ensure that `so-long-deferred' only triggers `so-long' once (at most).
1588 (remove-hook 'window-configuration-change-hook #'so-long :local) 1592 (remove-hook 'window-configuration-change-hook #'so-long :local)
1589 (unless so-long--calling 1593 (unless so-long--calling
1594 ;; Revert the existing action, if any.
1595 (when so-long--active
1596 (so-long-revert))
1597 ;; Invoke the new action.
1590 (let ((so-long--calling t)) 1598 (let ((so-long--calling t))
1591 (so-long--ensure-enabled) 1599 (so-long--ensure-enabled)
1592 ;; ACTION takes precedence if supplied. 1600 ;; ACTION takes precedence if supplied.