Browse Source

Remove redundant 'function's around lambda

* contrib/lisp/org-secretary.el (join):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-project-plan):
* lisp/org-clock.el (org-resolve-clocks):
* lisp/org-element.el (org-element--interpret-affiliated-keywords):
* lisp/org-list.el (org-list-struct, org-list-get-item-number)
(org-list-separating-blank-lines-number)
(org-list-struct-fix-bul, org-list-struct-apply-struct):
* lisp/org.el (org-agenda-files, org-toggle-heading):
* lisp/ox-ascii.el (org-ascii-table-row):
* lisp/ox-beamer.el (org-beamer--format-section)
(org-beamer-template):
* lisp/ox-odt.el (org-odt--render-image/formula):
* testing/org-batch-test-init.el (load-path): Remove redundant
'function's around lambda.
Stefan Kangas 4 years ago
parent
commit
1a480e01a4

+ 1 - 1
contrib/lisp/org-secretary.el

@@ -177,7 +177,7 @@
 (global-set-key "\C-cj" 'org-sec-tag-entry)
 (global-set-key "\C-cj" 'org-sec-tag-entry)
 
 
 (defun join (lst sep &optional pre post)
 (defun join (lst sep &optional pre post)
-  (mapconcat (function (lambda (x) (concat pre x post))) lst sep))
+  (mapconcat (lambda (x) (concat pre x post)) lst sep))
 
 
 (defun org-sec-get-with ()
 (defun org-sec-get-with ()
   (if org-sec-with
   (if org-sec-with

+ 2 - 3
contrib/lisp/ox-taskjuggler.el

@@ -720,9 +720,8 @@ Return complete project plan as a string in TaskJuggler syntax."
 	      (mapconcat
 	      (mapconcat
 	       'org-element-normalize-string
 	       'org-element-normalize-string
 	       (mapcar
 	       (mapcar
-		(function
-		 (lambda (report)
-		   (replace-regexp-in-string "%title" report-title  report t t)))
+		(lambda (report)
+		  (replace-regexp-in-string "%title" report-title  report t t))
 		org-taskjuggler-default-reports) "")))))))))
 		org-taskjuggler-default-reports) "")))))))))
 
 
 (defun org-taskjuggler--build-project (project info)
 (defun org-taskjuggler--build-project (project info)

+ 6 - 7
lisp/org-clock.el

@@ -1164,13 +1164,12 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
 		  (org-clock-resolve
 		  (org-clock-resolve
 		   clock
 		   clock
 		   (or prompt-fn
 		   (or prompt-fn
-		       (function
-			(lambda (clock)
-			  (format
-			   "Dangling clock started %d mins ago"
-			   (floor (org-time-convert-to-integer
-                                   (org-time-since (cdr clock)))
-                                  60)))))
+		       (lambda (clock)
+			 (format
+			  "Dangling clock started %d mins ago"
+			  (floor (org-time-convert-to-integer
+				  (org-time-since (cdr clock)))
+				 60))))
 		   (or last-valid
 		   (or last-valid
 		       (cdr clock)))))))))))
 		       (cdr clock)))))))))))
 
 

+ 12 - 13
lisp/org-element.el

