Re: PicoLisp and Emacs

2011-02-08 Thread Jon Kleiser

On 07-02-11 10:10 , Jon Kleiser wrote:

Hi Steve,

Yes, you are right, that's my name. I once corrected a couple of typos 
in that article, and now one gets the impression that I'm the main 
author. In my opinion, that's a weakness of this wiki. ;-)


/Jon

On 06-02-11 21:18 , Steve Graham wrote:

Jon,

I thought I saw your name on this page 
(http://picolisp.com/5000/-2-%3B.html).  However I cannot access the 
wiki today to verify that.



Steve

---

--- On *Sun, 2/6/11, Jon Kleiser /jon.klei...@usit.uio.no/* wrote:


From: Jon Kleiser jon.klei...@usit.uio.no
Subject: Re: PicoLisp and Emacs
To: Steve Graham jsgraha...@yahoo.com
Date: Sunday, February 6, 2011, 11:11 AM

Hi Steve,

I cannot recall having written anything about Emacs ... and my
experience with Emacs is rather limited. On which blog did you
see this about Emacs and PicoLisp?
I'm mainly a Mac user, and I use BBEdit for text editing. Which
platform are you on?

Sincerely,
Jon

On Sat, 5 Feb 2011 12:16:45 -0800 (PST), Steve Graham
jsgraha...@yahoo.com /mc/compose?to=jsgraha...@yahoo.com wrote:
 Jon,

 I noticed on the blog that you mentioned that emacs could be
used with
 picolisp. I've started to learn lisp and am using lispbox, which
 packages lisp with emacs and slime. I wonder if something
similar can
 be done with picolisp? If so, do you have any thoughts on the
matter?

 Thanks, Steve




--050400010409010605040605
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
 head
   meta content=text/html; charset=ISO-8859-1
 http-equiv=Content-Type
 /head
 body bgcolor=#ff text=#00
   On 07-02-11 10:10 , Jon Kleiser wrote:
   blockquote cite=mid:4d4fb706.7070...@ulrik.uio.no type=cite
 meta content=text/html; charset=ISO-8859-1
   http-equiv=Content-Type
 title/title
 Hi Steve,br
 br
 Yes, you are right, that's my name. I once corrected a couple of
 typos in that article, and now one gets the impression that I'm
 the main author. In my opinion, that's a weakness of this wiki.
 ;-)br
 br
 /Jonbr
 br
 On 06-02-11 21:18 , Steve Graham wrote:
 blockquote
   cite=mid:314078.25028...@web121601.mail.ne1.yahoo.com
   type=cite
   table border=0 cellpadding=0 cellspacing=0
 tbody
   tr
 td style=font: inherit; valign=topJon,br
   br
   I thought I saw your name on this page (a
 moz-do-not-send=true class=moz-txt-link-freetext
 
href=http://picolisp.com/5000/-2-%3B.html;http://picolisp.com/5000/-2-%3B.html/a).nbsp;
   However I cannot access the wiki today to verify that.br
   br
   br
   Stevebr
   br
   ---br
   br
   --- On bSun, 2/6/11, Jon Kleiser ia
 moz-do-not-send=true
 class=moz-txt-link-rfc2396E
 
href=mailto:jon.klei...@usit.uio.no;lt;jon.klei...@usit.uio.nogt;/a/i/b
   wrote:br
   blockquote style=border-left: 2px solid rgb(16, 16,
 255); margin-left: 5px; padding-left: 5px;br
 From: Jon Kleiser a moz-do-not-send=true
   class=moz-txt-link-rfc2396E
   
href=mailto:jon.klei...@usit.uio.no;lt;jon.klei...@usit.uio.nogt;/abr
 Subject: Re: PicoLisp and Emacsbr
 To: Steve Graham a moz-do-not-send=true
   class=moz-txt-link-rfc2396E
   
href=mailto:jsgraha...@yahoo.com;lt;jsgraha...@yahoo.comgt;/abr
 Date: Sunday, February 6, 2011, 11:11 AMbr
 br
 div class=plainMailHi Steve,br
   br
   I cannot recall having written anything about Emacs
   ... and my experience with Emacs is rather limited.
   On which blog did you see this about Emacs and
   PicoLisp?br
   I'm mainly a Mac user, and I use BBEdit for text
   editing. Which platform are you on?br
   br
   Sincerely,br
   Jonbr
   br
   On Sat, 5 Feb 2011 12:16:45 -0800 (PST), Steve
   Graham lt;a moz-do-not-send=true
 ymailto=mailto:jsgraha...@yahoo.com;
 
href=/mc/compose?to=jsgraha...@yahoo.comjsgraha...@yahoo.com/agt;

   wrote:br
   gt; Jon,br
   gt; br
   gt; I noticed on the blog that you mentioned that
   emacs could be used withbr
   gt; picolisp. I've started to learn lisp and am
   using lispbox, whichbr
   gt; 

Re: PicoLisp and Emacs

2011-02-08 Thread Henrik Sarvell
Weird, I can't see the contents of the discussion, it's attached as
the file noname in gmail.

Anyway, I've written some on my blog on how to manage with emacs:
http://www.prodevtips.com/2010/09/24/emacs-key-bindings-paredit-and-saving-macros/

I have attached my .el config, some of the contents therein pertains
to PicoLisp.

In 
http://www.prodevtips.com/2010/11/03/autocompletion-jump-to-documentation-swank-and-slime/
I state that I added a dictionary for PL, this is picolisp-mode that I
also have attached.

Apart from that no other externals except for Arm's picolisp mode are
needed (I think) to follow through my tutorials.

PicoLisp is really easy to setup IMO, Clojure is harder due to the
fact that it has much messier syntax.

/Henrik


On Tue, Feb 8, 2011 at 7:24 PM, Jon Kleiser jon.klei...@usit.uio.no wrote:

(defun iwb ()
  indent whole buffer
  (interactive)
  (delete-trailing-whitespace)
  (indent-region (point-min) (point-max) nil)
  (untabify (point-min) (point-max)))
  
(defun browser-jump (base-url)
  (let (myword myurl)
(setq myword
  (if (and transient-mark-mode mark-active)
  (buffer-substring-no-properties (region-beginning) (region-end))
(thing-at-point 'symbol)))
(setq myurl (concat base-url myword))
(browse-url myurl)))

(defun clojure-jump () (interactive) (browser-jump http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/;))
;(defun picolisp-jump () (interactive) (browser-jump http://www.software-lab.de/doc/refM.html#;))

(defun picolisp-jump ()
  (interactive)
  (let (myword myurl)
(setq myword
  (if (and transient-mark-mode mark-active)
  (buffer-substring-no-properties (region-beginning) (region-end))
(thing-at-point 'symbol)))
(setq myurl (concat http://www.software-lab.de/doc/ref; (upcase (substring myword 0 1)) .html# myword))
(browse-url myurl)))

(fset 'sqbracket-wrap
  (lambda (optional arg) Keyboard macro. (interactive p) (kmacro-exec-ring-item (quote (\213[ 0 %d)) arg)))

(fset 'curlybrace-wrap
  (lambda (optional arg) Keyboard macro. (interactive p) (kmacro-exec-ring-item (quote (\213{ 0 %d)) arg)))

(setq kill-whole-line t)

(defun refresh-file ()
  (interactive)
  (revert-buffer t t t))

(global-set-key [f5] 'refresh-file)
;(global-set-key (kbd C-s) 'save-buffer)
(global-set-key (kbd C-z) 'undo)
(global-set-key (kbd C-M-m) 'mark-sexp)
(global-set-key (kbd M-[) 'sqbracket-wrap)
;(global-set-key (kbd M-{) 'curlybrace-wrap)
(global-set-key [f1] 'menu-bar-mode)
;(global-set-key (kbd C-tab) 'complete-tag)
(global-set-key [f6] 'split-window-horizontally)
(global-set-key [f7] 'split-window-vertically)
(global-set-key [f8] 'delete-window)
(define-key clojure-mode-map (kbd M-{) 'curlybrace-wrap)
(define-key clojure-mode-map (kbd C-M-r) 'clojure-jump)
(define-key picolisp-mode-map (kbd C-M-r) 'picolisp-jump)

(defun lisp-enable-paredit-hook () (paredit-mode 1))
(add-hook 'picolisp-mode-hook 'lisp-enable-paredit-hook)

;(load ~/.emacs.d/henrik/nxhtml/autostart.el)
;(setq mumamo-chunk-coloring 1)

(autoload 'php-mode php-mode Major mode for editing php code. t)
(add-to-list 'auto-mode-alist '(\\.php$ . php-mode))
;(add-to-list 'auto-mode-alist '(\\.inc$ . php-mode))
;(add-hook 'php-mode-hook 'lisp-enable-paredit-hook)

(defun terminate-line ()
  (interactive)
  (back-to-indentation)
  (if (looking-at case)
  (setq eol-char :)
(setq eol-char ;))
  (end-of-line)
  (if (not (looking-back eol-char))
  (insert eol-char))
  (reindent-then-newline-and-indent))

(defun open-line-indent (n)
  (interactive *p)
  (save-excursion
(open-line n)
(next-line n)
(indent-according-to-mode)))

(define-key php-mode-map \r 'reindent-then-newline-and-indent)
(define-key php-mode-map \C-c\C-c 'comment-or-uncomment-region-or-line)
(define-key php-mode-map \M-; 'terminate-line)
(define-key php-mode-map \C-o 'open-line-indent)

(defun wicked/php-mode-init ()
  Set some buffer-local variables.
  (setq case-fold-search t)
  (setq indent-tabs-mode nil)
  (setq fill-column 78)
  (setq c-basic-offset 2)
  (c-set-offset 'arglist-cont 0)
  (c-set-offset 'arglist-intro '+)
  (c-set-offset 'case-label 2)
  (c-set-offset 'arglist-close 0))
;(add-hook 'php-mode-hook 'wicked/php-mode-init)

(add-to-list 'load-path ~/.emacs.d/henrik/color-theme-6.6.0)
(require 'color-theme)
(eval-after-load color-theme
  '(progn
 (color-theme-initialize)
 (color-theme-hober)))
(eval-after-load color-theme '(color-theme-gray30))
(set-face-attribute 'default nil :height 60)
(setq font-lock-builtin-face '((t (:foreground LightSkyBlue

(global-linum-mode 1)
(setq column-number-mode t)

(defun switch-full-screen ()
  (interactive)
  (shell-command wmctrl -r :ACTIVE: -btoggle,fullscreen))

(global-set-key [f11] 'switch-full-screen)