branch: externals/realgud
commit 30723de789ec18b72a18aeb000df94f817d744c0
Author: rocky <[email protected]>
Commit: rocky <[email protected]>

    Lint and testing changes
---
 realgud/common/buffer/backtrace.el  |  2 +-
 realgud/common/buffer/breakpoint.el |  8 ++++----
 realgud/common/buffer/command.el    |  2 +-
 realgud/common/cmds.el              |  6 +++---
 realgud/common/file.el              | 18 +++++++++---------
 realgud/common/loc.el               |  4 ++--
 test/test-lang.el                   |  5 ++++-
 test/test-regexp-python.el          |  7 ++++---
 8 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/realgud/common/buffer/backtrace.el 
b/realgud/common/buffer/backtrace.el
index 73c958a264..abb10ecf56 100644
--- a/realgud/common/buffer/backtrace.el
+++ b/realgud/common/buffer/backtrace.el
@@ -376,7 +376,7 @@ frame-num property"
 (defun realgud-goto-frame-n ()
   "Go to the frame number indicated by the accumulated numeric keys just 
entered.
 
-This function is usually bound to a numeric key in a frame
+This function is usually bound to a numeric key in a \"frame\"
 secondary buffer. To go to an entry above 9, just keep entering
 the number. For example, if you press 1 and then 9, frame 1 is selected
 (if it exists) and then frame 19 (if that exists). Entering any
diff --git a/realgud/common/buffer/breakpoint.el 
b/realgud/common/buffer/breakpoint.el
index a5e3c1bffa..2b372ef761 100644
--- a/realgud/common/buffer/breakpoint.el
+++ b/realgud/common/buffer/breakpoint.el
@@ -2,7 +2,7 @@
 
 ;; Author: Rocky Bernstein <[email protected]>
 
-;; Copyright (C) 2019 Free Software Foundation, Inc
+;; Copyright (C) 2019, 2026 Free Software Foundation, Inc
 
 ;; This program is free software: you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -29,7 +29,7 @@
 (require-relative-list
  '("command") "realgud-buffer-")
 
-(declare-function realgud-breakpoint-mode              'realgud-breakpoint-mod)
+(declare-function realgud-breakpoint-mode             'realgud-breakpoint-mod)
 (declare-function realgud-get-buffer-base-name        
'realgud-buffer-backtrace)
 (declare-function realgud-cmdbuf-debugger-name        'realgud-buffer-command)
 (declare-function realgud-cmdbuf?                     'realgud-buffer-command)
@@ -198,7 +198,7 @@ non-digit will start entry number from the beginning again."
 
 (defun realgud-goto-breakpoint ()
   "Go to the breakpoint number. We get the breakpoint number from the
-brkpt-num property"
+\'brkpt-num property"
   (interactive)
   (if (realgud-breakpoint?)
       (let ((loc (get-text-property (point) 'loc)))
@@ -226,7 +226,7 @@ brkpt-num property"
 (defun realgud-goto-breakpoint-n ()
   "Goto breakpoint number indicated by the accumulated numeric keys just 
entered.
 
-This function is usually bound to a numeric key in a frame
+This function is usually bound to a numeric key in a \"frame\"
 secondary buffer. To go to an entry above 9, just keep entering
 the number. For example, if you press 1 and then 9, frame 1 is selected
 (if it exists) and then frame 19 (if that exists). Entering any
diff --git a/realgud/common/buffer/command.el b/realgud/common/buffer/command.el
index 239f64d616..5a06599ef8 100644
--- a/realgud/common/buffer/command.el
+++ b/realgud/common/buffer/command.el
@@ -235,7 +235,7 @@
                                         (substring (symbol-name object) 1)))
                ((symbolp object)      (json-encode-string
                                         (symbol-name object)))
-               ((numberp object)      (json-encode-number object))
+               ((numberp object)      (json-encode object))
                ((arrayp object)       (json-encode-array object))
                ((hash-table-p object) (realgud:org-mode-encode-htable object))
                ;; ((listp object)        (realgud:org-mode-encodelist object))
diff --git a/realgud/common/cmds.el b/realgud/common/cmds.el
index 9c7facfed8..987f7499e4 100644
--- a/realgud/common/cmds.el
+++ b/realgud/common/cmds.el
@@ -343,8 +343,8 @@ EVENT should be a mouse click on the left fringe or margin."
 (defun realgud:cmd-finish(&optional arg)
     "Run until the completion of the current stack frame.
 
-This command is often referred to as 'step out' as opposed to
-'step over' or 'step into'."
+This command is often referred to as \"step out\" as opposed to
+\"step over\" or \"step into\"."
     (interactive "p")
     (realgud:cmd-run-command arg "finish")
 )
@@ -408,7 +408,7 @@ what is getting stepped."
 (defun realgud:cmd-next-no-arg()
   "Step one source line at current call level.
 
-The definition of 'next' is debugger specific so, see the
+The definition of \"next\" is debugger specific so, see the
 debugger documentation for a more complete definition of what is
 getting stepped."
     (interactive)
diff --git a/realgud/common/file.el b/realgud/common/file.el
index e5f2766d41..1a18f527a9 100644
--- a/realgud/common/file.el
+++ b/realgud/common/file.el
@@ -61,7 +61,7 @@ at LINE-NUMBER or nil if it is not there"
               (forward-line (1- line-number))
               (unless no-strip-blanks
                 (setq source-text (realgud:strip source-text)))
-              (when (search-forward source-text (point-at-eol))
+              (when (search-forward source-text (pos-at-eol))
                 (goto-char (match-beginning 0))
                 (current-column))))))
     (error nil)))
@@ -72,16 +72,16 @@ at LINE-NUMBER or nil if it is not there"
 (defun realgud:file-loc-from-line(filename line-number
                                           &optional column-number cmd-marker 
source-text bp-num
                                           find-file-fn directory)
-  "Return a realgud-loc for FILENAME, LINE-NUMBER and the
-other optional position information.
+  "Return a realgud-loc for FILENAME, LINE-NUMBER and the other
+optional position information.
 
-COLUMN-NUMBER is the optional staring column number. 0 is the first column.
-CMD-MARKER and BP-NUM get stored in the realgud-loc
+COLUMN-NUMBER is the optional staring column number. 0 is the first
+column.  CMD-MARKER and BP-NUM get stored in the realgud-loc
 object. FIND-FILE-FN is a function which do special things to
-transform filename so it can be found. This could include
-searching classpaths (in Java), stripping leading and trailing
-blanks, or deliberately ignoring 'pseudo-file patterns like (eval
-1) of Perl and <string> of Python.
+transform filename so it can be found. This could include searching
+classpaths (in Java), stripping leading and trailing blanks, or
+deliberately ignoring 'pseudo-file patterns like (eval 1) of Perl and
+<string> of Python.
 
 If we're unable find the source code we return a string describing the
 problem as best as we can determine."
diff --git a/realgud/common/loc.el b/realgud/common/loc.el
index fa5359cad4..f857c03895 100644
--- a/realgud/common/loc.el
+++ b/realgud/common/loc.el
@@ -54,8 +54,8 @@ want to save the values that were seen/requested originally."
 (defun realgud:buffer-line-no-props()
   "Returns a string containing the line that `point' is at,
 without buffer properties."
-  (buffer-substring-no-properties (pos-at-bol)
-                                 (pos-at-eol)))
+  (buffer-substring-no-properties (pos-bol)
+                                 (pos-eol)))
 
 (defun realgud:loc-describe (loc)
   "Display realgud-cmdcbuf-info.
diff --git a/test/test-lang.el b/test/test-lang.el
index c67df578d8..bb3c4dca18 100644
--- a/test/test-lang.el
+++ b/test/test-lang.el
@@ -8,6 +8,7 @@
 (eval-when-compile
   (defvar elisp-file)
   (defvar elisp-buffer)
+  (defvar suggested-file)
 )
 
 (set (make-local-variable 'elisp-file)
@@ -46,7 +47,9 @@
               "realgud-suggest-lang-file"
               )
 
-(assert-t (file-exists-p (realgud-suggest-lang-file "bogus" "\\.bogus$")))
+(setq suggested-file (realgud-suggest-lang-file "bogus" "\\.bogus$"))
+(if suggested-file
+    (assert-t (file-exists-p suggested-file)))
 
 (note "realgud:suggest-file-from-buffer")
 
diff --git a/test/test-regexp-python.el b/test/test-regexp-python.el
index 35301c2e04..abf04ac4d4 100644
--- a/test/test-regexp-python.el
+++ b/test/test-regexp-python.el
@@ -1,5 +1,6 @@
 ;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+;; (test-simple-run "emacs -batch -L %s -L %s -L %s -l %s" 
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory 
(locate-library "load-relative.elc")) (file-name-directory (locate-library 
"loc-changes.elc")) buffer-file-name)
+
 
 (require 'test-simple)
 (load-file "../realgud/lang/python.el")
@@ -35,7 +36,7 @@
                            test-text))
 
 (assert-equal "17"
-             (match-string (realgud-loc-pat-char-offset-group 
realgud-flake8-msg-loc-pat)
+             (match-string (realgud-loc-pat-column-group 
realgud-flake8-msg-loc-pat)
                            test-text))
 
 (setq test-text
@@ -54,7 +55,7 @@
                            test-text))
 
 (assert-equal "1"
-             (match-string (realgud-loc-pat-char-offset-group 
realgud-flake8-msg-loc-pat)
+             (match-string (realgud-loc-pat-column-group 
realgud-flake8-msg-loc-pat)
                            test-text))
 
 ;; FIXME add pytest testing

Reply via email to