This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *d* (digraph:make-digraph :initial-vertices '(alert | |
appkit-version assoc-array attributed-strings binding-utils | |
class-convert coder coerce-obj combo-box-source custom-app-init date | |
debug decimal doc-controller-hash file-directory-utils file-monitor | |
hist-dt install-executable interactive-app interface-packages | |
iu-classes kvo-slot lc-classes lisp-bundle lisp-controller | |
lisp-doc-controller lisp-document lisp-notification list-utils | |
menu-utils nib-link nib notification ns-object-utils ns-string-utils | |
nslog-utils objc-initialize objc-method-info open-panel opengl-utils | |
or-semaphore path-trans preferences quick-window save-panel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; MACRO | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defmacro defparen (script-name &rest script-body) | |
`(defparameter ,script-name | |
(ps:ps ,@script-body))) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; USAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"(function () { | |
var element = chain(document, createElement('span')); | |
at(element, textContent) = 'some-text'; | |
return chain(document, body, appendChild(element)); | |
})();" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Added to ASD File | |
:depends-on (:cl-strings :cl-string-match :puri :queues.simple-queue | |
:sqlite :parenscript :cl-json :swank | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Function Invoked in My program | |
(defun start-swank () | |
(swank:create-server :port *swank-port* :style :spawn :dont-close t)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *buffers* (list "a" "b" "c")) | |
(defparameter *active-buffer* (nth 0 *buffers*) | |
(defun delete-active-buffer () | |
(when (> (length *buffers*) 1) | |
(let ((former-active-buffer *active-buffer*)) | |
;; switch-buffer-next changes value of *active-buffer* | |
;; which in turn changes the value of former-active-buffer | |
(switch-buffer-next) | |
;; therefore delete actually deletes the new *active-buffer* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun switch-buffer-next () | |
(let ((active-buffer-index (position *active-buffer* *buffers* :test #'equalp))) | |
(if (< (+ active-buffer-index 1) (length *buffers*)) | |
(set-visible-active-buffer (nth (+ active-buffer-index 1) *buffers*)) | |
(set-visible-active-buffer (nth 0 *buffers*))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; buffer.lisp --- lisp subroutines for creating / managing buffers | |
(in-package :next) | |
(defclass buffer () | |
((name :accessor name :initarg :name) | |
(mode :accessor mode :initarg :mode) | |
(view :accessor view :initarg :view))) | |
(defun generate-new-buffer (name mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun delete-active-buffer () | |
(when (> (length *buffers*) 1) | |
(let ((former-active-buffer *active-buffer*)) | |
;; switch-buffer-next changes value of *active-buffer* | |
;; which in turn changes the value of former-active-buffer | |
(switch-buffer-next) | |
;; therefore delete actually deletes the new *active-buffer* | |
(delete former-active-buffer *buffers*) | |
(interface:delete-view (view former-active-buffer))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass buffer () | |
((name :accessor name :initarg :name) | |
(mode :accessor mode :initarg :mode) | |
(view :accessor view :initarg :view))) | |
(defmethod print-object ((self buffer) stream) | |
(format out "~s" (name self))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun a (some-arg &optional optional-arg1 optional-arg2) | |
(b automatically-placed-optional-args)) | |
(defun b (arg1 arg2) | |
...) | |