branch: externals/pspp-mode commit f0872801dab7b5bedb1fe71252ebc59864a87e8c Author: Mattias Engdegård <matti...@acm.org> Commit: Mattias Engdegård <matti...@acm.org>
* pspp-mode.el: Simplify pspp--updown-list (pspp--updown-list): Use mapcar instead of recursion. (pspp--downcase-list, pspp--upcase-list): Remove. --- pspp-mode.el | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pspp-mode.el b/pspp-mode.el index 401d517..74ff594 100644 --- a/pspp-mode.el +++ b/pspp-mode.el @@ -60,24 +60,10 @@ "Size of indent.") -(defun pspp--downcase-list (l) - "Takes a list of strings and returns that list with all elements downcased" - (if l - (cons (downcase (car l)) (pspp--downcase-list (cdr l))) - nil)) - - -(defun pspp--upcase-list (l) - "Takes a list of strings and returns that list with all elements upcased" - (if l - (cons (upcase (car l)) (pspp--upcase-list (cdr l))) - nil)) - - (defun pspp--updown-list (l) "Takes a list of strings and returns that list with all elements upcased and downcased" - (append (pspp--upcase-list l) (pspp--downcase-list l))) + (append (mapcar #'upcase l) (mapcar #'downcase l))) (defconst pspp-indenters