[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-gauche 060b7ee 062/119: Finish symbol location
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-gauche 060b7ee 062/119: Finish symbol location |
Date: |
Sun, 1 Aug 2021 18:27:58 -0400 (EDT) |
branch: elpa/geiser-gauche
commit 060b7ee3e3239e6b89d4b1dadad384b69a1813f8
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>
Finish symbol location
---
geiser-gauche.el | 3 +--
geiser.scm | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/geiser-gauche.el b/geiser-gauche.el
index 9afc5f8..5f4bc75 100644
--- a/geiser-gauche.el
+++ b/geiser-gauche.el
@@ -228,7 +228,7 @@
;;; Manual look up
-;;; code taken from the Guile implementation
+;;; code adapted from the Guile implementation
(defun geiser-gauche--info-spec (&optional nodes)
(let* ((nrx "^[ ]+-+ [^:]+:[ ]*")
@@ -242,7 +242,6 @@
(list (format "(%s)%s" node idx) nil nrx drx)))
'("Module Index" "Class Index" "Variable Index"))))))
-
(info-lookup-add-help :topic 'symbol :mode 'geiser-gauche-mode
:ignore-case nil
:regexp "[^()`',\" \n]+"
diff --git a/geiser.scm b/geiser.scm
index 5dd7d23..a82e252 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -19,7 +19,6 @@
;; Missing functions:
;; geiser:start-server
;; geiser:object-signature
- ;; geiser:symbol-location
;; geiser:find-file
;; geiser:compile
))
@@ -240,23 +239,24 @@
(let1 paths (map cdr (library-fold m acons '()))
(if (pair? paths)
`(("file" . ,(car paths)) ("line") ("column"))
- ()))))
+ '(("file") ("line") ("column"))))))
;; Further
(define (geiser:symbol-location symbol pref-module)
- (if (find-module symbol)
- (geiser:module-location symbol)
- (let* ((module (or pref-module 'user))
- (obj (global-variable-ref module symbol #f)))
- (if (and obj (or (is-a? obj <procedure>)
- (is-a? obj <generic>)))
- (let* ((sl (source-location obj))
+ (let* ((module (or pref-module 'user))
+ (obj (global-variable-ref module symbol #f)))
+ (or (and-let* (obj
+ ((or (is-a? obj <procedure>)
+ (is-a? obj <generic>)))
+ (sl (source-location obj))
(file (car sl))
+ ((string-contains file "/"))
+ ((not (string-contains file "./")))
(line (cadr sl)))
- `(("file" . ,file) ("line" . ,line) ("column")))
- ()))))
+ `(("file" . ,file) ("line" . ,line) ("column")))
+ '(("file") ("line") ("column")))))
;; TODO We add the load-path at the end. Is this correct?
(define-macro (geiser:add-to-load-path dir)
- [nongnu] elpa/geiser-gauche dc40919 026/119: Correct a comment, (continued)
- [nongnu] elpa/geiser-gauche dc40919 026/119: Correct a comment, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 652927a 041/119: Pass the module as a last argument to geiser: functions, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 698a685 038/119: Fix eval and compile, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 8adaf75 037/119: Improvements, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 5d8264b 033/119: Add (commented out) debugging logging of commands in *scratch*, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche a90a648 032/119: Implement module location, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 558a52e 034/119: Fix module-re, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 530f4f2 040/119: Add rest arguments to all geiser: procedures, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 206f5be 045/119: Lots of cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 6110849 067/119: Add dash to module name regex, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 060b7ee 062/119: Finish symbol location,
Philip Kaludercic <=
- [nongnu] elpa/geiser-gauche 9ffc5bd 058/119: Add comments, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 3d540b3 061/119: Symbol location work, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 2d2d29c 059/119: Reorder to silence an elisp compiler warning, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 5f4d1b5 070/119: Comment cleanup, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 362f1d1 071/119: Add LICENSE, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 9a26b8f 072/119: Aesthetic changes toward MELPA, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 83c9949 069/119: Minor improvement, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 93a7c9d 073/119: Add Cask file, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche eae0506 082/119: Finish autoload related changes, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche fb927ed 084/119: Update README.md, Philip Kaludercic, 2021/08/01