summaryrefslogtreecommitdiff
path: root/paredit.el
AgeCommit message (Collapse)Author
2011-03-20Eliminate confusing comment over `paredit-splice-sexp'.Taylor R Campbell
Ignore-this: 13c949425c6b6df35b26e53d9e1819e6 Comment referenced no longer extant text in the file, and credits are moving to another file. darcs-hash:20110320173549-00fcc-4c0751e61f57f437bb8b0b9f6c8d861f20757023
2011-03-20Spell `paredit-recenter-on-sexp' to match convention in Emacs.Taylor R Campbell
Ignore-this: d3bd6a4462a90bf7182e089a0f54bfb9 Omit comment above. I rewrote this function since the suggestion, Marco suggested a lot more than just that, and credits are moving to a separate file. darcs-hash:20110320173328-00fcc-dab332a1d49f961105b3477e669cd45af6791627
2011-03-20Fix comment in `paredit-forward' on `up-list' vs `forward-char'.Taylor R Campbell
Ignore-this: 87926a2083bf8b1444aa83d80c5346fb Add analogous comment to `paredit-backward'. Thanks, Eitan Postavsky. darcs-hash:20110320171805-00fcc-e0817b0a6f305681267cc804a680e64d9eff1b96
2011-03-20Simplify and clarify implementation of `paredit-backslash'.Taylor R Campbell
Ignore-this: a59b556bdad0266cec90303f6864738e darcs-hash:20110320171404-00fcc-87038309e85fdc70dbbb48714769decf4317e3bb
2011-02-24Rework third page to make it much more readable.Taylor R Campbell
Ignore-this: 54e02f06666af8065ce36929d9bd548 darcs-hash:20110224160102-00fcc-2c3801f2c1d75c61e875e7583b35f6a2034afa7f
2011-02-24Tweak second page. Remove rants and IRC reference.Taylor R Campbell
Ignore-this: cd6f3d71cd36d3cbc1140397f572fe25 darcs-hash:20110224160024-00fcc-2ac38ea602b64fa971ac4b0c9f5e6bc196e07a7f
2011-02-24Bump copyright year to 2011.Taylor R Campbell
Ignore-this: 7f4dd3a188aa490eb67700efe81d7d5a darcs-hash:20110224155528-00fcc-b7cb9bc3e120879db2c9290226903003447fadbe
2010-12-06Eliminate non-interactive use of `goto-line'.Taylor R Campbell
Ignore-this: 562a203b85842ebc368ea80f2aa65612 Using `forward-line' in `paredit-recentre-on-sexp' is simpler anyway. darcs-hash:20101206011608-00fcc-1775f5b8c7a4eb4ab2792e5746aca95a2759dc60
2010-12-05Omit optional argument `yank-handler' in `paredit-kill-region'.Taylor R Campbell
Ignore-this: d406778b8c6c314badf584b4cbcde099 This appears to have been a GNU Emacs 22ism, which I don't use anyway. darcs-hash:20101205174822-00fcc-532684fb73397075e9d93ed7f35bebfe6b15c3f5
2010-12-05In `paredit-newline', ignore parse errors during `indent-sexp'.Taylor R Campbell
Ignore-this: 5326ec1a70a5ef42729e107418bd2879 The point may be followed by a closing delimiter with no intervening S-expressions. This case was already handled when the point is outside a comment; I neglected it when the point is inside a comment. darcs-hash:20101205173031-00fcc-46d7e591ca9dc2c1a0340c3b0c00312e1646d672
2010-10-09Bump version: 22 beta -> 23.Taylor R Campbell
Ignore-this: c572cc4ee3c067325171c774fdc38dca darcs-hash:20101009180546-00fcc-efb096fbb4a15080f605903ab1fe99f7b1abbaf6
2010-10-09Bump version: 22 beta -> 22.v22Taylor R Campbell
Ignore-this: dd766afb7fe23a8af7d48a2d0c9a1d4 darcs-hash:20101009180225-00fcc-e65cece86b7c666653bfe9f386dc2f12bf25725d
2010-10-09Change header and footer to conform to elisp guidelines.Taylor R Campbell
Ignore-this: ef08009b23ee11fdcbdaf0bd364af57 darcs-hash:20101009180143-00fcc-34a37b8c46e54c4227569020ad757abd12d714f8
2010-09-20Add utilities for `check-parens' restricted to a region.Taylor R Campbell
Ignore-this: e5cd5cbea4e5866aec9e657902fd9663 darcs-hash:20100920205549-00fcc-0855cb26399bc060cb863c14bc794166505b9982
2010-09-18Fix format arguments in `paredit-check-region-state-comment'.Taylor R Campbell
Ignore-this: f5607d677b62ab6ba13a1c527a574690 darcs-hash:20100918233204-00fcc-c94437a17b4a7933bcc5c34cbab97836a381729d
2010-09-18Implement `paredit-kill-ring-save' and `paredit-kill-region'.Taylor R Campbell
Ignore-this: 9e77f0436cdce47e15d1dba998902b77 These are an unfinished experiment. When the experiment is finished, if it is successful, then, in Paredit Mode, `C-w' will be bound to `paredit-kill-region', `M-w' perhaps to `paredit-kill-ring-save', and `C-y' to `paredit-yank' (not yet implemented). darcs-hash:20100918231829-00fcc-c0a34e7f81243fa6c1ee535cb86c692a0f589ed3
2010-09-18Implement `paredit-{for,back}ward-{up,down}'.Taylor R Campbell
Ignore-this: ce362505e717451523aa5fd361a8730f These are like `{backward-,}{up,down}-list', but also enter and exit strings when appropriate. The keys formerly bound to those commands (C-M-u, C-M-d, C-M-p, C-M-n) are now bound to their new paredit analogues. darcs-hash:20100918185616-00fcc-13b875689b8915083c41a6d05c9cf04506799aae
2010-09-18Fix `paredit-copy-as-kill' within strings.Taylor R Campbell
Ignore-this: 231e8737beaee81622c52d580adad339 darcs-hash:20100918181620-00fcc-5774d34b56be2f3af88b6a75506da39927197baf
2010-09-18Check `eolp' before using `char-after' in `paredit-kill'.Taylor R Campbell
Ignore-this: 37a88267c3b50f218838c5d456658094 darcs-hash:20100918181554-00fcc-ca49bd133d1f52e92c5b742c58cc643f659a6aba
2010-09-18Fix `paredit-kill' on whitespace character literal with margin comment.Taylor R Campbell
Ignore-this: 83cd857a1c3155fc0f9c30e8dc680d9a Before (| is point, not character literal): #\| ;foo =C-k=> #\| Note the dangling backslash: deleting it also deletes the line break. After: #\| ;foo =C-k=> #| darcs-hash:20100918151900-00fcc-d375fe5ced8edfb3fce71e189acd9166800ec0d5
2010-09-18Simplify definition of `paredit-kill-line-in-string'.Taylor R Campbell
Ignore-this: 2675f8bbbfd6cd029b434f233344b4a2 Now it relies on Emacs's S-expression parser to find where the string ends, rather than parsing and handling character escapes itself. It does a little more work this way, because it moves forward over the whole string even if the line ends long before the string ends, but this definition is simpler and more robust for correctness. darcs-hash:20100918151218-00fcc-5362e4359bb7ce34076f875c6d8b3eb444f0f360
2010-09-18Generalize `paredit-kill' to work inside any string-like object.Taylor R Campbell
Ignore-this: 16b21bd8bad54f6eeee9996665524b8a Previously `paredit-kill-line-in-string' expected the string to end with `"'; now it expects the string to end with any character whose syntax is a string delimiter. darcs-hash:20100918150630-00fcc-99d491db437f3395415c2456354e0c34273c2b0b
2010-09-17Revive `paredit-semicolon', with better behaviour.Taylor R Campbell
Ignore-this: 2ebf74083c75ef978f8f4e15070002e3 darcs-hash:20100917204244-00fcc-b698a185d46aaf792f065e98e0b1509eaee4f0a3
2010-09-17Make `paredit-newline' keep invalid structure inside comments.Taylor R Campbell
Ignore-this: 914cf744a9baefd2fe545a4dcedcb6e6 darcs-hash:20100917202803-00fcc-ccf81a80dc2bcb44576e674bea314d5c6cfcf3de
2010-09-17Refine scope of reindentation after raise, splice, and insert-comment.Taylor R Campbell
Ignore-this: 6213d7fb22c1c4598b6956b161be2cac darcs-hash:20100917202224-00fcc-610a9beb07c348babc652e7dee8519f01b06a6a3
2010-09-17Implement variable `paredit-space-for-delimiter-predicates'.Taylor R Campbell
Ignore-this: 45e159465eb88cd994e493dfccc9e495 darcs-hash:20100917193938-00fcc-8567c43f6d3941b49d5f4d848b292fe35af19d19
2010-09-17Fix some opening remarks about enabling paredit mode.Taylor R Campbell
Ignore-this: d35d59104fe2ecdbac980e90d206850 darcs-hash:20100917193839-00fcc-b5e38dbf0713069fccf298ad6125785805a4520d
2010-09-17Switch copying terms to GPLv3+.Taylor R Campbell
Ignore-this: 48fa16729dac3b8da693f85aaea5ccf0 darcs-hash:20100917193400-00fcc-c4c7e044c3906369cc383e3b63fdc6412c332067
2009-07-11Omit vestigial debug message in `paredit-backward-slurp-into-string'.Taylor R Campbell
darcs-hash:20090711210516-00fcc-5c1dad50949ad90aa9a3be0e48a4ffb4d54a388f
2009-07-11Put space between closing delimiters and opening double quotes.Taylor R Campbell
darcs-hash:20090711134828-00fcc-63df8cebaa7c8a165fda345100b1bb852a5eed00
2009-07-08Ignore errors while indenting after inserting a comment.Taylor R Campbell
This fixes an error after applying M-; to `(foo |)'. darcs-hash:20090708194039-00fcc-0f608f8e09edabce65c5b45d5d8c86ef24bb8dcd
2009-07-03Omit unused variable `orig' in `paredit-move-past-close-and-reindent'.Taylor R Campbell
darcs-hash:20090703195255-00fcc-bb484473cebaf86ecaa49aa910432b5143141421
2009-07-03Un-deprecate `enable-paredit-mode' and `disable-paredit-mode'.Taylor R Campbell
darcs-hash:20090703195221-00fcc-733a86154d8ff7d50b99cb63a05b8520a26da265
2009-03-09Call `end-of-defun' in `paredit-reindent-defun'.Taylor R Campbell
Doing this before `beginning-of-defun' keeps us from moving to the previous definition if we are already at the beginning of one. darcs-hash:20090309222045-00fcc-0f1ff306dd34e0ee4fa5ebafbfc85b12a19314a7
2009-02-25Add warning to documentation of prefix arguments to `paredit-mode'.Taylor R Campbell
darcs-hash:20090225063131-00fcc-28d66a1504d6b697f6ba40c44326aeb8d9546eea
2009-02-25Document the effect of a prefix argument to the `paredit-mode' command.Taylor R Campbell
darcs-hash:20090225062207-00fcc-d4951e8d277aceaac49113a9d36185e99dc22e2e
2009-02-23Implement `paredit-copy-as-kill'.Taylor R Campbell
Saves to the kill ring the text of the region that `paredit-kill' would kill. Suggested by Norman Werner <norman@norman-werner.de>. darcs-hash:20090223065027-00fcc-7cea5cd78e291f0e86450edc70665e0e26e36a40
2009-01-05Fix kill & yank errors with `paredit-lose-if-not-in-sexp' while barfing.Taylor R Campbell
darcs-hash:20090105133355-00fcc-b6838fcc0a0a8f3a8345866a67b717b8f4b8ac5b
2009-01-05Bump copyright year.Taylor R Campbell
darcs-hash:20090105133224-00fcc-c396399451e85cd5aec2cabac523bf3a7b3e0c38
2008-12-15Add magic autoload comment for `paredit-mode'.Taylor R Campbell
darcs-hash:20081215182120-00fcc-156c7d0d5f0a7a33fd07881c5b252a8ec15b5d86
2008-10-25Clarify `paredit-insert-comment' and change its criteria for code comments.Taylor R Campbell
Formerly, this would choose code comments only when code follow the point on the line. Now it will insert code comments also when no code precede the point on the line. For example, the command will choose a code comment rather than a margin comment in the following fragment: (foo bar |baz quux) => (foo bar ;; | baz quux) darcs-hash:20081025201840-00fcc-0435e69b7e5e42c43a763dad345c0f8a25925b89
2008-10-25Update the compatibility and compiler warning suppression hacks for Emacs 22.Taylor R Campbell
The byte-code compiler of GNU Emacs 22 is now clever enough to detect and flag (funcall 'an-undefined-function ...), so use `autoload' for the newcomment.el routines instead. There may be other functions that should be autoloaded, such as `comment-kill' and `comment-indent'. Currently GNU Emacs 22 signals no warnings about these, however. I don't know whether these changes works in GNU Emacs 21 or XEmacs, but they probably do. darcs-hash:20081025201214-00fcc-350188c1285ba0519aa7bf20fbab0209c1ee21df
2008-10-25Change `paredit-comment-on-line-p' to use `comment-search-forward'.Taylor R Campbell
Since this requires the comment support to be initialized, use `funcall' on a symbol and document that `paredit-comment-on-line-p' may be called only from `paredit-comment-dwim'. darcs-hash:20081025194406-00fcc-5427d02b5bb86a84aa5b3fcf7448b782d321e529
2008-09-28Broaden `paredit-raise-sexp' to act sensibly on strings and characters.Taylor R Campbell
darcs-hash:20080928142541-00fcc-90dd4da3c4fd9e689c7d1558f384f21766f07e86
2008-09-28Fix indentation in definition of `paredit-initialize-comment-dwim'.Taylor R Campbell
darcs-hash:20080928142326-00fcc-4ba83303f54bdc9c0c27807e0a8e2f64e4a1b86a
2008-09-28Call `comment-forward' as a symbol with `funcall'.Taylor R Campbell
This suppresses the compiler's warning about a function not known to be defined. darcs-hash:20080928135222-00fcc-5f4d902e13be97833fd28c5e611147c577ec1c41
2008-09-28Bump version number: 21 -> 22 beta.Taylor R Campbell
darcs-hash:20080928134937-00fcc-7caddb09c14e2cfde0f950d150a9d2a18f2b9d78
2008-09-28Changes for version 21.v21Taylor R Campbell
Paredit 21 no longer has a message releasing it into the public domain. Instead it is copyright (C) 2008, Taylor R. Campbell, and available under the terms of the 3-clause BSD licence. See the paredit.el file for details. *** Style and Bugs - Use of the terms `parenthesis', `bracket', and `delimiter' has been clarified throughout the file: . /Parentheses/ are nestable objects indicated by matching delimiter pairs. For example, the text `(foo (bar baz) quux)' has two parentheses, `(foo ... quux)' and `(bar baz)'; each is delimited by matching round delimiters. . /Delimiters/ are the actual atomic objects that delimit parentheses. They may be shaped differently; for example, `[' is an opening square delimiter, and `{' is an opening curly delimiter. . The terms `bracket', `brace', and `brocket' (the latter a misspelling of `broket', for `broken bracket') are eschewed. The names `paredit-open-parenthesis' &c. have been changed to `paredit-open-round' &c., and likewise with `bracket' -> `square', `brace' -> `curly', and `brocket' -> `angled'. The old names with the morphemes `parenthesis' and `bracket' have been preserved so that users need not update initialization files immediately, but will instead be confused when a subsequent minor update breaks all their initialization files for no good reason. - Some commands now check their context more strictly, so that they won't try to do anything in comments or strings. Whether this is the right thing, I don't know. - Several small elements of style were adjusted. This should make no functional difference on the code. (If it does, then I have made a mistake.) - paredit.el no longer defines `kill-region-new'; the function is instead called `paredit-hack-kill-region', to reflect its hackish nature and to avoid name clashes. I believe that the only name remaining defined by paredit.el without `paredit-' prefixed is `backward-down-list', whose definition is so obvious that it would be silly to define it any other way, so that any name conflict does not worry me. (I suppose `kill-region-new' is obvious, too -- it is to `kill-region' as `kill-new' is to `kill'. But the omission from a pattern isn't as clear as with `backward-down-list'.) - `paredit-comment-dwim' should work in GNU Emacs 21 now, whose newcomment.el defines no `comment-or-uncomment-region'. More and more ugly compatibility hacks are accruing in paredit.el as a consequence, to my dismay. Oh well. - The release notes are now formatted more legibly, paginated nicely, and organized with Outline Mode. The gross discrepancy in writing style over the years has not changed. - The introductory comments in the file are more clearly written now. - Fixed a bug in S-expression slurpage with mixed delimiters. *** Altered Behaviour - The bindings for `)' and `M-)' have been exchanged: `)' is bound to `paredit-close-round' and `M-)' to `paredit-close-round-and-newline', so that you can now without any glaring exceptions type new code using the same keystrokes with and without Paredit Mode. You can also now paste into Emacs through a terminal without leaving spurious blank lines in the buffer. You are, of course, free to revert to the old behaviour in your .emacs file. - `paredit-semicolon' is no more. Now you may insert semicolons as you please without the infuriating escape of the following text on the line. - `paredit-move-past-close-and-newline' will now leave comments on the same line only if they are margin comments and no S-expressions are intervening between the point and the comment; that is, only if it looks like the margin comment really pertains to the expression being closed will paredit leave it on the same line. - `paredit-backward-delete', `paredit-forward-delete', and `paredit-kill' formerly accepted prefix arguments to run the basic `backward-delete-char', `delete-char', and `kill-line' commands instead, without regard for the value of the prefix argument. Now `C-u' will run the basic commands, but . `paredit-kill' will pass a numeric argument on to `kill-line', and . `paredit-backward-delete' and `paredit-forward-delete' will both delete N characters if given a numeric prefix argument N. (`paredit-kill' should probably do the same, but repeating the command N times is probably not what you want -- what you probably want is to kill at most N *lines*, but `paredit-kill' N times might kill many more lines than that. I don't know what the right thing is here, but I welcome feedback from users who want to do something like this.) - With a `C-u' prefix argument, `paredit-wrap-sexp' now wraps all S-expressions following the point until the end of the buffer or a closing delimiter. - `paredit-splice-sexp' with a `C-u' prefix argument (also known as `paredit-splice-sexp-killing-backward') will now kill from the point, rather than from the beginning of the next S-expression (or, with `C-u C-u', from the end of the previous S-expression). This means that it is more likely to do what you mean with (let ((a b) (c d)) |;; I want to preserve this comment after `C-u M-s'. (foo bar baz)) - `paredit-splice-sexp' now splices strings, by removing backslash escapes, or signals an error if doing so would destroy the structure of the buffer. - I have finally introduced the first bit of code to try to deal sensibly with broken buffers. It will probably go only downhill from here, and continue in an interminable series of kludges to handle every possible way in which the buffer can go *wrong* (it's bad enough how many ways it can be *right*). If you try type a closing delimiter from within a partial S-expression that has an opening delimiter but no closing delimiter, then it will honk at you and insert the closing delimiter -- or if what you typed doesn't match the opening delimiter, it will just honk and refuse to do anything. Also, `DEL' and `C-d' will delete spurious (but not [yet] mismatched) opening and closing delimiters, respectively. (Thanks to John Wiegley for inspiring me to do these dreary deeds.) *** New Commands - New command `paredit-yank-pop' cooperates with `paredit-wrap-sexp' by behaving either like `yank' or like `yank-pop' if the previous command was `paredit-wrap-sexp' or `paredit-yank-pop', and with the added bonus of reindenting the newly wrapped form. It is in need of a key to be bound to it; since it is different from both `yank' and `yank-pop', I decided not to override `C-y' or `M-y', and I considered `C-c C-y', but I imagine that many major modes want to take that. - New command `paredit-focus-on-defun' moves display to the top of the definition at the point. - New command `paredit-reindent-defun', which `M-q' is bound to in Paredit Mode, indents the definition the point is on, or, if the point is in a string or comment, fills the paragraph instead. (Thanks to John Wiegley for the idea.) - New variations on slurpage, barfage, and joinage. I'm still looking for keys to bind to these commands. Find them with the strings `add-to-{previous,next}-list' and `join-with-{previous,next}-list' in their names. (Again, thanks to John Wiegley for the idea.) - New command `paredit-convolute-sexp' performs the combined function of `paredit-splice-sexp-killing-backward', `paredit-wrap-sexp', and `yank'. Example: (let ((foo bar)) (let ((baz quux)) |(zot mumble) (frotz)) (gargle mumph)) -> (let ((baz quux)) (let ((foo bar)) (zot mumble) (frotz) (gargle mumph))) This would otherwise have been done with the key sequence `C-u M-s C-M-u M-( C-y C-M-u C-M-q'. `C-u M-s' could be `M-up', and `C-y C-M-u C-M-q' could be `C-c C-y' if that key is chosen for `paredit-yank-pop', making the sequence `M-up C-M-u M-( C-c C-y'. If there is a good key for `paredit-convolute-sexp', it could be a nice improvement over even that terser sequence. (Once again, this was inspired by John Wiegley's idea (and name).) [Observe, though, that the form (FROTZ) stuck with (ZOT MUMBLE) the whole time, and was not carried along as the `end' of the (LET ((BAZ QUUX)) ...) form. Hence this is *not* the idea mentioned below by the name `paredit-interchange-sexps', but a simpler approximation of the idea.] - `define-paredit-pair' now defines commands `paredit-wrap-...' for wrapping S-expressions with different delimiters, like `paredit-wrap-sexp'. The function `paredit-wrap-sexp' now accepts optional arguments for the delimiters to insert; the new commands are defined in terms of the modified `paredit-wrap-sexp'. `M-[' is now bound to `paredit-wrap-square'. darcs-hash:20080928134400-00fcc-618d1b2da41f6a67aaef69d72d89ce15379372cc
2008-09-28Changes for version 20.v20Taylor R Campbell
*** Preliminary Support for XEmacs This version introduces preliminary support for XEmacs. The changes needed were: - `check-parens' is called by the `paredit-mode' initialization only if it is fbound. - The forward and backward deletion keys are specified differently in GNU Emacs and XEmacs. - `paredit-forward' and `paredit-backward' use a "_" interactive specification in XEmacs in order to preserve the mark. - `paredit-region-active-p' is just `region-active-p' in XEmacs. - Some hair was needed to handle S-expression parse error conditions properly, and versions of XEmacs earlier than 21.5 may have obscure problems as a result. *** Style and Bugs - rxvt-specific terminal escape sequences are no longer bound to the commands that the keys those sequences denote are. Set your environment variables correctly and keep your rxvt.el updated. (Aren't terminals fun?) - HTML output is now properly quoted. Some vestigial indirections in the tables have been removed. - Yet *ANOTHER* `paredit-kill' bug is fixed. I do not know what the bug is or why it happened, but it seems to be gone now. - Improved robustness of `paredit-join-sexps' and `paredit-splice-sexp' with respect to their use in the middle of atoms, and made splicing within a string illegal. - Fixed several bugs in the paredit word killing commands. In the process, however, I encountered what seems to be a bug in Emacs's `parse-partial-sexp', which may mean bugs in other things... - Eliminated dependency on `cl' feature. - Fixed a bug in `paredit-backward-kill-word' that would cause deletion of the first double-quote in `(foo "|")'. - Fixed a bug with `paredit-backward-kill-word' at the end of buffer. - Fixed a bug with `paredit-backward-kill-word' before any words in a buffer. *** Altered Behaviour and New Functionality - `paredit-mode' now accepts a prefix argument to mean that it should not check the parentheses in the buffer first. Supply the prefix argument with care; though it is useful for editing small parts of a buffer in Lisp when the rest is random, it might also screw the whole buffer up in unpredictable ways, because most of paredit doesn't even try to handle invalid structure. - Parenthesis blinking is improved somewhat to better respect user customization of `blink-matching-paren'. - The paredit minor mode no longer exchanges C-j & RET; following the GNU Emacs conventions, it now leaves RET alone and binds C-j to `paredit-newline'. Those of you, such as me, who relied on the old exchange will have to update your .emacs files. - C-left and C-right are now bound to paredit-forward-barf-sexp and paredit-forward-slurp-sexp, instead of M-left and M-right, whose word motion bindings are no longer shadowed. - The behaviour of (, ", M-(, and M-" with respect to active regions and prefix arguments has been regularized: . With neither an active region, i.e. an active mark and transient-mark-mode, ( and " will insert a pair of delimiters at the point, and M-( and M-" will wrap the following expression with delimiters. . With an active region and no prefix argument, if and only if the region contains only balanced expressions, all four commands will wrap the region with the respective delimiters. . With a prefix argument N, all four commands will wrap the next N expressions with the commands' respective delimiters. " and M-", of course, escape any characters that need escaping first if they are used to wrap regions. - Implemented slurpage into strings. - Made `M-- M-s' equivalent to `M-- M-1 M-s'. - Changed `paredit-insert-pair' so that it will not skip whitespace before inserting the pair. - `paredit-splice-sexp' with a prefix argument and friends (i.e. `M-s', `M-<up>', and `M-<down>') now always create a new entry on the kill ring. darcs-hash:20080928134307-00fcc-ad5658e27bb367859e56b76b9e376a2a384737d1
2008-09-28Changes for version 19.v19Taylor R Campbell
This version introduces support for delimiters other than round brackets. Previously, if the major mode's syntax table considered square brackets (and curly braces, &c.) to be delimiters, since no paredit commands would insert them balanced, deleting them would be tricky: paredit's DEL & C-d bindings would refuse to delete them because they would be imbalanced unless you manually type the closing delimiter. Now commands are defined for the opening and closing of parentheses (round), brackets (square), braces (curly), and brockets (angled), named `paredit-open-<type>', `paredit-close-<type>-and-newline', and `paredit-close-<type>'; paredit-mode binds the opening and closing square bracket keys to be `paredit-open-bracket' and `paredit-close- bracket', respectively. The rest you can bind yourself; this minimal pair of bindings will, I think, account for accidental insertion, elisp vectors, and (bletch) the equation of square and round brackets as parentheses in some non-standard Scheme extensions. Also now supported in this version is insertion of delimiter pairs around active regions in transient-mark-mode. If you mark a region with transient-mark-mode enabled, you can use any of the delimiter pair insertion keys (like opening round bracket, double-quote, &c.) to insert a pair of delimiters around the region. There are now two ways to parenthesize lists of expressions with visual feedback: using M-( (paredit-wrap-sexp) followed by C-) (paredit-forward-slurp-sexp) until satisfied, and now C-M-SPC (mark-sexp) until you have marked the desired expressions and then any of the delimiter pair insertion keys to insert the delimiters. darcs-hash:20080928134228-00fcc-3ec209344dbaea07e93f2e02cddead13f7e39c6a