diff options
author | Bastien <bzg@gnu.org> | 2020-02-02 14:03:20 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-02 14:03:20 +0100 |
commit | 2a5f879c810e4b4ba2e85ebf2616a32c8501f342 (patch) | |
tree | f1576723a7d271233fb1a4b601821655d4204b43 | |
parent | 151a31917b59ab9de57d10bb7d11a485f751cae7 (diff) | |
download | org-mode-2a5f879c810e4b4ba2e85ebf2616a32c8501f342.tar.gz |
org-table.el: Fix message
* lisp/org-table.el (org-table-toggle-coordinate-overlays):
Fix the message sent when coordinates are not displayed.
-rw-r--r-- | lisp/org-table.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 4976547..c0c36f4 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -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 () |