* Re: lisp function help
[not found] ` <m2imhumqrx.fsf@axel-reichert.de>
@ 2020-04-21 14:24 ` Pieter van Oostrum
0 siblings, 0 replies; only message in thread
From: Pieter van Oostrum @ 2020-04-21 14:24 UTC (permalink / raw)
To: help-gnu-emacs
Axel Reichert <mail@axel-reichert.de> writes:
>> (if (and beg end)
>> ((message "inside if")
>> (sort-numeric-fields field beg end)
>> (reverse-region beg end))
>> )
>
> progn missing here?
Not only that but also a missing ) at the end of the (interactive
(list (read-number "Field number: " 1) (point-min) (point-max))))
(defun sort-numeric-fields-reverse (field beg end)
"sort numeric fields in reverse order"
(interactive
(if (use-region-p)
(list (read-number "Field number: " 1) (region-beginning) (region-end))
(list (read-number "Field number: " 1) (point-min) (point-max))))
(message "calling if")
(if (and beg end)
(progn
(message "inside if")
(sort-numeric-fields field beg end)
(reverse-region beg end))
)
)
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-21 14:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <e83c03fb-9695-4248-8683-cdebabe090a1@googlegroups.com>
[not found] ` <m2imhumqrx.fsf@axel-reichert.de>
2020-04-21 14:24 ` lisp function help Pieter van Oostrum
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.