diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-11-17 18:42:38 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-11-17 18:42:38 +0100 |
commit | 43ad3c175d2e289f42be861eac5da807d6b1e088 (patch) | |
tree | 5aef5ba62e4867c663be475aa4f96c3939025ca8 /lisp/textmodes/table.el | |
parent | 68e57e0046328aa47ffad721718749b0991f6591 (diff) | |
download | emacs-43ad3c175d2e289f42be861eac5da807d6b1e088.tar.gz emacs-43ad3c175d2e289f42be861eac5da807d6b1e088.tar.bz2 emacs-43ad3c175d2e289f42be861eac5da807d6b1e088.zip |
Remove redundant 'function's around lambdas
* lisp/allout.el (allout-latex-verb-quote):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/ffap.el (ffap-all-subdirs-loop)
(ffap-kpathsea-expand-path, ffap-menu-rescan):
* lisp/files.el (save-buffers-kill-emacs):
* lisp/find-lisp.el (find-lisp-find-dired-internal)
(find-lisp-insert-directory):
* lisp/gnus/gnus-agent.el (gnus-agent-expire-unagentized-dirs):
* lisp/gnus/nnmairix.el (nnmairix-create-message-line-for-search)
(nnmairix-widget-get-values)
(nnmairix-widget-make-query-from-widgets)
(nnmairix-widget-build-editable-fields):
* lisp/international/mule-cmds.el (sort-coding-systems):
* lisp/international/mule-diag.el (list-character-sets-1):
* lisp/international/quail.el (quail-insert-decode-map):
* lisp/mail/reporter.el (reporter-dump-state):
* lisp/mail/supercite.el (sc-attribs-filter-namelist):
* lisp/pcmpl-gnu.el (pcmpl-gnu-zipped-files)
(pcmpl-gnu-bzipped-files):
* lisp/progmodes/cperl-mode.el (cperl-find-tags)
(cperl-write-tags, cperl-tags-hier-init, cperl-tags-treeify)
(cperl-menu-to-keymap, cperl-pod-spell):
* lisp/progmodes/gdb-mi.el (gdb-parent-mode):
* lisp/progmodes/make-mode.el (makefile-browser-fill):
* lisp/simple.el (transpose-lines):
* lisp/term.el:
* lisp/term/w32-win.el (w32-find-non-USB-fonts):
* lisp/textmodes/table.el (table--generate-source-scan-lines): Remove
redundant 'function's around lambdas.
Diffstat (limited to 'lisp/textmodes/table.el')
-rw-r--r-- | lisp/textmodes/table.el | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 25aa58046f4..065fdd09ccb 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -3270,34 +3270,33 @@ Currently this method is for LaTeX only." (let* ((span 1) ;; spanning length (first-p t) ;; first in a row (insert-column ;; a function that processes one column/multicolumn - (function - (lambda (from to) - (let ((line (table--buffer-substring-and-trim - (table--goto-coordinate (cons from y)) - (table--goto-coordinate (cons to y))))) - ;; escape special characters - (with-temp-buffer - (insert line) - (goto-char (point-min)) - (while (re-search-forward "\\([#$~_^%{}&]\\)\\|\\(\\\\\\)\\|\\([<>|]\\)" nil t) - (if (match-beginning 1) - (save-excursion - (goto-char (match-beginning 1)) - (insert "\\")) - (if (match-beginning 2) - (replace-match "$\\backslash$" t t) - (replace-match (concat "$" (match-string 3) "$")) t t))) - (setq line (buffer-substring (point-min) (point-max)))) - ;; insert a column separator and column/multicolumn contents - (with-current-buffer dest-buffer - (unless first-p - (insert (if (eq (char-before) ?\s) "" " ") "& ")) - (if (> span 1) - (insert (format "\\multicolumn{%d}{%sl|}{%s}" span (if first-p "|" "") line)) - (insert line))) - (setq first-p nil) - (setq span 1) - (setq start (nth i col-list))))))) + (lambda (from to) + (let ((line (table--buffer-substring-and-trim + (table--goto-coordinate (cons from y)) + (table--goto-coordinate (cons to y))))) + ;; escape special characters + (with-temp-buffer + (insert line) + (goto-char (point-min)) + (while (re-search-forward "\\([#$~_^%{}&]\\)\\|\\(\\\\\\)\\|\\([<>|]\\)" nil t) + (if (match-beginning 1) + (save-excursion + (goto-char (match-beginning 1)) + (insert "\\")) + (if (match-beginning 2) + (replace-match "$\\backslash$" t t) + (replace-match (concat "$" (match-string 3) "$")) t t))) + (setq line (buffer-substring (point-min) (point-max)))) + ;; insert a column separator and column/multicolumn contents + (with-current-buffer dest-buffer + (unless first-p + (insert (if (eq (char-before) ?\s) "" " ") "& ")) + (if (> span 1) + (insert (format "\\multicolumn{%d}{%sl|}{%s}" span (if first-p "|" "") line)) + (insert line))) + (setq first-p nil) + (setq span 1) + (setq start (nth i col-list)))))) (setq start x0) (setq i 1) (while (setq c (nth i border-char-list)) |