@@ -4655,19 +4655,18 @@ to interpret.  Return Org syntax as a string."
   "Return ELEMENT's affiliated keywords as Org syntax.
   "Return ELEMENT's affiliated keywords as Org syntax.
 If there is no affiliated keyword, return the empty string."
 If there is no affiliated keyword, return the empty string."
   (let ((keyword-to-org
   (let ((keyword-to-org
-	 (function
-	  (lambda (key value)
-	    (let (dual)
-	      (when (member key org-element-dual-keywords)
-		(setq dual (cdr value) value (car value)))
-	      (concat "#+" (downcase key)
-		      (and dual
-			   (format "[%s]" (org-element-interpret-data dual)))
-		      ": "
-		      (if (member key org-element-parsed-keywords)
-			  (org-element-interpret-data value)
-			value)
-		      "\n"))))))
+	 (lambda (key value)
+	   (let (dual)
+	     (when (member key org-element-dual-keywords)
+	       (setq dual (cdr value) value (car value)))
+	     (concat "#+" (downcase key)
+		     (and dual
+			  (format "[%s]" (org-element-interpret-data dual)))
+		     ": "
+		     (if (member key org-element-parsed-keywords)
+			 (org-element-interpret-data value)
+		       value)
+		     "\n")))))
     (mapconcat
     (mapconcat
      (lambda (prop)
      (lambda (prop)
        (let ((value (org-element-property prop element))
        (let ((value (org-element-property prop element))

+ 159 - 167
lisp/org-list.el

@@ -600,25 +600,23 @@ Assume point is at an item."
 	   (beg-cell (cons (point) (current-indentation)))
 	   (beg-cell (cons (point) (current-indentation)))
            itm-lst itm-lst-2 end-lst end-lst-2 struct
            itm-lst itm-lst-2 end-lst end-lst-2 struct
 	   (assoc-at-point
 	   (assoc-at-point
-	    (function
-	     ;; Return association at point.
-	     (lambda (ind)
-	       (looking-at org-list-full-item-re)
-	       (let ((bullet (match-string-no-properties 1)))
-		 (list (point)
-		       ind
-		       bullet
-		       (match-string-no-properties 2) ; counter
-		       (match-string-no-properties 3) ; checkbox
-		       ;; Description tag.
-		       (and (string-match-p "[-+*]" bullet)
-			    (match-string-no-properties 4)))))))
+	    ;; Return association at point.
+	    (lambda (ind)
+	      (looking-at org-list-full-item-re)
+	      (let ((bullet (match-string-no-properties 1)))
+		(list (point)
+		      ind
+		      bullet
+		      (match-string-no-properties 2) ; counter
+		      (match-string-no-properties 3) ; checkbox
+		      ;; Description tag.
+		      (and (string-match-p "[-+*]" bullet)
+			   (match-string-no-properties 4))))))
 	   (end-before-blank
 	   (end-before-blank
-	    (function
-	     ;; Ensure list ends at the first blank line.
-	     (lambda ()
-	       (skip-chars-backward " \r\t\n")
-	       (min (1+ (point-at-eol)) lim-down)))))
+	    ;; Ensure list ends at the first blank line.
+	    (lambda ()
+	      (skip-chars-backward " \r\t\n")
+	      (min (1+ (point-at-eol)) lim-down))))
       ;; 1. Read list from starting item to its beginning, and save
       ;; 1. Read list from starting item to its beginning, and save
       ;;    top item position and indentation in BEG-CELL.  Also store
       ;;    top item position and indentation in BEG-CELL.  Also store
       ;;    ending position of items in END-LST.
       ;;    ending position of items in END-LST.
@@ -1003,23 +1001,22 @@ alist of ancestors, as returned by `org-list-parents-alist'.
 Return value is a list of integers.  Counters have an impact on
 Return value is a list of integers.  Counters have an impact on
 that value."
 that value."
   (let ((get-relative-number
   (let ((get-relative-number
-	 (function
-	  (lambda (item struct prevs)
-	    ;; Return relative sequence number of ITEM in the sub-list
-	    ;; it belongs.  STRUCT is the list structure.  PREVS is
-	    ;; the alist of previous items.
-	    (let ((seq 0) (pos item) counter)
-	      (while (and (not (setq counter (org-list-get-counter pos struct)))
-			  (setq pos (org-list-get-prev-item pos struct prevs)))
-		(cl-incf seq))
-	      (if (not counter) (1+ seq)
-		(cond
-		 ((string-match "[A-Za-z]" counter)
-		  (+ (- (string-to-char (upcase (match-string 0 counter))) 64)
-		     seq))
-		 ((string-match "[0-9]+" counter)
-		  (+ (string-to-number (match-string 0 counter)) seq))
-		 (t (1+ seq)))))))))
+	 (lambda (item struct prevs)
+	   ;; Return relative sequence number of ITEM in the sub-list
+	   ;; it belongs.  STRUCT is the list structure.  PREVS is
+	   ;; the alist of previous items.
+	   (let ((seq 0) (pos item) counter)
+	     (while (and (not (setq counter (org-list-get-counter pos struct)))
+			 (setq pos (org-list-get-prev-item pos struct prevs)))
+	       (cl-incf seq))
+	     (if (not counter) (1+ seq)
+	       (cond
+		((string-match "[A-Za-z]" counter)
+		 (+ (- (string-to-char (upcase (match-string 0 counter))) 64)
+		    seq))
+		((string-match "[0-9]+" counter)
+		 (+ (string-to-number (match-string 0 counter)) seq))
+		(t (1+ seq))))))))
     ;; Cons each parent relative number into return value (OUT).
     ;; Cons each parent relative number into return value (OUT).
     (let ((out (list (funcall get-relative-number item struct prevs)))
     (let ((out (list (funcall get-relative-number item struct prevs)))
 	  (parent item))
 	  (parent item))
@@ -1181,14 +1178,13 @@ some heuristics to guess the result."
 	   (cdr (assq 'plain-list-item org-blank-before-new-entry)))
 	   (cdr (assq 'plain-list-item org-blank-before-new-entry)))
 	  usr-blank
 	  usr-blank
 	  (count-blanks
 	  (count-blanks
-	   (function
-	    (lambda ()
-	      ;; Count blank lines above beginning of line.
-	      (save-excursion
-		(count-lines (goto-char (point-at-bol))
-			     (progn (skip-chars-backward " \r\t\n")
-				    (forward-line)
-				    (point))))))))
+	   (lambda ()
+	     ;; Count blank lines above beginning of line.
+	     (save-excursion
+	       (count-lines (goto-char (point-at-bol))
+			    (progn (skip-chars-backward " \r\t\n")
+				   (forward-line)
+				   (point)))))))
       (cond
       (cond
        ;; Trivial cases where there should be none.
        ;; Trivial cases where there should be none.
        ((not insert-blank-p) 0)
        ((not insert-blank-p) 0)
@@ -1651,65 +1647,64 @@ PREVS is the alist of previous items, as returned by
 This function modifies STRUCT."
 This function modifies STRUCT."
   (let ((case-fold-search nil)
   (let ((case-fold-search nil)
 	(fix-bul
 	(fix-bul
-	 (function
-	  ;; Set bullet of ITEM in STRUCT, depending on the type of
-	  ;; first item of the list, the previous bullet and counter
-	  ;; if any.
-	  (lambda (item)
-	    (let* ((prev (org-list-get-prev-item item struct prevs))
-		   (prev-bul (and prev (org-list-get-bullet prev struct)))
-		   (counter (org-list-get-counter item struct))
-		   (bullet (org-list-get-bullet item struct))
-		   (alphap (and (not prev)
-				(org-list-use-alpha-bul-p item struct prevs))))
-	      (org-list-set-bullet
-	       item struct
-	       (org-list-bullet-string
-		(cond
-		 ;; Alpha counter in alpha list: use counter.
-		 ((and prev counter
-		       (string-match "[a-zA-Z]" counter)
-		       (string-match "[a-zA-Z]" prev-bul))
-		  ;; Use cond to be sure `string-match' is used in
-		  ;; both cases.
-		  (let ((real-count
-			 (cond
-			  ((string-match "[a-z]" prev-bul) (downcase counter))
-			  ((string-match "[A-Z]" prev-bul) (upcase counter)))))
-		    (replace-match real-count nil nil prev-bul)))
-		 ;; Num counter in a num list: use counter.
-		 ((and prev counter
-		       (string-match "[0-9]+" counter)
-		       (string-match "[0-9]+" prev-bul))
-		  (replace-match counter nil nil prev-bul))
-		 ;; No counter: increase, if needed, previous bullet.
-		 (prev
-		  (org-list-inc-bullet-maybe (org-list-get-bullet prev struct)))
-		 ;; Alpha counter at first item: use counter.
-		 ((and counter (org-list-use-alpha-bul-p item struct prevs)
-		       (string-match "[A-Za-z]" counter)
-		       (string-match "[A-Za-z]" bullet))
-		  (let ((real-count
-			 (cond
-			  ((string-match "[a-z]" bullet) (downcase counter))
-			  ((string-match "[A-Z]" bullet) (upcase counter)))))
-		    (replace-match real-count nil nil bullet)))
-		 ;; Num counter at first item: use counter.
-		 ((and counter
-		       (string-match "[0-9]+" counter)
-		       (string-match "[0-9]+" bullet))
-		  (replace-match counter nil nil bullet))
-		 ;; First bullet is alpha uppercase: use "A".
-		 ((and alphap (string-match "[A-Z]" bullet))
-		  (replace-match "A" nil nil bullet))
-		 ;; First bullet is alpha lowercase: use "a".
-		 ((and alphap (string-match "[a-z]" bullet))
-		  (replace-match "a" nil nil bullet))
-		 ;; First bullet is num: use "1".
-		 ((string-match "\\([0-9]+\\|[A-Za-z]\\)" bullet)
-		  (replace-match "1" nil nil bullet))
-		 ;; Not an ordered list: keep bullet.
-		 (t bullet)))))))))
+	 ;; Set bullet of ITEM in STRUCT, depending on the type of
+	 ;; first item of the list, the previous bullet and counter
+	 ;; if any.
+	 (lambda (item)
+	   (let* ((prev (org-list-get-prev-item item struct prevs))
+		  (prev-bul (and prev (org-list-get-bullet prev struct)))
+		  (counter (org-list-get-counter item struct))
+		  (bullet (org-list-get-bullet item struct))
+		  (alphap (and (not prev)
+			       (org-list-use-alpha-bul-p item struct prevs))))
+	     (org-list-set-bullet
+	      item struct
+	      (org-list-bullet-string
+	       (cond
+		;; Alpha counter in alpha list: use counter.
+		((and prev counter
+		      (string-match "[a-zA-Z]" counter)
+		      (string-match "[a-zA-Z]" prev-bul))
+		 ;; Use cond to be sure `string-match' is used in
+		 ;; both cases.
+		 (let ((real-count
+			(cond
+			 ((string-match "[a-z]" prev-bul) (downcase counter))
+			 ((string-match "[A-Z]" prev-bul) (upcase counter)))))
+		   (replace-match real-count nil nil prev-bul)))
+		;; Num counter in a num list: use counter.
+		((and prev counter
+		      (string-match "[0-9]+" counter)
+		      (string-match "[0-9]+" prev-bul))
+		 (replace-match counter nil nil prev-bul))
+		;; No counter: increase, if needed, previous bullet.
+		(prev
+		 (org-list-inc-bullet-maybe (org-list-get-bullet prev struct)))
+		;; Alpha counter at first item: use counter.
+		((and counter (org-list-use-alpha-bul-p item struct prevs)
+		      (string-match "[A-Za-z]" counter)
+		      (string-match "[A-Za-z]" bullet))
+		 (let ((real-count
+			(cond
+			 ((string-match "[a-z]" bullet) (downcase counter))
+			 ((string-match "[A-Z]" bullet) (upcase counter)))))
+		   (replace-match real-count nil nil bullet)))
+		;; Num counter at first item: use counter.
+		((and counter
+		      (string-match "[0-9]+" counter)
+		      (string-match "[0-9]+" bullet))
+		 (replace-match counter nil nil bullet))
+		;; First bullet is alpha uppercase: use "A".
+		((and alphap (string-match "[A-Z]" bullet))
+		 (replace-match "A" nil nil bullet))
+		;; First bullet is alpha lowercase: use "a".
+		((and alphap (string-match "[a-z]" bullet))
+		 (replace-match "a" nil nil bullet))
+		;; First bullet is num: use "1".
+		((string-match "\\([0-9]+\\|[A-Za-z]\\)" bullet)
+		 (replace-match "1" nil nil bullet))
+		;; Not an ordered list: keep bullet.
+		(t bullet))))))))
     (mapc fix-bul (mapcar #'car struct))))
     (mapc fix-bul (mapcar #'car struct))))
 
 
 (defun org-list-struct-fix-ind (struct parents &optional bullet-size)
 (defun org-list-struct-fix-ind (struct parents &optional bullet-size)
@@ -1755,21 +1750,20 @@ all others cases, the return value will be nil.
 This function modifies STRUCT."
 This function modifies STRUCT."
   (let ((all-items (mapcar #'car struct))
   (let ((all-items (mapcar #'car struct))
 	(set-parent-box
 	(set-parent-box
-	 (function
-	  (lambda (item)
-	    (let* ((box-list
-		    (mapcar (lambda (child)
-			      (org-list-get-checkbox child struct))
-			    (org-list-get-children item struct parents))))
-	      (org-list-set-checkbox
-	       item struct
-	       (cond
-		((and (member "[ ]" box-list) (member "[X]" box-list)) "[-]")
-		((member "[-]" box-list) "[-]")
-		((member "[X]" box-list) "[X]")
-		((member "[ ]" box-list) "[ ]")
-		;; Parent has no boxed child: leave box as-is.
-		(t (org-list-get-checkbox item struct))))))))
+	 (lambda (item)
+	   (let* ((box-list
+		   (mapcar (lambda (child)
+			     (org-list-get-checkbox child struct))
+			   (org-list-get-children item struct parents))))
+	     (org-list-set-checkbox
+	      item struct
+	      (cond
+	       ((and (member "[ ]" box-list) (member "[X]" box-list)) "[-]")
+	       ((member "[-]" box-list) "[-]")
+	       ((member "[X]" box-list) "[X]")
+	       ((member "[ ]" box-list) "[ ]")
+	       ;; Parent has no boxed child: leave box as-is.
+	       (t (org-list-get-checkbox item struct)))))))
 	parent-list)
 	parent-list)
     ;; 1. List all parents with a checkbox.
     ;; 1. List all parents with a checkbox.
     (mapc
     (mapc
@@ -1840,56 +1834,54 @@ Initial position of cursor is restored after the changes."
 			     (org-inlinetask-outline-regexp)))
 			     (org-inlinetask-outline-regexp)))
 	 (item-re (org-item-re))
 	 (item-re (org-item-re))
 	 (shift-body-ind
 	 (shift-body-ind
-	  (function
-	   ;; Shift the indentation between END and BEG by DELTA.
-	   ;; Start from the line before END.
-	   (lambda (end beg delta)
-	     (goto-char end)
-	     (skip-chars-backward " \r\t\n")
-	     (beginning-of-line)
-	     (while (or (> (point) beg)
-			(and (= (point) beg)
-			     (not (looking-at item-re))))
-	       (cond
-		;; Skip inline tasks.
-		((and inlinetask-re (looking-at inlinetask-re))
-		 (org-inlinetask-goto-beginning))
-		;; Shift only non-empty lines.
-		((looking-at-p "^[ \t]*\\S-")
-		 (indent-line-to (+ (current-indentation) delta))))
-	       (forward-line -1)))))
-         (modify-item
-          (function
-	   ;; Replace ITEM first line elements with new elements from
-	   ;; STRUCT, if appropriate.
-	   (lambda (item)
-	     (goto-char item)
-	     (let* ((new-ind (org-list-get-ind item struct))
-		    (old-ind (current-indentation))
-		    (new-bul (org-list-bullet-string
-			      (org-list-get-bullet item struct)))
-		    (old-bul (org-list-get-bullet item old-struct))
-		    (new-box (org-list-get-checkbox item struct)))
-	       (looking-at org-list-full-item-re)
-	       ;; a.  Replace bullet
-	       (unless (equal old-bul new-bul)
-		 (replace-match new-bul nil nil nil 1))
-	       ;; b.  Replace checkbox.
-	       (cond
-		((equal (match-string 3) new-box))
-		((and (match-string 3) new-box)
-		 (replace-match new-box nil nil nil 3))
-		((match-string 3)
-		 (looking-at ".*?\\([ \t]*\\[[ X-]\\]\\)")
-		 (replace-match "" nil nil nil 1))
-		(t (let ((counterp (match-end 2)))
-		     (goto-char (if counterp (1+ counterp) (match-end 1)))
-		     (insert (concat new-box (unless counterp " "))))))
-	       ;; c.  Indent item to appropriate column.
-	       (unless (= new-ind old-ind)
-		 (delete-region (goto-char (point-at-bol))
-				(progn (skip-chars-forward " \t") (point)))
-		 (indent-to new-ind)))))))
+	  ;; Shift the indentation between END and BEG by DELTA.
+	  ;; Start from the line before END.
+	  (lambda (end beg delta)
+	    (goto-char end)
+	    (skip-chars-backward " \r\t\n")
+	    (beginning-of-line)
+	    (while (or (> (point) beg)
+		       (and (= (point) beg)
+			    (not (looking-at item-re))))
+	      (cond
+	       ;; Skip inline tasks.
+	       ((and inlinetask-re (looking-at inlinetask-re))
+		(org-inlinetask-goto-beginning))
+	       ;; Shift only non-empty lines.
+	       ((looking-at-p "^[ \t]*\\S-")
+		(indent-line-to (+ (current-indentation) delta))))
+	      (forward-line -1))))
+	 (modify-item
+	  ;; Replace ITEM first line elements with new elements from
+	  ;; STRUCT, if appropriate.
+	  (lambda (item)
+	    (goto-char item)
+	    (let* ((new-ind (org-list-get-ind item struct))
+		   (old-ind (current-indentation))
+		   (new-bul (org-list-bullet-string
+			     (org-list-get-bullet item struct)))
+		   (old-bul (org-list-get-bullet item old-struct))
+		   (new-box (org-list-get-checkbox item struct)))
+	      (looking-at org-list-full-item-re)
+	      ;; a.  Replace bullet
+	      (unless (equal old-bul new-bul)
+		(replace-match new-bul nil nil nil 1))
+	      ;; b.  Replace checkbox.
+	      (cond
+	       ((equal (match-string 3) new-box))
+	       ((and (match-string 3) new-box)
+		(replace-match new-box nil nil nil 3))
+	       ((match-string 3)
+		(looking-at ".*?\\([ \t]*\\[[ X-]\\]\\)")
+		(replace-match "" nil nil nil 1))
+	       (t (let ((counterp (match-end 2)))
+		    (goto-char (if counterp (1+ counterp) (match-end 1)))
+		    (insert (concat new-box (unless counterp " "))))))
+	      ;; c.  Indent item to appropriate column.
+	      (unless (= new-ind old-ind)
+		(delete-region (goto-char (point-at-bol))
+			       (progn (skip-chars-forward " \t") (point)))
+		(indent-to new-ind))))))
     ;; 1. First get list of items and position endings.  We maintain
     ;; 1. First get list of items and position endings.  We maintain
     ;;    two alists: ITM-SHIFT, determining indentation shift needed
     ;;    two alists: ITM-SHIFT, determining indentation shift needed
     ;;    at item, and END-LIST, a pseudo-alist where key is ending
     ;;    at item, and END-LIST, a pseudo-alist where key is ending

+ 10 - 12
lisp/org.el

@@ -15322,9 +15322,8 @@ used by the agenda files.  If ARCHIVE is `ifmode', do this only if
 			       files)))
 			       files)))
     (when org-agenda-skip-unavailable-files
     (when org-agenda-skip-unavailable-files
       (setq files (delq nil
       (setq files (delq nil
-			(mapcar (function
-				 (lambda (file)
-				   (and (file-readable-p file) file)))
+			(mapcar (lambda (file)
+				  (and (file-readable-p file) file))
 				files))))
 				files))))
     (when (or (eq archives t)
     (when (or (eq archives t)
 	      (and (eq archives 'ifmode) (eq org-agenda-archives-mode t)))
 	      (and (eq archives 'ifmode) (eq org-agenda-archives-mode t)))
@@ -17942,15 +17941,14 @@ when a numeric prefix argument is given, its value determines the
 number of stars to add."
 number of stars to add."
   (interactive "P")
   (interactive "P")
   (let ((skip-blanks
   (let ((skip-blanks
-	 (function
-	  ;; Return beginning of first non-blank line, starting from
-	  ;; line at POS.
-	  (lambda (pos)
-	    (save-excursion
-	      (goto-char pos)
-	      (while (org-at-comment-p) (forward-line))
-	      (skip-chars-forward " \r\t\n")
-	      (point-at-bol)))))
+	 ;; Return beginning of first non-blank line, starting from
+	 ;; line at POS.
+	 (lambda (pos)
+	   (save-excursion
+	     (goto-char pos)
+	     (while (org-at-comment-p) (forward-line))
+	     (skip-chars-forward " \r\t\n")
+	     (point-at-bol))))
 	beg end toggled)
 	beg end toggled)
     ;; Determine boundaries of changes.  If a universal prefix has
     ;; Determine boundaries of changes.  If a universal prefix has
     ;; been given, put the list in a region.  If region ends at a bol,
     ;; been given, put the list in a region.  If region ends at a bol,

+ 26 - 27
lisp/ox-ascii.el

@@ -1940,33 +1940,32 @@ CONTENTS is the row contents.  INFO is a plist used as
 a communication channel."
 a communication channel."
   (when (eq (org-element-property :type table-row) 'standard)
   (when (eq (org-element-property :type table-row) 'standard)
     (let ((build-hline
     (let ((build-hline
-	   (function
-	    (lambda (lcorner horiz vert rcorner)
-	      (concat
-	       (apply
-		'concat
-		(org-element-map table-row 'table-cell
-		  (lambda (cell)
-		    (let ((width (org-ascii--table-cell-width cell info))
-			  (borders (org-export-table-cell-borders cell info)))
-		      (concat
-		       ;; In order to know if CELL starts the row, do
-		       ;; not compare it with the first cell in the
-		       ;; row as there might be a special column.
-		       ;; Instead, compare it with first exportable
-		       ;; cell, obtained with `org-element-map'.
-		       (when (and (memq 'left borders)
-				  (eq (org-element-map table-row 'table-cell
-					'identity info t)
-				      cell))
-			 lcorner)
-		       (make-string (+ 2 width) (string-to-char horiz))
-		       (cond
-			((not (memq 'right borders)) nil)
-			((eq (car (last (org-element-contents table-row))) cell)
-			 rcorner)
-			(t vert)))))
-		  info)) "\n"))))
+	   (lambda (lcorner horiz vert rcorner)
+	     (concat
+	      (apply
+	       'concat
+	       (org-element-map table-row 'table-cell
+		 (lambda (cell)
+		   (let ((width (org-ascii--table-cell-width cell info))
+			 (borders (org-export-table-cell-borders cell info)))
+		     (concat
+		      ;; In order to know if CELL starts the row, do
+		      ;; not compare it with the first cell in the
+		      ;; row as there might be a special column.
+		      ;; Instead, compare it with first exportable
+		      ;; cell, obtained with `org-element-map'.
+		      (when (and (memq 'left borders)
+				 (eq (org-element-map table-row 'table-cell
+				       'identity info t)
+				     cell))
+			lcorner)
+		      (make-string (+ 2 width) (string-to-char horiz))
+		      (cond
+		       ((not (memq 'right borders)) nil)
+		       ((eq (car (last (org-element-contents table-row))) cell)
+			rcorner)
+		       (t vert)))))
+		 info)) "\n")))
 	  (utf8p (eq (plist-get info :ascii-charset) 'utf-8))
 	  (utf8p (eq (plist-get info :ascii-charset) 'utf-8))
 	  (borders (org-export-table-cell-borders
 	  (borders (org-export-table-cell-borders
 		    (org-element-map table-row 'table-cell 'identity info t)
 		    (org-element-map table-row 'table-cell 'identity info t)

+ 15 - 17
lisp/ox-beamer.el

@@ -379,12 +379,11 @@ used as a communication channel."
 	   :parent 'latex
 	   :parent 'latex
 	   :transcoders
 	   :transcoders
 	   (let ((protected-output
 	   (let ((protected-output
-		  (function
-		   (lambda (object contents info)
-		     (let ((code (org-export-with-backend
-				  'beamer object contents info)))
-		       (if (org-string-nw-p code) (concat "\\protect" code)
-			 code))))))
+		  (lambda (object contents info)
+		    (let ((code (org-export-with-backend
+				 'beamer object contents info)))
+		      (if (org-string-nw-p code) (concat "\\protect" code)
+			code)))))
 	     (mapcar #'(lambda (type) (cons type protected-output))
 	     (mapcar #'(lambda (type) (cons type protected-output))
 		     '(bold footnote-reference italic strike-through timestamp
 		     '(bold footnote-reference italic strike-through timestamp
 			    underline))))
 			    underline))))
@@ -812,17 +811,16 @@ holding export options."
      (org-latex-make-preamble info)
      (org-latex-make-preamble info)
      ;; Insert themes.
      ;; Insert themes.
      (let ((format-theme
      (let ((format-theme
-	    (function
-	     (lambda (prop command)
-	       (let ((theme (plist-get info prop)))
-		 (when theme
-		   (concat command
-			   (if (not (string-match "\\[.*\\]" theme))
-			       (format "{%s}\n" theme)
-			     (format "%s{%s}\n"
-				     (match-string 0 theme)
-				     (org-trim
-				      (replace-match "" nil nil theme)))))))))))
+	    (lambda (prop command)
+	      (let ((theme (plist-get info prop)))
+		(when theme
+		  (concat command
+			  (if (not (string-match "\\[.*\\]" theme))
+			      (format "{%s}\n" theme)
+			    (format "%s{%s}\n"
+				    (match-string 0 theme)
+				    (org-trim
+				     (replace-match "" nil nil theme))))))))))
        (mapconcat (lambda (args) (apply format-theme args))
        (mapconcat (lambda (args) (apply format-theme args))
 		  '((:beamer-theme "\\usetheme")
 		  '((:beamer-theme "\\usetheme")
 		    (:beamer-color-theme "\\usecolortheme")
 		    (:beamer-color-theme "\\usecolortheme")

+ 8 - 9
lisp/ox-odt.el

@@ -2467,15 +2467,14 @@ used as a communication channel."
 	 (outer (nth 2 frame-cfg))
 	 (outer (nth 2 frame-cfg))
 	 ;; User-specified frame params (from #+ATTR_ODT spec)
 	 ;; User-specified frame params (from #+ATTR_ODT spec)
 	 (user user-frame-params)
 	 (user user-frame-params)
-	 (--merge-frame-params (function
-				(lambda (default user)
-				  "Merge default and user frame params."
-				  (if (not user) default
-				    (cl-assert (= (length default) 3))
-				    (cl-assert (= (length user) 3))
-				    (cl-loop for u in user
-					     for d in default
-					     collect (or u d)))))))
+	 (--merge-frame-params (lambda (default user)
+				 "Merge default and user frame params."
+				 (if (not user) default
+				   (cl-assert (= (length default) 3))
+				   (cl-assert (= (length user) 3))
+				   (cl-loop for u in user
+					    for d in default
+					    collect (or u d))))))
     (cond
     (cond
      ;; Case 1: Image/Formula has no caption.
      ;; Case 1: Image/Formula has no caption.
      ;;         There is only one frame, one that surrounds the image
      ;;         There is only one frame, one that surrounds the image

+ 3 - 3
testing/org-batch-test-init.el

@@ -5,9 +5,9 @@
 ;; clean load-path
 ;; clean load-path
 (setq load-path
 (setq load-path
       (delq nil (mapcar
       (delq nil (mapcar
-		 (function (lambda (p)
-			     (unless (string-match "lisp\\(/packages\\)?/org$" p)
-			       p)))
+		 (lambda (p)
+		   (unless (string-match "lisp\\(/packages\\)?/org$" p)
+		     p))
 		 load-path)))
 		 load-path)))
 ;; remove property list to defeat cus-load and remove autoloads
 ;; remove property list to defeat cus-load and remove autoloads
 (mapatoms (function  (lambda (s)
 (mapatoms (function  (lambda (s)