From b560cde0c438fd730ee155b2ff5482153438d7da Mon Sep 17 00:00:00 2001 From: Andreas Roehler Date: Fri, 29 May 2009 09:28:08 +0200 Subject: [PATCH] Revert "peel-list" This reverts commit c07cfbaacc00a3374de519cc073b2364662f0023. --- code/elbb-misc-utils.el | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/code/elbb-misc-utils.el b/code/elbb-misc-utils.el index 8e16048..faaf98b 100644 --- a/code/elbb-misc-utils.el +++ b/code/elbb-misc-utils.el @@ -15,6 +15,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . + ;; Copyright (C) 2009 by Andreas Roehler ;; Author Andreas Roehler @@ -87,45 +88,4 @@ Stepps through region if activated, otherwise takes the whole buffer." (delete-char 1) (insert cn))) -(require 'thing-at-point-utils) -;; thing-at-point-utils are available at -;; https://code.launchpad.net/s-x-emacs-werkstatt/ -(defun peel-list-atpt () - "Remove list at point, preserve inner lists. -Whatever is part of a list at the -beginning and end of the present i.e. sourrounding list -will be deleted. -Must be called from the part of list to remove." - (interactive "*") - (save-excursion - (let* ((bounds (bounds-of-list-atpt)) - (beg (car bounds)) - (end (cdr bounds))) - (down-list) - (let* ((bounds (bounds-of-list-atpt)) - (inner-beg (car bounds)) - (inner-end (cdr bounds))) - (delete-region inner-end end) - (goto-char beg) - (delete-region beg inner-beg))))) - -;; re-implemented here to run without `thing-at-point-utils' -(require 'thingatpt) -(defun peel-list-at-point () - "Remove list at point, preserve inner lists. -Whatever is part of a list at the -beginning and end of the present i.e. sourrounding list -will be deleted. -Must be called from the part of list to remove." - (interactive "*") - (save-excursion - (let ((beg (save-excursion (progn (beginning-of-thing 'list) (point)))) - (end (save-excursion (progn (end-of-thing 'list) (point))))) - (down-list) - (let ((inner-beg (save-excursion (progn (beginning-of-thing 'list) (point)))) - (inner-end (save-excursion (progn (end-of-thing 'list) (point))))) - (delete-region inner-end end) - (goto-char beg) - (delete-region beg inner-beg))))) - ;; elbb-misc-utils.el ends here -- 2.11.4.GIT