summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org-ckons-core.asd6
-rw-r--r--src/core.lisp15
2 files changed, 12 insertions, 9 deletions
diff --git a/org-ckons-core.asd b/org-ckons-core.asd
index c359be5..44b275f 100644
--- a/org-ckons-core.asd
+++ b/org-ckons-core.asd
@@ -1,10 +1,10 @@
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(declaim (optimize (speed 0) (safety 3) (debug 3)))
-(in-package #:cl)
+(in-package :cl)
-(defpackage #:org-ckons-core-system (:use #:cl #:asdf))
-(in-package #:org-ckons-core-system)
+(defpackage :org-ckons-core-system (:use :cl :asdf))
+(in-package :org-ckons-core-system)
(defmacro do-defsystem (&key name version maintainer author description long-description depends-on components)
`(defsystem ,name
diff --git a/src/core.lisp b/src/core.lisp
index 4f88e5b..3f217c5 100644
--- a/src/core.lisp
+++ b/src/core.lisp
@@ -4,7 +4,7 @@
(defpackage :org-ckons-core
(:use :cl :cl-log))
-(in-package #:org-ckons-core)
+(in-package :org-ckons-core)
(require :sb-introspect)
@@ -48,10 +48,6 @@ string representation of\)."
(with-input-from-string (stream my-string)
(read stream)))
-(defmacro add-to-list (output-list &rest value-to-add)
- "Wraps the SETF...APPEND idiom in a smaller package."
- `(setf ,output-list (append ,output-list ,@value-to-add)))
-
(defun parse-symbol (my-symbol)
(let ((symbol-parts (ppcre:split "::" (symbol-name my-symbol))))
(if (= (length symbol-parts) 1)
@@ -95,7 +91,11 @@ SBCL."
(mapcar 'sb-mop:slot-definition-name (sb-mop:class-slots (class-of instance))))
(defun null-or-empty-p (sequence)
- (or (null sequence) (equal (length sequence) 0)))
+ (handler-case
+ (equal (length sequence) 0)
+ (error (e)
+ (declare (ignore e))
+ t)))
(defun xml-escape (mystring)
(setf mystring (ppcre:regex-replace-all "<" mystring "&lt;"))
@@ -202,3 +202,6 @@ list of `cl-smtp:attachment' objects if non-nil."
,@(when html-message `(:html-message ,html-message))
,@(when authentication `(:authentication ,authentication))
,@(when attachments `(:attachments ,attachments))))
+
+(defun parse-slot (slot)
+ (first (last (ppcre:split "::" (symbol-name slot)))))