picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit c44a6ac7d1669e836ef551ea4093e3625a96f4e4
parent be9da1a4c36ae5cc377a99b7ab1c3c24fdc9ecc3
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 27 Feb 2013 18:10:09 +0100

Removed 'plmod' and 'bin/plmod'
Diffstat:
Dbin/plmod | 9---------
Ddbg | 2--
Mlib/el/README | 1-
Mlib/el/inferior-picolisp.el | 45+++++++++++++++++++++++++++++++++++++--------
Dplmod | 2--
5 files changed, 37 insertions(+), 22 deletions(-)

diff --git a/bin/plmod b/bin/plmod @@ -1,9 +0,0 @@ -#!/usr/bin/picolisp /usr/lib/picolisp/lib.l -(on *Dbg) - -(load "@lib/misc.l" "@lib/btree.l" "@lib/db.l" "@lib/pilog.l") -(load "@lib/debug.l" "@lib/edit.l" "@lib/lint.l") - -(noLint 'later (loc "@Prg" later)) - -# vi:et:ts=3:sw=3 diff --git a/dbg b/dbg @@ -1,2 +0,0 @@ -#!/bin/sh -exec ${0%/*}/bin/picolisp ${0%/*}/lib.l @ext.l "$@" + diff --git a/lib/el/README b/lib/el/README @@ -4,7 +4,6 @@ In order to get the picolisp-mode working correctly you have to add the followin (load "tsm.el") ;; Picolisp TransientSymbolsMarkup (*Tsm) (autoload 'run-picolisp "inferior-picolisp") (autoload 'picolisp-mode "picolisp" "Major mode for editing Picolisp." t) -(setq picolisp-program-name "<path-to>/picoLisp/plmod") If you have also SLIME installed, it will suck all possible lisp extensions up (greedy bastard). So in order to get the correct file-association for picolisp files you'll have to also add this: diff --git a/lib/el/inferior-picolisp.el b/lib/el/inferior-picolisp.el @@ -1,8 +1,7 @@ ;;;;;; inferior-picolisp: Picolisp repl in a buffer. -;;;;;; Version: 1.1 +;;;;;; Version: 1.2 -;;; Copyright (c) 2009, Guillermo R. Palavecino -;;; 2012, Thorsten Jolitz (tj) +;;; Copyright (c) 2009, 2012, 2013, Guillermo R. Palavecino, Thorsten Jolitz ;; This file is NOT part of GNU emacs. @@ -29,6 +28,9 @@ ;;; INFERIOR PICOLISP MODE STUFF ;;;============================================================================ +(defconst inferior-picolisp-version "1.2" + "Verion-number of library") + (defcustom inferior-picolisp-mode-hook nil "*Hook for customizing inferior-picolisp mode." :type 'hook @@ -41,11 +43,10 @@ (define-key m "\C-c\C-l" 'picolisp-load-file) m ) ) -;; added by tj 2012-03-11 -(defvar picolisp-local-program-name "./pil @lib/too.l +") +(defvar picolisp-local-program-name "./pil +") (defvar picolisp-process-number 0) -(defvar picolisp-program-name "/usr/bin/picolisp" +(defvar picolisp-program-name "pil +" "The name of the program used to run Picolisp." ) ;; Install the process communication commands in the picolisp-mode keymap. @@ -130,7 +131,6 @@ Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters." "Don't save anything matching `inferior-picolisp-filter-regexp'." (not (string-match inferior-picolisp-filter-regexp str)) ) - (defun picolisp-get-old-input () "Snarf the sexp ending at point." (save-excursion @@ -138,8 +138,33 @@ Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters." (backward-sexp) (buffer-substring (point) end) ) ) ) +(defun picolisp-disable-line-editor () + "Disable inbuild PicoLisp line-editor. +Not needed when PicoLisp is run as Emacs subprocess." + (let ((pil-tmp-dir (expand-file-name "~/.pil/"))) + (and (member + "editor" (directory-files pil-tmp-dir )) + (rename-file + (expand-file-name "editor" pil-tmp-dir) + (expand-file-name "editor-orig" pil-tmp-dir))) + (with-current-buffer + (find-file-noselect + (expand-file-name "editor" pil-tmp-dir)) + (save-buffer) + (kill-buffer)))) + +(defun picolisp-reset-line-editor () + "Reset inbuild PicoLisp line-editor to original state." + (let ((pil-tmp-dir (expand-file-name "~/.pil/"))) + (if (member "editor-orig" (directory-files pil-tmp-dir)) + (rename-file + (expand-file-name "editor-orig" pil-tmp-dir) + (expand-file-name "editor" pil-tmp-dir) + 'OK-IF-ALREADY-EXISTS) + (delete-file + (expand-file-name "editor" pil-tmp-dir))))) + -;; added by tj 2012-03-11 ;;;###autoload (defun run-picolisp-new-local (cmd) "Run a new inferior Picolisp process for a locally installed @@ -165,9 +190,11 @@ process buffer for a list of commands.)" (number-to-string picolisp-process-number) ">")) (let ((cmdlist (split-string cmd))) + (picolisp-disable-line-editor) (set-buffer (apply 'make-comint pl-proc-buf (car cmdlist) nil (cdr cmdlist))) + (picolisp-reset-line-editor) (inferior-picolisp-mode) ) (pop-to-buffer (concat "*" pl-proc-buf "*")) ) @@ -187,8 +214,10 @@ is run). picolisp-program-name ) ) ) (when (not (comint-check-proc "*picolisp*")) (let ((cmdlist (split-string cmd))) + (picolisp-disable-line-editor) (set-buffer (apply 'make-comint "picolisp" (car cmdlist) nil (cdr cmdlist) ) ) + (picolisp-reset-line-editor) (inferior-picolisp-mode) ) ) (setq picolisp-program-name cmd) (setq picolisp-buffer "*picolisp*") diff --git a/plmod b/plmod @@ -1,2 +0,0 @@ -#!/bin/sh -exec ${0%/*}/bin/picolisp ${0%/*}/lib.l @bin/plmod "$@"