org-table.el: Fix message

* lisp/org-table.el (org-table-toggle-coordinate-overlays):
Fix the message sent when coordinates are not displayed.
This commit is contained in:
Bastien 2020-02-02 14:03:20 +01:00
parent 151a31917b
commit 2a5f879c81

View file

@ -3768,14 +3768,16 @@ FACE, when non-nil, for the highlight."
(defun org-table-toggle-coordinate-overlays ()
"Toggle the display of Row/Column numbers in tables."
(interactive)
(setq org-table-overlay-coordinates (not org-table-overlay-coordinates))
(message "Tables Row/Column numbers display turned %s"
(if org-table-overlay-coordinates "on" "off"))
(when (and (org-at-table-p) org-table-overlay-coordinates)
(org-table-align))
(unless org-table-overlay-coordinates
(mapc 'delete-overlay org-table-coordinate-overlays)
(setq org-table-coordinate-overlays nil)))
(if (not (org-at-table-p))
(user-error "Not on a table")
(setq org-table-overlay-coordinates (not org-table-overlay-coordinates))
(when (and (org-at-table-p) org-table-overlay-coordinates)
(org-table-align))
(unless org-table-overlay-coordinates
(mapc 'delete-overlay org-table-coordinate-overlays)
(setq org-table-coordinate-overlays nil))
(message "Tables Row/Column numbers display turned %s"
(if org-table-overlay-coordinates "on" "off"))))
;;;###autoload
(defun org-table-toggle-formula-debugger ()