aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 05:20:44 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 05:20:44 -0500
commit35131cb72c08c657d2a3389338d0c049d57e69bd (patch)
treead377579abb8bc143dd57c9a4f63fa244d137a94
parent306c4ea1dd07de0d862c0943aeb8b7e170a1b343 (diff)
downloademacs-wttrin-35131cb72c08c657d2a3389338d0c049d57e69bd.tar.gz
emacs-wttrin-35131cb72c08c657d2a3389338d0c049d57e69bd.zip
refactor: rename debug-wttrin-* commands to wttrin-debug-* with obsolete aliases
The four interactive commands in `wttrin-debug.el` used `debug-wttrin-` as their prefix instead of the package's `wttrin-debug-` prefix. package-lint flags this as a convention violation, and it makes M-x discovery slightly less consistent for users. Renamed: - `debug-wttrin-show-raw` -> `wttrin-debug-show-raw` - `debug-wttrin-enable` -> `wttrin-debug-enable` - `debug-wttrin-disable` -> `wttrin-debug-disable` - `debug-wttrin-mode-line` -> `wttrin-debug-mode-line` The old names stay available as `define-obsolete-function-alias` entries marked since 0.4.0, so anyone with a keybinding or `(call-interactively 'debug-wttrin-enable)` in their config keeps working. The byte-compiler will emit an obsolescence warning to nudge migration. Aliases will be removed in a future release. Internal caller `wttrin--debug-mode-line-info` now invokes the new name. Test files renamed to match (`test-debug-wttrin-*.el` -> `test-wttrin-debug-*.el`); inside each, ert-deftest names and function calls were updated. Added `tests/test-wttrin-debug-aliases.el` to verify each old name resolves via `indirect-function` to the new name and carries `byte-obsolete-info` with the expected target and "0.4.0" version.
-rw-r--r--tests/README-DEBUG-TESTS.org2
-rw-r--r--tests/test-wttrin-debug-aliases.el52
-rw-r--r--tests/test-wttrin-debug-disable.el (renamed from tests/test-debug-wttrin-disable.el)20
-rw-r--r--tests/test-wttrin-debug-enable.el (renamed from tests/test-debug-wttrin-enable.el)20
-rw-r--r--tests/test-wttrin-debug-mode-line.el (renamed from tests/test-debug-wttrin-mode-line.el)40
-rw-r--r--tests/test-wttrin-debug-show-raw.el (renamed from tests/test-debug-wttrin-show-raw.el)64
-rw-r--r--wttrin-debug.el34
7 files changed, 150 insertions, 82 deletions
diff --git a/tests/README-DEBUG-TESTS.org b/tests/README-DEBUG-TESTS.org
index ed303f8..70a1e09 100644
--- a/tests/README-DEBUG-TESTS.org
+++ b/tests/README-DEBUG-TESTS.org
@@ -50,7 +50,7 @@ The integration tests demonstrate:
** Or Enable Later
#+begin_src emacs-lisp
-M-x debug-wttrin-enable
+M-x wttrin-debug-enable
#+end_src
** View Debug Log
diff --git a/tests/test-wttrin-debug-aliases.el b/tests/test-wttrin-debug-aliases.el
new file mode 100644
index 0000000..1e2194b
--- /dev/null
+++ b/tests/test-wttrin-debug-aliases.el
@@ -0,0 +1,52 @@
+;;; test-wttrin-debug-aliases.el --- Tests for obsolete debug aliases -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2026 Craig Jennings
+
+;;; Commentary:
+
+;; The four `debug-wttrin-*' names were renamed to `wttrin-debug-*' in
+;; 0.4.0 to follow the package-prefix convention. The old names remain
+;; as obsolete aliases so existing keybindings keep working. These tests
+;; verify each alias resolves to the new function and is marked obsolete
+;; with the expected target and version.
+
+;;; Code:
+
+(require 'ert)
+(require 'wttrin)
+(require 'testutil-wttrin)
+
+(require 'wttrin-debug
+ (expand-file-name "wttrin-debug.el"
+ (file-name-directory (locate-library "wttrin"))))
+
+(defconst test-wttrin-debug-aliases-pairs
+ '((debug-wttrin-show-raw . wttrin-debug-show-raw)
+ (debug-wttrin-enable . wttrin-debug-enable)
+ (debug-wttrin-disable . wttrin-debug-disable)
+ (debug-wttrin-mode-line . wttrin-debug-mode-line))
+ "Old-name to new-name pairs for the renamed debug functions.")
+
+;;; Normal Cases
+
+(ert-deftest test-wttrin-debug-aliases-normal-each-old-name-resolves-to-new ()
+ "Every old name is fboundp and indirects to its new name."
+ (dolist (pair test-wttrin-debug-aliases-pairs)
+ (let ((old (car pair))
+ (new (cdr pair)))
+ (should (fboundp old))
+ (should (eq (indirect-function old) (symbol-function new))))))
+
+(ert-deftest test-wttrin-debug-aliases-normal-each-old-name-marked-obsolete ()
+ "Every old name has byte-obsolete-info pointing at the new name and 0.4.0."
+ (dolist (pair test-wttrin-debug-aliases-pairs)
+ (let* ((old (car pair))
+ (new (cdr pair))
+ (info (get old 'byte-obsolete-info)))
+ (should info)
+ ;; byte-obsolete-info is (CURRENT-NAME HANDLER WHEN)
+ (should (eq new (car info)))
+ (should (string= "0.4.0" (nth 2 info))))))
+
+(provide 'test-wttrin-debug-aliases)
+;;; test-wttrin-debug-aliases.el ends here
diff --git a/tests/test-debug-wttrin-disable.el b/tests/test-wttrin-debug-disable.el
index dc560c3..f6fc5db 100644
--- a/tests/test-debug-wttrin-disable.el
+++ b/tests/test-wttrin-debug-disable.el
@@ -1,10 +1,10 @@
-;;; test-debug-wttrin-disable.el --- Tests for debug-wttrin-disable -*- lexical-binding: t; -*-
+;;; test-wttrin-debug-disable.el --- Tests for wttrin-debug-disable -*- lexical-binding: t; -*-
;; Copyright (C) 2025-2026 Craig Jennings
;;; Commentary:
-;; Unit tests for debug-wttrin-disable. Verifies the interactive command
+;; Unit tests for wttrin-debug-disable. Verifies the interactive command
;; clears `wttrin-debug' and is idempotent when already disabled.
;;; Code:
@@ -19,25 +19,25 @@
;;; Normal Cases
-(ert-deftest test-debug-wttrin-disable-normal-flips-from-t-to-nil ()
+(ert-deftest test-wttrin-debug-disable-normal-flips-from-t-to-nil ()
"Calling disable when wttrin-debug is t sets it to nil."
(let ((wttrin-debug t))
- (debug-wttrin-disable)
+ (wttrin-debug-disable)
(should-not wttrin-debug)))
-(ert-deftest test-debug-wttrin-disable-normal-idempotent-when-already-disabled ()
+(ert-deftest test-wttrin-debug-disable-normal-idempotent-when-already-disabled ()
"Calling disable when wttrin-debug is already nil leaves it nil."
(let ((wttrin-debug nil))
- (debug-wttrin-disable)
+ (wttrin-debug-disable)
(should-not wttrin-debug)))
;;; Boundary Cases
-(ert-deftest test-debug-wttrin-disable-boundary-clears-non-boolean-truthy-value ()
+(ert-deftest test-wttrin-debug-disable-boundary-clears-non-boolean-truthy-value ()
"Calling disable replaces any truthy value with nil."
(let ((wttrin-debug 'verbose))
- (debug-wttrin-disable)
+ (wttrin-debug-disable)
(should-not wttrin-debug)))
-(provide 'test-debug-wttrin-disable)
-;;; test-debug-wttrin-disable.el ends here
+(provide 'test-wttrin-debug-disable)
+;;; test-wttrin-debug-disable.el ends here
diff --git a/tests/test-debug-wttrin-enable.el b/tests/test-wttrin-debug-enable.el
index 569547d..b5d1217 100644
--- a/tests/test-debug-wttrin-enable.el
+++ b/tests/test-wttrin-debug-enable.el
@@ -1,10 +1,10 @@
-;;; test-debug-wttrin-enable.el --- Tests for debug-wttrin-enable -*- lexical-binding: t; -*-
+;;; test-wttrin-debug-enable.el --- Tests for wttrin-debug-enable -*- lexical-binding: t; -*-
;; Copyright (C) 2025-2026 Craig Jennings
;;; Commentary:
-;; Unit tests for debug-wttrin-enable. Verifies the interactive command
+;; Unit tests for wttrin-debug-enable. Verifies the interactive command
;; flips `wttrin-debug' to t and is idempotent when already enabled.
;;; Code:
@@ -19,25 +19,25 @@
;;; Normal Cases
-(ert-deftest test-debug-wttrin-enable-normal-flips-from-nil-to-t ()
+(ert-deftest test-wttrin-debug-enable-normal-flips-from-nil-to-t ()
"Calling enable when wttrin-debug is nil sets it to t."
(let ((wttrin-debug nil))
- (debug-wttrin-enable)
+ (wttrin-debug-enable)
(should (eq wttrin-debug t))))
-(ert-deftest test-debug-wttrin-enable-normal-idempotent-when-already-enabled ()
+(ert-deftest test-wttrin-debug-enable-normal-idempotent-when-already-enabled ()
"Calling enable when wttrin-debug is already t leaves it t."
(let ((wttrin-debug t))
- (debug-wttrin-enable)
+ (wttrin-debug-enable)
(should (eq wttrin-debug t))))
;;; Boundary Cases
-(ert-deftest test-debug-wttrin-enable-boundary-overrides-non-boolean-truthy-value ()
+(ert-deftest test-wttrin-debug-enable-boundary-overrides-non-boolean-truthy-value ()
"Calling enable replaces a non-boolean truthy value with t."
(let ((wttrin-debug 'verbose))
- (debug-wttrin-enable)
+ (wttrin-debug-enable)
(should (eq wttrin-debug t))))
-(provide 'test-debug-wttrin-enable)
-;;; test-debug-wttrin-enable.el ends here
+(provide 'test-wttrin-debug-enable)
+;;; test-wttrin-debug-enable.el ends here
diff --git a/tests/test-debug-wttrin-mode-line.el b/tests/test-wttrin-debug-mode-line.el
index 437185a..b9e135b 100644
--- a/tests/test-debug-wttrin-mode-line.el
+++ b/tests/test-wttrin-debug-mode-line.el
@@ -1,10 +1,10 @@
-;;; test-debug-wttrin-mode-line.el --- Tests for debug-wttrin-mode-line -*- lexical-binding: t; -*-
+;;; test-wttrin-debug-mode-line.el --- Tests for wttrin-debug-mode-line -*- lexical-binding: t; -*-
;; Copyright (C) 2025-2026 Craig Jennings
;;; Commentary:
-;; Unit tests for debug-wttrin-mode-line. This function is a UI-heavy
+;; Unit tests for wttrin-debug-mode-line. This function is a UI-heavy
;; diagnostic dump, so testing focuses on the two top-level branches:
;; - When *wttr.in* is missing, no diagnostic buffer is produced.
;; - When *wttr.in* exists, the diagnostic buffer is created and contains
@@ -22,15 +22,15 @@
;;; Setup and Teardown
-(defun test-debug-wttrin-mode-line-setup ()
- "Setup for debug-wttrin-mode-line tests."
+(defun test-wttrin-debug-mode-line-setup ()
+ "Setup for wttrin-debug-mode-line tests."
(when (get-buffer "*wttr.in*")
(kill-buffer "*wttr.in*"))
(when (get-buffer "*wttrin-mode-debug*")
(kill-buffer "*wttrin-mode-debug*")))
-(defun test-debug-wttrin-mode-line-teardown ()
- "Teardown for debug-wttrin-mode-line tests."
+(defun test-wttrin-debug-mode-line-teardown ()
+ "Teardown for wttrin-debug-mode-line tests."
(when (get-buffer "*wttr.in*")
(kill-buffer "*wttr.in*"))
(when (get-buffer "*wttrin-mode-debug*")
@@ -38,34 +38,34 @@
;;; Normal Cases
-(ert-deftest test-debug-wttrin-mode-line-normal-no-buffer-skips-diagnostic-buffer ()
+(ert-deftest test-wttrin-debug-mode-line-normal-no-buffer-skips-diagnostic-buffer ()
"When the *wttr.in* buffer is absent, no diagnostic buffer is created."
- (test-debug-wttrin-mode-line-setup)
+ (test-wttrin-debug-mode-line-setup)
(unwind-protect
(progn
- (debug-wttrin-mode-line)
+ (wttrin-debug-mode-line)
(should-not (get-buffer "*wttrin-mode-debug*")))
- (test-debug-wttrin-mode-line-teardown)))
+ (test-wttrin-debug-mode-line-teardown)))
-(ert-deftest test-debug-wttrin-mode-line-normal-buffer-exists-creates-diagnostic-buffer ()
+(ert-deftest test-wttrin-debug-mode-line-normal-buffer-exists-creates-diagnostic-buffer ()
"When the *wttr.in* buffer exists, the diagnostic buffer is created."
- (test-debug-wttrin-mode-line-setup)
+ (test-wttrin-debug-mode-line-setup)
(unwind-protect
(progn
(with-current-buffer (get-buffer-create "*wttr.in*")
(wttrin-mode))
- (debug-wttrin-mode-line)
+ (wttrin-debug-mode-line)
(should (get-buffer "*wttrin-mode-debug*")))
- (test-debug-wttrin-mode-line-teardown)))
+ (test-wttrin-debug-mode-line-teardown)))
-(ert-deftest test-debug-wttrin-mode-line-normal-diagnostic-buffer-contains-section-labels ()
+(ert-deftest test-wttrin-debug-mode-line-normal-diagnostic-buffer-contains-section-labels ()
"Diagnostic buffer contains the expected section labels."
- (test-debug-wttrin-mode-line-setup)
+ (test-wttrin-debug-mode-line-setup)
(unwind-protect
(progn
(with-current-buffer (get-buffer-create "*wttr.in*")
(wttrin-mode))
- (debug-wttrin-mode-line)
+ (wttrin-debug-mode-line)
(with-current-buffer "*wttrin-mode-debug*"
(let ((contents (buffer-string)))
(should (string-match-p "Wttrin Mode-Line Debug Info" contents))
@@ -73,7 +73,7 @@
(should (string-match-p "Major mode:" contents))
(should (string-match-p "mode-name variable:" contents))
(should (string-match-p "mode-line-format first 5 elements:" contents)))))
- (test-debug-wttrin-mode-line-teardown)))
+ (test-wttrin-debug-mode-line-teardown)))
-(provide 'test-debug-wttrin-mode-line)
-;;; test-debug-wttrin-mode-line.el ends here
+(provide 'test-wttrin-debug-mode-line)
+;;; test-wttrin-debug-mode-line.el ends here
diff --git a/tests/test-debug-wttrin-show-raw.el b/tests/test-wttrin-debug-show-raw.el
index 67e50ca..91a7c06 100644
--- a/tests/test-debug-wttrin-show-raw.el
+++ b/tests/test-wttrin-debug-show-raw.el
@@ -1,10 +1,10 @@
-;;; test-debug-wttrin-show-raw.el --- Tests for debug-wttrin-show-raw -*- lexical-binding: t; -*-
+;;; test-wttrin-debug-show-raw.el --- Tests for wttrin-debug-show-raw -*- lexical-binding: t; -*-
;; Copyright (C) 2025-2026 Craig Jennings
;;; Commentary:
-;; Unit tests for debug-wttrin-show-raw function.
+;; Unit tests for wttrin-debug-show-raw function.
;; Tests that the debug display shows raw weather data with line numbers.
;;; Code:
@@ -20,90 +20,90 @@
;;; Setup and Teardown
-(defun test-debug-wttrin-show-raw-setup ()
- "Setup for debug-wttrin-show-raw tests."
+(defun test-wttrin-debug-show-raw-setup ()
+ "Setup for wttrin-debug-show-raw tests."
(testutil-wttrin-setup)
(when (get-buffer "*wttrin-debug*")
(kill-buffer "*wttrin-debug*")))
-(defun test-debug-wttrin-show-raw-teardown ()
- "Teardown for debug-wttrin-show-raw tests."
+(defun test-wttrin-debug-show-raw-teardown ()
+ "Teardown for wttrin-debug-show-raw tests."
(testutil-wttrin-teardown)
(when (get-buffer "*wttrin-debug*")
(kill-buffer "*wttrin-debug*")))
;;; Normal Cases
-(ert-deftest test-debug-wttrin-show-raw-normal-creates-debug-buffer ()
+(ert-deftest test-wttrin-debug-show-raw-normal-creates-debug-buffer ()
"Calling show-raw should create the *wttrin-debug* buffer."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(progn
(testutil-wttrin-mock-http-response "Line one\nLine two\nLine three"
- (debug-wttrin-show-raw "Paris"))
+ (wttrin-debug-show-raw "Paris"))
(should (get-buffer "*wttrin-debug*")))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
-(ert-deftest test-debug-wttrin-show-raw-normal-adds-line-numbers ()
+(ert-deftest test-wttrin-debug-show-raw-normal-adds-line-numbers ()
"Each line of raw data should be prefixed with its line number."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(progn
(testutil-wttrin-mock-http-response "Alpha\nBravo\nCharlie"
- (debug-wttrin-show-raw "Paris"))
+ (wttrin-debug-show-raw "Paris"))
(with-current-buffer "*wttrin-debug*"
(let ((contents (buffer-string)))
(should (string-match-p "^ *1: Alpha" contents))
(should (string-match-p "^ *2: Bravo" contents))
(should (string-match-p "^ *3: Charlie" contents)))))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
-(ert-deftest test-debug-wttrin-show-raw-normal-fetches-correct-location ()
+(ert-deftest test-wttrin-debug-show-raw-normal-fetches-correct-location ()
"The function should fetch weather for the specified location."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(let ((fetched-location nil))
(cl-letf (((symbol-function 'wttrin--get-cached-or-fetch)
(lambda (location callback)
(setq fetched-location location)
(funcall callback "data"))))
- (debug-wttrin-show-raw "Berlin, DE")
+ (wttrin-debug-show-raw "Berlin, DE")
(should (equal fetched-location "Berlin, DE"))))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
;;; Boundary Cases
-(ert-deftest test-debug-wttrin-show-raw-boundary-single-line ()
+(ert-deftest test-wttrin-debug-show-raw-boundary-single-line ()
"Single-line response should get line number 1."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(progn
(testutil-wttrin-mock-http-response "Just one line"
- (debug-wttrin-show-raw "Paris"))
+ (wttrin-debug-show-raw "Paris"))
(with-current-buffer "*wttrin-debug*"
(let ((contents (buffer-string)))
(should (string-match-p "^ *1: Just one line" contents)))))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
;;; Error Cases
-(ert-deftest test-debug-wttrin-show-raw-error-nil-response-should-not-crash ()
+(ert-deftest test-wttrin-debug-show-raw-error-nil-response-should-not-crash ()
"When the fetch returns nil, the function should handle it gracefully."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(cl-letf (((symbol-function 'wttrin--get-cached-or-fetch)
(lambda (_location callback)
(funcall callback nil))))
;; Should not crash
- (debug-wttrin-show-raw "BadLocation")
+ (wttrin-debug-show-raw "BadLocation")
;; Buffer should exist even on error
(should (get-buffer "*wttrin-debug*")))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
-(ert-deftest test-debug-wttrin-show-raw-normal-always-fetches-fresh ()
+(ert-deftest test-wttrin-debug-show-raw-normal-always-fetches-fresh ()
"A debug command should always fetch from the API, not serve cached data.
When debugging, the user needs to see what the API currently returns."
- (test-debug-wttrin-show-raw-setup)
+ (test-wttrin-debug-show-raw-setup)
(unwind-protect
(let ((force-refresh-was-set nil))
;; Seed cache so there IS data to serve
@@ -112,10 +112,10 @@ When debugging, the user needs to see what the API currently returns."
(lambda (_location callback)
(setq force-refresh-was-set wttrin--force-refresh)
(funcall callback "fresh from API"))))
- (debug-wttrin-show-raw "Paris")
+ (wttrin-debug-show-raw "Paris")
;; Force-refresh should have been active during the fetch
(should force-refresh-was-set)))
- (test-debug-wttrin-show-raw-teardown)))
+ (test-wttrin-debug-show-raw-teardown)))
-(provide 'test-debug-wttrin-show-raw)
-;;; test-debug-wttrin-show-raw.el ends here
+(provide 'test-wttrin-debug-show-raw)
+;;; test-wttrin-debug-show-raw.el ends here
diff --git a/wttrin-debug.el b/wttrin-debug.el
index ca378b1..e88f8ca 100644
--- a/wttrin-debug.el
+++ b/wttrin-debug.el
@@ -16,13 +16,16 @@
;; (require 'wttrin)
;;
;; Available debug functions:
-;; - `debug-wttrin-show-raw' - View raw weather data with line numbers
-;; - `debug-wttrin-mode-line' - Diagnose mode-line lighter issues
+;; - `wttrin-debug-show-raw' - View raw weather data with line numbers
+;; - `wttrin-debug-mode-line' - Diagnose mode-line lighter issues
;; - `wttrin--debug-mode-line-info' - Auto-called when wttrin runs (if debug enabled)
;;
;; Interactive commands:
-;; - M-x debug-wttrin-enable - Enable debug mode
-;; - M-x debug-wttrin-disable - Disable debug mode
+;; - M-x wttrin-debug-enable - Enable debug mode
+;; - M-x wttrin-debug-disable - Disable debug mode
+;;
+;; Earlier versions exposed these as `debug-wttrin-*'. Those names remain
+;; available as obsolete aliases and will be removed in a future release.
;;
;; When debug mode is enabled, raw weather data is automatically saved to
;; timestamped files in `temporary-file-directory' for bug reports.
@@ -37,7 +40,7 @@
(declare-function wttrin--get-cached-or-fetch "wttrin")
;;;###autoload
-(defun debug-wttrin-show-raw (location)
+(defun wttrin-debug-show-raw (location)
"Fetch and display raw wttr.in data for LOCATION with line numbers.
This is useful for debugging header parsing issues.
Always fetches fresh data from the API, bypassing cache."
@@ -61,7 +64,7 @@ Always fetches fresh data from the API, bypassing cache."
(switch-to-buffer (current-buffer)))))))
;;;###autoload
-(defun debug-wttrin-enable ()
+(defun wttrin-debug-enable ()
"Enable wttrin debug mode.
Raw weather data will be saved to timestamped files for bug reports."
(interactive)
@@ -69,14 +72,14 @@ Raw weather data will be saved to timestamped files for bug reports."
(message "Wttrin debug mode enabled. Raw data will be saved to: %s" temporary-file-directory))
;;;###autoload
-(defun debug-wttrin-disable ()
+(defun wttrin-debug-disable ()
"Disable wttrin debug mode."
(interactive)
(setq wttrin-debug nil)
(message "Wttrin debug mode disabled"))
;;;###autoload
-(defun debug-wttrin-mode-line ()
+(defun wttrin-debug-mode-line ()
"Display detailed mode-line information for the wttrin buffer.
This is useful for diagnosing why the mode-line lighter isn't appearing."
(interactive)
@@ -107,7 +110,7 @@ This is useful for diagnosing why the mode-line lighter isn't appearing."
"Auto-generate mode-line diagnostic information.
Called after every weather buffer display. A no-op stub in wttrin.el
is overridden by this implementation when the debug module is loaded."
- (debug-wttrin-mode-line))
+ (wttrin-debug-mode-line))
(defvar wttrin--debug-log nil
"List of debug log entries. Each entry is (timestamp . message).")
@@ -143,5 +146,18 @@ Messages are stored in `wttrin--debug-log' for later review."
(goto-char (point-min))
(display-buffer (current-buffer))))
+;;; Obsolete aliases for the old `debug-wttrin-*' names.
+;; Kept so existing keybindings and configurations keep working; emit
+;; a byte-compile / runtime obsolescence warning to nudge migration.
+
+(define-obsolete-function-alias 'debug-wttrin-show-raw
+ 'wttrin-debug-show-raw "0.4.0")
+(define-obsolete-function-alias 'debug-wttrin-enable
+ 'wttrin-debug-enable "0.4.0")
+(define-obsolete-function-alias 'debug-wttrin-disable
+ 'wttrin-debug-disable "0.4.0")
+(define-obsolete-function-alias 'debug-wttrin-mode-line
+ 'wttrin-debug-mode-line "0.4.0")
+
(provide 'wttrin-debug)
;;; wttrin-debug.el ends here