[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Thu Nov 22 12:41:26 UTC 2012
Update of /project/slime/cvsroot/slime/contrib
In directory tiger.common-lisp.net:/tmp/cvs-serv4778/contrib
Modified Files:
ChangeLog slime-package-fu.el
Log Message:
* contrib/slime-package-fu.el (slime-determine-symbol-style): Fix the
default case when no :export symbols are present.
Because of (every anything nil) => T.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/11/13 15:44:40 1.553
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/11/22 12:41:26 1.554
@@ -1,3 +1,9 @@
+2012-11-22 Stas Boukarev <stassats at gmail.com>
+
+ * slime-package-fu.el (slime-determine-symbol-style): Fix the
+ default case when no :export symbols are present.
+ Because of (every anything nil) => T.
+
2012-11-13 Francois-Rene Rideau <tunes at google.com>
* swank-asdf.lisp: Better ASDF support.
--- /project/slime/cvsroot/slime/contrib/slime-package-fu.el 2012/03/06 01:47:49 1.16
+++ /project/slime/cvsroot/slime/contrib/slime-package-fu.el 2012/11/22 12:41:26 1.17
@@ -18,7 +18,8 @@
(defvar slime-package-file-candidates
(mapcar #'file-name-nondirectory
- '("package.lisp" "packages.lisp" "pkgdcl.lisp" "defpackage.lisp")))
+ '("package.lisp" "packages.lisp" "pkgdcl.lisp"
+ "defpackage.lisp")))
(defvar slime-export-symbol-representation-function
#'(lambda (n) (format "#:%s" n)))
@@ -35,7 +36,8 @@
"^(\\(cl:\\|common-lisp:\\)?defpackage\\>[ \t']*")
(defun slime-find-package-definition-rpc (package)
- (slime-eval `(swank:find-definition-for-thing (swank::guess-package ,package))))
+ (slime-eval `(swank:find-definition-for-thing
+ (swank::guess-package ,package))))
(defun slime-find-package-definition-regexp (package)
(save-excursion
@@ -73,14 +75,16 @@
(file-name-as-directory ".."))))
(try (dirname)
(dolist (package-file-name slime-package-file-candidates)
- (let ((f (slime-to-lisp-filename (concat dirname package-file-name))))
+ (let ((f (slime-to-lisp-filename
+ (concat dirname package-file-name))))
(when (file-readable-p f)
(return f))))))
(when buffer-file-name
(let ((buffer-cwd (file-name-directory buffer-file-name)))
(or (try buffer-cwd)
(try (file-name-subdirectory buffer-cwd))
- (try (file-name-subdirectory (file-name-subdirectory buffer-cwd))))))))
+ (try (file-name-subdirectory
+ (file-name-subdirectory buffer-cwd))))))))
(defun slime-goto-package-source-definition (package)
"Tries to find the DEFPACKAGE form of `package'. If found,
@@ -91,7 +95,8 @@
t)))
(or (try (slime-find-package-definition-rpc package))
(try (slime-find-package-definition-regexp package))
- (try (when-let (package-file (slime-find-possible-package-file (buffer-file-name)))
+ (try (when-let (package-file (slime-find-possible-package-file
+ (buffer-file-name)))
(with-current-buffer (find-file-noselect package-file t)
(slime-find-package-definition-regexp package))))
(error "Couldn't find source definition of package: %s" package))))
@@ -217,7 +222,9 @@
(slime-beginning-of-list)
(slime-forward-sexp)
(let ((symbols (slime-export-symbols)))
- (cond ((every (lambda (x)
+ (cond ((null symbols)
+ slime-export-symbol-representation-function)
+ ((every (lambda (x)
(string-match "^:" x))
symbols)
(lambda (n) (format ":%s" n)))
@@ -264,13 +271,17 @@
(unless symbol (error "No symbol at point."))
(cond (current-prefix-arg
(if (plusp (slime-frob-defpackage-form package :unexport symbol))
- (message "Symbol `%s' no longer exported form `%s'" symbol package)
- (message "Symbol `%s' is not exported from `%s'" symbol package))
+ (message "Symbol `%s' no longer exported form `%s'"
+ symbol package)
+ (message "Symbol `%s' is not exported from `%s'"
+ symbol package))
(slime-unexport-symbol symbol package))
(t
(if (plusp (slime-frob-defpackage-form package :export symbol))
- (message "Symbol `%s' now exported from `%s'" symbol package)
- (message "Symbol `%s' already exported from `%s'" symbol package))
+ (message "Symbol `%s' now exported from `%s'"
+ symbol package)
+ (message "Symbol `%s' already exported from `%s'"
+ symbol package))
(slime-export-symbol symbol package)))))
(defun slime-export-class (name)
More information about the slime-cvs
mailing list