emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/slime 5cb3d8a413: Don't abbreviate dotted package names in


From: ELPA Syncer
Subject: [nongnu] elpa/slime 5cb3d8a413: Don't abbreviate dotted package names in the REPL prompt
Date: Thu, 26 Sep 2024 16:19:27 -0400 (EDT)

branch: elpa/slime
commit 5cb3d8a4132ba790635a215202c60e470b5383d5
Author: Carl Gay <carlgay@gmail.com>
Commit: Luís Oliveira <luismbo@gmail.com>

    Don't abbreviate dotted package names in the REPL prompt
    
    Fixes #843
---
 swank.lisp | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/swank.lisp b/swank.lisp
index 7d7a4ed71d..bd8871da19 100644
--- a/swank.lisp
+++ b/swank.lisp
@@ -1909,14 +1909,10 @@ MAP -- rewrite the chars in STRING according to this 
alist."
   `((:common-lisp-user . :cl-user))
   "Canonical package names to use instead of shortest name/nickname.")
 
-(defvar *auto-abbreviate-dotted-packages* t
-  "Abbreviate dotted package names to their last component if T.")
-
 (defun package-string-for-prompt (package)
   "Return the shortest nickname (or canonical name) of PACKAGE."
   (unparse-name
    (or (canonical-package-nickname package)
-       (auto-abbreviated-package-name package)
        (shortest-package-nickname package))))
 
 (defun canonical-package-nickname (package)
@@ -1925,25 +1921,6 @@ MAP -- rewrite the chars in STRING according to this 
alist."
                           :test #'string=))))
     (and name (string name))))
 
-(defun auto-abbreviated-package-name (package)
-  "Return an abbreviated 'name' for PACKAGE. 
-
-N.B. this is not an actual package name or nickname."
-  (when *auto-abbreviate-dotted-packages*
-    (loop with package-name = (package-name package)
-          with offset = nil
-          do (let ((last-dot-pos (position #\. package-name :end offset 
-                                           :from-end t)))
-               (unless last-dot-pos
-                 (return nil))
-               ;; If a dot chunk contains only numbers, that chunk most
-               ;; likely represents a version number; so we collect the
-               ;; next chunks, too, until we find one with meat.
-               (let ((name (subseq package-name (1+ last-dot-pos) offset)))
-                 (if (notevery #'digit-char-p name)
-                     (return (subseq package-name (1+ last-dot-pos)))
-                     (setq offset last-dot-pos)))))))
-
 (defun shortest-package-nickname (package)
   "Return the shortest nickname of PACKAGE."
   (loop for name in (cons (package-name package) (package-nicknames package))



reply via email to

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