-->
Home » , , » ParEdit mode (paredit.el) is a minor mode for performing structured editing of S-expression data
Friday
15 May 2009

ParEdit mode (paredit.el) is a minor mode for performing structured editing of S-expression data

ParEdit mode (paredit.el) is a minor mode for performing structured editing of S-expression data. The typical example of this would be Lisp or Scheme source code.

ParEdit helps keep parentheses balanced and adds many keys for moving s-expressions and moving around in S-expressions.

The latest stable version is available at paredit.el. Reference Table. Release Notes.

Here is one page cheatsheet: PareditCheatsheet

The latest development version (recommended) is available at paredit-beta.el Reference Table.

A spinoff of ParEdit (by the same author) is also now available in the current CVS version of EdWin, MIT Scheme’s Emacs clone. Type M-x paredit-mode RET to enable it, or add the following code to your .edwin file to enable it automatically in the Scheme mode:

(add-event-receiver! (ref-variable scheme-mode-hook)
(lambda (buffer)
(enable-buffer-minor-mode! buffer (ref-mode-object paredit))))

(You can substitute other modes for scheme-mode also.)

Contents

This is what I am currently using to activate paredit in EmacsLispMode? and LispMode? (plus SlimeMode too):

(mapc (lambda (mode)
(let ((hook (intern (concat (symbol-name mode)
"-mode-hook"))))
(add-hook hook (lambda () (paredit-mode +1)))))
'(emacs-lisp lisp inferior-lisp))

(Ok actually I commented it out in my DotEmacs. To know the reasons why, look at #Questions)

Patch

Autoload won’t work as expected since paredit-beta.el lacks the autoload cookie.

Add it to enable this

Questions

I downloaded paredit a long time ago but I did not succeed in using it daily. I have two questions here:

 1. What is really *useful* with paredit that we can't get with
standard skeletons ?

Check out the ParEdit reference table mentioned above, especially the parts “Depth-Changing Commands” and “Barfage & Slurpage”. Skeletons are like templates, they’re static. ParEdit can modify the structure of Lisp code. So basically, they have different purposes. – PeterBarabas

 2. How do you delete a parenthesis ? I often end up with unbalanced
parentheses when coding something (without paredit) and activating
paredit prevents me from deleting the leading parenthesis.

It takes a bit of getting used to, but after that you’ll never end up with unbalanced parentheses. Just use ParEdit’s commands, e.g. paredit-open-parenthesis, paredit-wrap-sexp instead of manually typing/editing parentheses. ParEdit really makes transforming Lisp code easy. – PeterBarabas

C-u DEL falls back to ‘backward-delete-char’. Similarly, you can insert single parentheses with C-q ( and C-q )YannHodique



Related Post


Yahoo!    Personals


123inkjets.com    - Printer Ink, Toner, & More

  • Get Paid     to Blog About the Things You Love


iPowerWeb    Web Hosting


Linux Links


0 commenti:

Post a Comment

Random Posts

  • Multi-Booting the Nexus 7 Tablet: Getting Ubuntu Touch Running.
    04.07.2014 - 0 Comments
    If you've not seen a Nexus 7, it's a nice little device. Like all "Nexus"-branded Android devices, it's a "reference" device for Google's base Android implementation, so it's got a well-supported set of hardware. I'm not trying…
  • BlankOn is an Ubuntu-based distribution developed by the Indonesian Linux Mover Foundation and BlankOn developer team.
    15.08.2010 - 0 Comments
    BlankOn is an Ubuntu-based distribution developed by the Indonesian Linux Mover Foundation and BlankOn developer team.It is an Indonesian distribution that includes a variety of software that is widely used by consumers in general, such as office…
  • VitalFile for Real-Time Workstation Protection
    14.02.2008 - 0 Comments
    VitalFile for Real-Time Workstation Protection provides transparent real-time file-level protection. Any time a "user-created" file is changed, VitalFile makes up to three copies.One copy is tucked away on the current system, allowing for many…
  • SlimBoat Guide: QuickFill Intelligent Automatic Form Filler.
    27.02.2014 - 0 Comments
    Do you feel bored and frustrated when filling up a form online where you have to type your name and address over and over? Do you also feel the same way when you perform the same function repeately such as logging in to your favorite website?…
  • Installing non-free video drivers in KXStudio.
    23.02.2014 - 0 Comments
    digg_url = "http://linuxlandit.blogspot.com/2014/02/installing-non-free-video-drivers-in.html";digg_title = "Installing non-free video drivers in KXStudio.";digg_bgcolor = "#FFFFFF";digg_skin = "normal";digg_url = undefined;digg_title =…
  • Krita 4.2.7 Released
    09.10.2019 - 0 Comments
    Today, we’re releasing the sixth bug fix release of Krita 4.2. As discussed in our development update, we intend to release a few more monthly 4.2 bug fix releases before releasing Krita 4.3. There are a lot of bug fixes!And to celebrate the…
  • Venenux Gnu/Linux is a Debian-based community distribution developed in South America and designed for Spanish-speaking
    22.11.2009 - 0 Comments
    VENENUX GNU/Linux is a Debian-based community distribution developed in South America and designed for Spanish-speaking users.VENENUX GNU / Linux is a distribution of GNU Operating System 100% free targeted primarily to users in Latin America,…
  • Install ArtistX to your hard disk, free multimedia live Gnu/Linux distribution for audio, 2D and 3D graphics.
    02.02.2012 - 0 Comments
    To install ArtistX  you will need at least 512 MB of Ram and 20 gigabytes of disk space (also if installing in VirtualBox or other emulators). Backup, backup, backup: save your most important files on an external hard disk or DVD. Better…
  • Anki is a program which makes remembering things easy.
    13.08.2011 - 0 Comments
    Anki is a spaced repetition flashcard program. The software is similar to SuperMemo, a commercial product for the same purpose, and Mnemosyne, another free flashcard program. Anki is the Japanese word for "memorizing". The SM2 algorithm, created…
  • HandBrake is an open-source program designed to convert MPEG video.
    26.05.2011 - 0 Comments
    HandBrake is an open-source program designed to convert MPEG video (including DVD-Video) into an MPEG-4 video file in MPEG-4 Part 14 (.mp4) or Matroska (.mkv) containers. The program is used to convert DVDs into other forms so they can be viewed on…

Recent Posts

Recent Posts Widget

Popular Posts

Labels

Archive

page counter follow us in feedly
 
Copyright © 2014 Linuxlandit & The Conqueror Penguin
-->