[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/realgud-lldb 4afe1ca 51/56: Merge branch 'master' of gi

From: Rocky Bernstein
Subject: [elpa] externals/realgud-lldb 4afe1ca 51/56: Merge branch 'master' of github.com:realgud/realgud-lldb
Date: Thu, 23 May 2019 02:11:48 -0400 (EDT)

branch: externals/realgud-lldb
commit 4afe1caed95968bdfe9605b0be0f0b32fe60ec24
Merge: c44882b 4bfd53a
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Merge branch 'master' of github.com:realgud/realgud-lldb
 lldb/core.el             |  62 +++++++++++++-------------
 lldb/init.el             | 111 ++++++++++++++++++++++++-----------------------
 lldb/lldb.el             |  40 ++++++++---------
 lldb/track-mode.el       |  32 +++++++-------
 realgud-lldb.el          |   2 +-
 test/test-lldb.el        |  28 ++++++------
 test/test-regexp-lldb.el |   8 ++--
 7 files changed, 143 insertions(+), 140 deletions(-)

diff --git a/lldb/core.el b/lldb/core.el
index 8abc61f..f5ba3d1 100644
--- a/lldb/core.el
+++ b/lldb/core.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2016 Rocky Bernstein
+;; Copyright (C) 2016, 2019 Rocky Bernstein
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'realgud)
@@ -24,34 +24,34 @@
 ;; FIXME: I think the following could be generalized and moved to
 ;; realgud-... probably via a macro.
-(defvar realgud:lldb-minibuffer-history nil
+(defvar realgud--lldb-minibuffer-history nil
   "minibuffer history list for the command `lldb'.")
-(easy-mmode-defmap realgud:lldb-minibuffer-local-map
+(easy-mmode-defmap realgud--lldb-minibuffer-local-map
   '(("\C-i" . comint-dynamic-complete-filename))
   "Keymap for minibuffer prompting of gud startup command."
   :inherit minibuffer-local-map)
 ;; FIXME: I think this code and the keymaps and history
 ;; variable chould be generalized, perhaps via a macro.
-(defun realgud:lldb-query-cmdline (&optional opt-debugger)
+(defun realgud--lldb-query-cmdline (&optional opt-debugger)
-   'realgud:lldb-suggest-invocation
-   realgud:lldb-minibuffer-local-map
-   'realgud:lldb-minibuffer-history
+   'realgud--lldb-suggest-invocation
+   realgud--lldb-minibuffer-local-map
+   'realgud--lldb-minibuffer-history
-(defvar realgud:lldb-file-remap (make-hash-table :test 'equal)
+(defvar realgud--lldb-file-remap (make-hash-table :test 'equal)
   "How to remap lldb files in  when we otherwise can't find in
   the filesystem. The hash key is the file string we saw, and the
   value is associated filesystem string presumably in the
-(defun realgud:lldb-find-file(cmd-marker filename directory)
+(defun realgud--lldb-find-file(cmd-marker filename directory)
   "A find-file specific for lldb. We will prompt for a mapping and save that in
-`realgud:lldb-file-remap' when that works."
+`realgud--lldb-file-remap' when that works."
   (let ((resolved-filename filename)
-       (remapped-filename (gethash filename realgud:lldb-file-remap)))
+       (remapped-filename (gethash filename realgud--lldb-file-remap)))
      ((and remapped-filename (stringp remapped-filename)
           (file-exists-p remapped-filename)) remapped-filename)
@@ -60,10 +60,10 @@
       (setq resolved-filename
             (compilation-find-file (point-marker) filename nil "")))
-      (puthash filename resolved-filename realgud:lldb-file-remap)))
+      (puthash filename resolved-filename realgud--lldb-file-remap)))
-(defun realgud:cmd-lldb-break()
+(defun realgud--cmd-lldb-break()
   "Set a breakpoint storing mapping between a file and its basename"
   (let* ((resolved-filename (realgud-expand-format "%X"))
         (cmdbuf (realgud-get-cmdbuf))
@@ -71,7 +71,7 @@
     ;; Save mapping from basename to long name so that we know what's
     ;; up in a "Breakpoint set at" message
-    (puthash filename resolved-filename realgud:lldb-file-remap)
+    (puthash filename resolved-filename realgud--lldb-file-remap)
     ;; Run actual command
@@ -81,13 +81,13 @@
 ;; FIXME: setting a breakpoint should add a[ file-to-basename mapping
 ;; so that when this is called it can look up the short name and
 ;; remap it.
-(defun realgud:lldb-loc-fn-callback(text filename lineno source-str
+(defun realgud--lldb-loc-fn-callback(text filename lineno source-str
                                         cmd-mark directory column)
   (realgud:file-loc-from-line filename lineno
                              cmd-mark source-str nil nil directory))
-                             ;; 'realgud:lldb-find-file directory))
+                             ;; 'realgud--lldb-find-file directory))
-(defun realgud:lldb-parse-cmd-args (orig-args)
+(defun realgud--lldb-parse-cmd-args (orig-args)
   "Parse command line ARGS for the annotate level and name of script to debug.
 ORIG_ARGS should contain a tokenized list of the command line to run.
@@ -167,9 +167,9 @@ Note that path elements have been expanded via 
        (list debugger-args nil script-args annotate-p)))))
-(defvar realgud:lldb-command-name)
+(defvar realgud--lldb-command-name)
-(defun realgud:lldb-executable (file-name)
+(defun realgud--lldb-executable (file-name)
 "Return a priority for whether file-name is likely we can run lldb on"
   (let ((output (shell-command-to-string (format "file %s" file-name))))
@@ -179,7 +179,7 @@ Note that path elements have been expanded via 
      ('t 5))))
-(defun realgud:lldb-suggest-invocation (&optional debugger-name)
+(defun realgud--lldb-suggest-invocation (&optional debugger-name)
   "Suggest a lldb command invocation. Here is the priority we use:
 * an executable file with the name of the current buffer stripped of its 
 * any executable file in the current directory with no extension
@@ -192,7 +192,7 @@ When all else fails return the empty string."
         (try-filename (file-name-base (or (buffer-file-name) "lldb"))))
     (when (member try-filename (directory-files default-directory))
        (setq best-filename try-filename)
-       (setq priority (+ (realgud:lldb-executable try-filename) 2)))
+       (setq priority (+ (realgud--lldb-executable try-filename) 2)))
     ;; FIXME: I think a better test would be to look for
     ;; c-mode in the buffer that have a corresponding executable
@@ -203,17 +203,17 @@ When all else fails return the empty string."
          (if (equal try-filename (file-name-sans-extension try-filename))
                (setq best-filename try-filename)
-               (setq priority (1+ (realgud:lldb-executable best-filename))))
+               (setq priority (1+ (realgud--lldb-executable best-filename))))
            ;; else
              (setq best-filename try-filename)
-             (setq priority (realgud:lldb-executable best-filename))
+             (setq priority (realgud--lldb-executable best-filename))
     (if (< priority 8)
-        (realgud:lldb-minibuffer-history
-         (car realgud:lldb-minibuffer-history))
+        (realgud--lldb-minibuffer-history
+         (car realgud--lldb-minibuffer-history))
         ((equal priority 7)
          (concat "lldb " best-filename))
         (t "lldb "))
@@ -221,7 +221,7 @@ When all else fails return the empty string."
       (concat "lldb " best-filename))
-(defun realgud:lldb-reset ()
+(defun realgud--lldb-reset ()
   "Lldb cleanup - remove debugger's internal buffers (frame,
 breakpoints, etc.)."
@@ -240,9 +240,9 @@ breakpoints, etc.)."
 ;;       lldb-debugger-support-minor-mode-map-when-deactive))
-(defun realgud:lldb-customize ()
-  "Use `customize' to edit the settings of the `realgud:lldb' debugger."
+(defun realgud--lldb-customize ()
+  "Use `customize' to edit the settings of the `realgud--lldb' debugger."
-  (customize-group 'realgud:lldb))
+  (customize-group 'realgud--lldb))
-(provide-me "realgud:lldb-")
+(provide-me "realgud--lldb-")
diff --git a/lldb/init.el b/lldb/init.el
index 990f144..aa20598 100644
--- a/lldb/init.el
+++ b/lldb/init.el
@@ -19,14 +19,17 @@
 (require 'realgud)
-(defvar realgud-pat-hash)
-(declare-function make-realgud-loc-pat (realgud-loc))
-(defvar realgud:lldb-pat-hash (make-hash-table :test 'equal)
+(defvar realgud--lldb-pat-hash (make-hash-table :test 'equal)
   "hash key is the what kind of pattern we want to match:
 backtrace, prompt, etc.  the values of a hash entry is a
 realgud-loc-pat struct")
+(defvar realgud-pat-hash
+  nil
+  "A buffer local hash table which maps a debugger name, .e.g. 'lldb' to its
+the debugger specific hash table, e.g. 'realugd-lldd-pat-hash'.")
+(declare-function make-realgud-loc-pat (realgud-loc))
 (declare-function make-realgud-loc "realgud-loc" (a b c d e f))
@@ -38,35 +41,35 @@ realgud-loc-pat struct")
 ;;   SolidityParserError.cpp:102
 ;; Note the minimal-match regexp up to the first colon
-(defconst realgud:lldb-file-col-regexp
+(defconst realgud--lldb-file-col-regexp
   (format "\\(.+?\\):%s\\(?::%s\\)?"
-(defconst realgud:lldb-frame-start-regexp
+(defconst realgud--lldb-frame-start-regexp
 ;; Some versions of lldb insert "frame" and some don't.
-(defconst realgud:lldb-frame-num-regexp
+(defconst realgud--lldb-frame-num-regexp
   (format "[ ]*\\(?:frame \\)?#%s[:]? "
-(setf (gethash "loc-callback-fn" realgud:lldb-pat-hash) 
+(setf (gethash "loc-callback-fn" realgud--lldb-pat-hash) 
 ;; realgud-loc-pat that describes a lldb location generally shown
 ;; before a command prompt.
 ;; For example:
 ;; * thread #1: tid = 12866, 0x00000000004004b4 hello`main(argc=1, 
argv=0x00007fffffffd668) + 4 at hello.c:5, name = 'hello', stop reason = 
breakpoint 1.1
-(setf (gethash "loc" realgud:lldb-pat-hash)
+(setf (gethash "loc" realgud--lldb-pat-hash)
        :regexp (format "^\\* thread #%s: .+ at %s, "
-                      realgud:regexp-captured-num realgud:lldb-file-col-regexp)
+                      realgud:regexp-captured-num 
        :file-group 2
        :line-group 3
        :column-group 4))
 ;; Top frame number
-(setf (gethash "top-frame-num" realgud:lldb-pat-hash) 0)
+(setf (gethash "top-frame-num" realgud--lldb-pat-hash) 0)
 ;; realgud-loc-pat that describes a lldb frame generally shown
 ;; before a command prompt or in frame switching commands
@@ -75,11 +78,11 @@ realgud-loc-pat struct")
 ;; #0  main (argc=2, argv=0xbffff564, envp=0xbffff570) at main.c:935
 ;; instead
-(setf (gethash "selected-frame" realgud:lldb-pat-hash)
+(setf (gethash "selected-frame" realgud--lldb-pat-hash)
        :regexp         (format "^%s.* at %s"
-                       realgud:lldb-frame-num-regexp
-                       realgud:lldb-file-col-regexp
+                       realgud--lldb-frame-num-regexp
+                       realgud--lldb-file-col-regexp
        :num 1
        :file-group 2
@@ -89,7 +92,7 @@ realgud-loc-pat struct")
 ;; realgud-loc-pat that describes a lldb prompt
 ;; For example:
 ;;   (lldb)
-(setf (gethash "prompt" realgud:lldb-pat-hash)
+(setf (gethash "prompt" realgud--lldb-pat-hash)
        :regexp   "^(lldb) "
@@ -97,11 +100,11 @@ realgud-loc-pat struct")
 ;; realgud-loc-pat that describes a "breakpoint set" line
 ;; For example:
 ;;   Breakpoint 1: where = hello`main + 4 at hello.c:5, address = 
-(setf (gethash "brkpt-set" realgud:lldb-pat-hash)
+(setf (gethash "brkpt-set" realgud--lldb-pat-hash)
        :regexp (format "^Breakpoint %s: .* at %s, "
-                      realgud:lldb-file-col-regexp)
+                      realgud--lldb-file-col-regexp)
        :num 1
        :file-group 2
        :line-group 3
@@ -116,12 +119,12 @@ realgud-loc-pat struct")
 ;; #46 0xb7f51b87 in vm_call_cfunc (th=0x804d188, reg_cfp=0xb7ba9e88, num=0,
 ;;    recv=157798080, blockptr=0x0, me=0x80d12a0) at vm_insnhelper.c:410
-(setf (gethash "debugger-backtrace" realgud:lldb-pat-hash)
+(setf (gethash "debugger-backtrace" realgud--lldb-pat-hash)
-       :regexp         (concat realgud:lldb-frame-start-regexp
-                       realgud:lldb-frame-num-regexp
+       :regexp         (concat realgud--lldb-frame-start-regexp
+                       realgud--lldb-frame-num-regexp
                        "\\(?:.\\|\\(?:[\n] \\)\\)+[ ]+at "
-                       realgud:lldb-file-col-regexp
+                       realgud--lldb-file-col-regexp
        :num 1
        :file-group 2
@@ -134,7 +137,7 @@ realgud-loc-pat struct")
 ;; For example:
 ;; 1: name = 'main', locations = 1, resolved = 1, hit count = 1
 ;;  1.1: where = solc`main + 48 at main.cpp:55:2, address = 
0x000000010004a5e0, resolved, hit count = 1
-(setf (gethash "debugger-breakpoint" realgud:lldb-pat-hash)
+(setf (gethash "debugger-breakpoint" realgud--lldb-pat-hash)
    :regexp (format "^[ \t]*\\([0-9.]\\)+: where = .* at \\(.+\\):%s:%s"
                   realgud:regexp-captured-num realgud:regexp-captured-num)
@@ -144,7 +147,7 @@ realgud-loc-pat struct")
    :column-group 4)
-(setf (gethash "font-lock-keywords" realgud:lldb-pat-hash)
+(setf (gethash "font-lock-keywords" realgud--lldb-pat-hash)
        ;; #2  0x080593ac in main (argc=2, argv=0xbffff5a4, envp=0xbffff5b0)
        ;;    at main.c:952
@@ -159,7 +162,7 @@ realgud-loc-pat struct")
         (1 realgud-backtrace-number-face))
-(setf (gethash "font-lock-breakpoint-keywords" realgud:gdb-pat-hash)
+(setf (gethash "font-lock-breakpoint-keywords" realgud--lldb-pat-hash)
     ;; The breakpoint number, type and disposition
     ;;  1.1: where =
@@ -172,37 +175,37 @@ realgud-loc-pat struct")
 ;;  Prefix used in variable names (e.g. short-key-mode-map) for
 ;; this debugger
-(setf (gethash "lldb" realgud:variable-basename-hash) "realgud:lldb")
+(setf (gethash "lldb" realgud:variable-basename-hash) "realgud--lldb")
-(defvar realgud:lldb-command-hash (make-hash-table :test 'equal)
+(defvar realgud--lldb-command-hash (make-hash-table :test 'equal)
   "Hash key is command name like 'continue' and the value is
   the lldb command to use, like 'process continue'")
-(setf (gethash "backtrace"        realgud:lldb-command-hash) "bt")
-(setf (gethash "break"            realgud:lldb-command-hash) "b %X:%l")
-(setf (gethash "lldb-break"       realgud:lldb-command-hash) "b %X:%l")
-(setf (gethash "delete"           realgud:lldb-command-hash) "break delete %p")
-(setf (gethash "clear"            realgud:lldb-command-hash) "break clear 
-(setf (gethash "continue"         realgud:lldb-command-hash) "process 
-(setf (gethash "delete"           realgud:lldb-command-hash) 
"*not-implemented*")  ;; Or rather don't know what the equvalent is
-(setf (gethash "delete_all"       realgud:lldb-command-hash) 
-(setf (gethash "disable"          realgud:lldb-command-hash) "break disable 
-(setf (gethash "disable-all"      realgud:lldb-command-hash) "break disable")
-(setf (gethash "down"             realgud:lldb-command-hash) "down %p")
-(setf (gethash "enable"           realgud:lldb-command-hash) "break enable %p")
-(setf (gethash "enable-all"       realgud:lldb-command-hash) "break enable")
-(setf (gethash "eval"             realgud:lldb-command-hash) "print %s")
-(setf (gethash "finish"           realgud:lldb-command-hash) "thread step-out")
-(setf (gethash "frame"            realgud:lldb-command-hash) "frame select %p")
-(setf (gethash "info-breakpoints" realgud:lldb-command-hash) "break list")
-(setf (gethash "quit"             realgud:lldb-command-hash) "quit")
-(setf (gethash "restart"          realgud:lldb-command-hash) "run")
-(setf (gethash "step"             realgud:lldb-command-hash) "thread step-in 
--count %p")
-(setf (gethash "shell"            realgud:lldb-command-hash) "platform shell 
-(setf (gethash "until"            realgud:lldb-command-hash) "thread until %l")
-(setf (gethash "up"               realgud:lldb-command-hash) "up %p")
-(setf (gethash "lldb" realgud-command-hash) realgud:lldb-command-hash)
-(setf (gethash "lldb" realgud-pat-hash) realgud:lldb-pat-hash)
-(provide-me "realgud:lldb-")
+(setf (gethash "backtrace"        realgud--lldb-command-hash) "bt")
+(setf (gethash "break"            realgud--lldb-command-hash) "b %X:%l")
+(setf (gethash "lldb-break"       realgud--lldb-command-hash) "b %X:%l")
+(setf (gethash "delete"           realgud--lldb-command-hash) "break delete 
+(setf (gethash "clear"            realgud--lldb-command-hash) "break clear 
+(setf (gethash "continue"         realgud--lldb-command-hash) "process 
+(setf (gethash "delete"           realgud--lldb-command-hash) 
"*not-implemented*")  ;; Or rather don't know what the equvalent is
+(setf (gethash "delete_all"       realgud--lldb-command-hash) 
+(setf (gethash "disable"          realgud--lldb-command-hash) "break disable 
+(setf (gethash "disable-all"      realgud--lldb-command-hash) "break disable")
+(setf (gethash "down"             realgud--lldb-command-hash) "down %p")
+(setf (gethash "enable"           realgud--lldb-command-hash) "break enable 
+(setf (gethash "enable-all"       realgud--lldb-command-hash) "break enable")
+(setf (gethash "eval"             realgud--lldb-command-hash) "print %s")
+(setf (gethash "finish"           realgud--lldb-command-hash) "thread 
+(setf (gethash "frame"            realgud--lldb-command-hash) "frame select 
+(setf (gethash "info-breakpoints" realgud--lldb-command-hash) "break list")
+(setf (gethash "quit"             realgud--lldb-command-hash) "quit")
+(setf (gethash "restart"          realgud--lldb-command-hash) "run")
+(setf (gethash "step"             realgud--lldb-command-hash) "thread step-in 
--count %p")
+(setf (gethash "shell"            realgud--lldb-command-hash) "platform shell 
+(setf (gethash "until"            realgud--lldb-command-hash) "thread until 
+(setf (gethash "up"               realgud--lldb-command-hash) "up %p")
+(setf (gethash "lldb" realgud-command-hash) realgud--lldb-command-hash)
+(setf (gethash "lldb" realgud-pat-hash) realgud--lldb-pat-hash)
+(provide-me "realgud--lldb-")
diff --git a/lldb/lldb.el b/lldb/lldb.el
index b747d0b..5954263 100644
--- a/lldb/lldb.el
+++ b/lldb/lldb.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2016, 2018 Rocky Bernstein
+;; Copyright (C) 2016, 2018, 2019 Rocky Bernstein
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -13,14 +13,14 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-;;  `realgud:lldb' Main interface to lldb via Emacs
+;;  `realgud--lldb' Main interface to lldb via Emacs
 (require 'load-relative)
 (require 'realgud)
-(require-relative-list '("core" "track-mode") "realgud:lldb-")
+(require-relative-list '("core" "track-mode") "realgud--lldb-")
 ;; This is needed, or at least the docstring part of it is needed to
 ;; get the customization menu to work in Emacs 24.
-(defgroup realgud:lldb nil
+(defgroup realgud--lldb nil
   "The realgud interface to lldb"
   :group 'realgud
   :version "24.3")
@@ -29,27 +29,27 @@
 ;; User definable variables
-(defcustom realgud:lldb-command-name
+(defcustom realgud--lldb-command-name
   "File name for executing the and command options.
 This should be an executable on your path, or an absolute file name."
   :type 'string
-  :group 'realgud:lldb)
+  :group 'realgud--lldb)
-(declare-function realgud:lldb-track-mode     'realgud:lldb-track-mode)
-(declare-function realgud-command             'realgud:lldb-core)
-(declare-function realgud:lldb-parse-cmd-args 'realgud:lldb-core)
-(declare-function realgud:lldb-query-cmdline  'realgud:lldb-core)
-(declare-function realgud:run-process         'realgud-core)
-(declare-function realgud:flatten             'realgud-utils)
-(declare-function realgud:remove-ansi-schmutz 'realgud-utils)
+(declare-function realgud--lldb-track-mode     'realgud--lldb-track-mode)
+(declare-function realgud-command              'realgud-send)
+(declare-function realgud--lldb-parse-cmd-args 'realgud--lldb-core)
+(declare-function realgud--lldb-query-cmdline  'realgud--lldb-core)
+(declare-function realgud:run-process          'realgud-run)
+(declare-function realgud:flatten              'realgud-utils)
+(declare-function realgud:remove-ansi-schmutz  'realgud-utils)
 ;; -------------------------------------------------------------------
 ;; The end.
-(defun realgud:lldb (&optional opt-cmd-line no-reset)
+(defun realgud--lldb (&optional opt-cmd-line no-reset)
   "Invoke the lldb debugger and start the Emacs user interface.
 OPT-CMD-LINE is treated like a shell string; arguments are
@@ -64,21 +64,21 @@ marginal icons is reset. See `loc-changes-clear-buffer' to 
 fringe and marginal icons.
-  (let* ((cmd-str (or opt-cmd-line (realgud:lldb-query-cmdline "lldb")))
+  (let* ((cmd-str (or opt-cmd-line (realgud--lldb-query-cmdline "lldb")))
         (cmd-args (split-string-and-unquote cmd-str))
-        (parsed-args (realgud:lldb-parse-cmd-args cmd-args))
+        (parsed-args (realgud--lldb-parse-cmd-args cmd-args))
         (script-args (caddr parsed-args))
         (script-name (car script-args))
          (cl-remove-if 'nil (realgud:flatten parsed-args)))
-        (cmd-buf (realgud:run-process realgud:lldb-command-name
+        (cmd-buf (realgud:run-process realgud--lldb-command-name
                                       script-name parsed-cmd-args
-                                      'realgud:lldb-minibuffer-history
+                                      'realgud--lldb-minibuffer-history
     (if cmd-buf
        (with-current-buffer cmd-buf
-         (set (make-local-variable 'realgud:lldb-file-remap)
+         (set (make-local-variable 'realgud--lldb-file-remap)
               (make-hash-table :test 'equal))
@@ -86,7 +86,7 @@ fringe and marginal icons.
-(defalias 'lldb 'realgud:lldb)
+(defalias 'lldb 'realgud--lldb)
 (provide-me "realgud-")
diff --git a/lldb/track-mode.el b/lldb/track-mode.el
index 215262b..738b811 100644
--- a/lldb/track-mode.el
+++ b/lldb/track-mode.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2016 Rocky Bernstein
+;; Copyright (C) 2016, 2019 Rocky Bernstein
 ;;; track-mode.el ---
 ;; This program is free software; you can redistribute it and/or modify
@@ -16,51 +16,51 @@
 ;; lldb tracking a comint or eshell buffer.
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'realgud)
-(require-relative-list '("core" "init") "realgud:lldb-")
+(require-relative-list '("core" "init") "realgud--lldb-")
-(realgud-track-mode-vars "realgud:lldb")
+(realgud-track-mode-vars "realgud--lldb")
 (declare-function realgud-track-mode 'realgud-track-mode)
 (declare-function realgud:track-mode-hook 'realgud-track-mode)
 (declare-function realgud-track-mode-setup 'realgud-track-mode)
 (declare-function realgud:track-set-debugger 'realgud-track-mode)
-(define-key realgud:lldb-track-mode-map
+(define-key realgud--lldb-track-mode-map
   (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
-(defun realgud:lldb-track-mode-hook()
-  (use-local-map realgud:lldb-track-mode-map)
+(defun realgud--lldb-track-mode-hook()
+  (use-local-map realgud--lldb-track-mode-map)
   (realgud-track-mode-setup 't)
-  (message "realgud:lldb track-mode-hook called")
+  (message "realgud--lldb track-mode-hook called")
-(define-minor-mode realgud:lldb-track-mode
+(define-minor-mode realgud--lldb-track-mode
   "Minor mode for tracking lldb inside a process shell via realgud.
 If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
 Key bindings:
   :init-value nil
   ;; :lighter " lldb"   ;; mode-line indicator from realgud-track is 
   ;; The minor mode bindings.
   :global nil
-  :group 'realgud:lldb
-  :keymap realgud:lldb-track-mode-map
-  (if realgud:lldb-track-mode
+  :group 'realgud--lldb
+  :keymap realgud--lldb-track-mode-map
+  (if realgud--lldb-track-mode
        (realgud:track-set-debugger "lldb")
-        (realgud:lldb-track-mode-hook)
+        (realgud--lldb-track-mode-hook)
-      (setq realgud::lldb-track-mode nil)
+      (setq realgud--lldb-track-mode nil)
-(provide-me "realgud:lldb-")
+(provide-me "realgud--lldb-")
 ;;; track-mode.el ends here
diff --git a/realgud-lldb.el b/realgud-lldb.el
index 0638adc..464871d 100644
--- a/realgud-lldb.el
+++ b/realgud-lldb.el
@@ -1,7 +1,7 @@
 ;;; realgud-lldb.el --- realgud front-end to lldb
 ;; Author: Rocky Bernstein
-;; Version: 1.0
+;; Version: 1.0.0
 ;; Package-Requires: ((realgud "1.4.5") (emacs "24"))
 ;; URL: http://github.com/rocky/realgud-lldb
 ;; Compatibility: GNU Emacs 24.x
diff --git a/test/test-lldb.el b/test/test-lldb.el
index 7db0984..32a131d 100644
--- a/test/test-lldb.el
+++ b/test/test-lldb.el
@@ -7,21 +7,21 @@
 (load-file "./regexp-helper.el")
-  (defvar realgud:lldb-minibuffer-history)
+  (defvar realgud--lldb-minibuffer-history)
   (defvar test:realgud-lldb-executable-save)
   (defvar test:realgud-minibuffer-history-save)
-(declare-function realgud:lldb-suggest-invocation 'realgud:bashdb)
+(declare-function realgud--lldb-suggest-invocation 'realgud:bashdb)
 (declare-function __FILE__              'require-relative)
 ;; Save value realgud:run-process and change it to something we want
-(setq test:realgud-lldb-executable-save (symbol-function 
-(setq test:realgud-minibuffer-history-save realgud:lldb-minibuffer-history)
+(setq test:realgud-lldb-executable-save (symbol-function 
+(setq test:realgud-minibuffer-history-save realgud--lldb-minibuffer-history)
-(defun realgud:lldb-executable (filename)
+(defun realgud--lldb-executable (filename)
   "Mock function for testing"
   (cond ((equal filename "bar.sh") 7)
        ((equal filename "foo") 8)
@@ -29,29 +29,29 @@
        (t 3)))
 (defun lldb-test()
-  (note "realgud:lldb-suggest-invocation")
-  (setq realgud:lldb-minibuffer-history nil)
+  (note "realgud--lldb-suggest-invocation")
+  (setq realgud--lldb-minibuffer-history nil)
   (let ((my-directory (file-name-directory (__FILE__))))
       (note "Test preference to buffer editing")
       (setq default-directory
            (concat my-directory "lldb"))
       (find-file-literally "foo.c")
-      (assert-equal "lldb foo" (realgud:lldb-suggest-invocation)
+      (assert-equal "lldb foo" (realgud--lldb-suggest-invocation)
                    "Should find file sans extension - foo")
       (find-file-literally "baz.c")
-      (assert-equal "lldb baz" (realgud:lldb-suggest-invocation)
+      (assert-equal "lldb baz" (realgud--lldb-suggest-invocation)
                    "Should find file sans extension - baz")
       (note "Pick up non-sans executable")
       (setq default-directory
            (concat my-directory  "lldb/test2"))
-      ;; (assert-equal "lldb bar.sh" (realgud:lldb-suggest-invocation))
-      (setq realgud:lldb-minibuffer-history '("lldb testing"))
+      ;; (assert-equal "lldb bar.sh" (realgud--lldb-suggest-invocation))
+      (setq realgud--lldb-minibuffer-history '("lldb testing"))
       (setq default-directory
            (concat my-directory  "lldb/test2"))
-      (assert-equal "lldb testing" (realgud:lldb-suggest-invocation)
+      (assert-equal "lldb testing" (realgud--lldb-suggest-invocation)
                    "After setting minibuffer history - takes precidence")
     (setq default-directory my-directory)
@@ -62,6 +62,6 @@
 ;; Restore the old values.
 ;; You might have to run the below if you run this interactively.
-(fset 'realgud:lldb-executable test:realgud-lldb-executable-save)
-(setq realgud:lldb-minibuffer-history test:realgud-minibuffer-history-save)
+(fset 'realgud--lldb-executable test:realgud-lldb-executable-save)
+(setq realgud--lldb-minibuffer-history test:realgud-minibuffer-history-save)
 (setq default-directory (file-name-directory (__FILE__)))
diff --git a/test/test-regexp-lldb.el b/test/test-regexp-lldb.el
index 21cb4d6..8f8e136 100644
--- a/test/test-regexp-lldb.el
+++ b/test/test-regexp-lldb.el
@@ -18,7 +18,7 @@
   (defvar loc-pat)       (defvar prompt-pat)       (defvar bps-pat)
   (defvar file-group)    (defvar line-group)       (defvar test-pos)
   (defvar test-dbgr)     (defvar test-text)        (defvar realgud-bt-pat)
-  (defvar realgud-bt-re) (defvar realgud:lldb-pat-hash)
+  (defvar realgud-bt-re) (defvar realgud--lldb-pat-hash)
 ; Some setup usually done in setting up the buffer.
@@ -48,7 +48,7 @@
 ;;                         test-text) "extract line number")
 (note "debugger-backtrace")
 (setq realgud-bt-pat  (gethash "debugger-backtrace"
-                           realgud:lldb-pat-hash))
+                              realgud--lldb-pat-hash))
 (setq test-text
       "#0  main (argc=2, argv=0xbffff564, envp=0xbffff570) at main.c:935
 #1  0xb7e9f4a5 in *__GI___strdup (s=0xbffff760 \"/tmp/remake/remake\") at 
@@ -108,7 +108,7 @@
                         (match-end line-group)))
 (set (make-local-variable 'bps-pat)
-     (gethash "brkpt-set"  realgud:lldb-pat-hash))
+     (gethash "brkpt-set"  realgud--lldb-pat-hash))
 (setq test-text "Breakpoint 1: where = solptest`main + 9 at 
unit_test_main.ipp:303:12, address = 0x00000001002380d9")
@@ -162,7 +162,7 @@
 (note "prompt")
 (set (make-local-variable 'prompt-pat)
-     (gethash "prompt" realgud:lldb-pat-hash))
+     (gethash "prompt" realgud--lldb-pat-hash))
 (prompt-match "(lldb) ")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]