emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6cbc253 1/4: Don't recommend quoting lambdas


From: Stefan Kangas
Subject: master 6cbc253 1/4: Don't recommend quoting lambdas
Date: Thu, 1 Oct 2020 09:28:26 -0400 (EDT)

branch: master
commit 6cbc253aa0580e2f242551500764bba9780e669d
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Don't recommend quoting lambdas
    
    * doc/misc/calc.texi (Symbolic Lisp Functions):
    * doc/misc/cl.texi (Obsolete Lexical Binding):
    * lisp/master.el:
    * lisp/progmodes/sql.el (sql-interactive-mode):
    * lisp/textmodes/flyspell.el (flyspell-mode):
    * lisp/textmodes/ispell.el (ispell-message):
    * lisp/textmodes/table.el: Doc fixes; don't recommend quoting
    lambdas.
---
 doc/misc/calc.texi         |  8 ++++----
 doc/misc/cl.texi           |  2 +-
 lisp/master.el             | 10 +++++-----
 lisp/progmodes/sql.el      |  6 +++---
 lisp/textmodes/flyspell.el |  2 +-
 lisp/textmodes/ispell.el   |  2 +-
 lisp/textmodes/table.el    |  8 ++++----
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 1dab29b..a356cec 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -34743,15 +34743,15 @@ is defined by
 
 @smallexample
 (put 'calcFunc-ln\' 'math-derivative-1
-     (function (lambda (u) (math-div 1 u))))
+     (lambda (u) (math-div 1 u)))
 @end smallexample
 
 The two-argument @code{log} function has two derivatives,
 @smallexample
 (put 'calcFunc-log\' 'math-derivative-2     ; d(log(x,b)) / dx
-     (function (lambda (x b) ... )))
+     (lambda (x b) ... ))
 (put 'calcFunc-log\'2 'math-derivative-2    ; d(log(x,b)) / db
-     (function (lambda (x b) ... )))
+     (lambda (x b) ... ))
 @end smallexample
 @end defun
 
@@ -34818,7 +34818,7 @@ as properties in a manner similar to derivatives:
 
 @smallexample
 (put 'calcFunc-ln 'math-inverse
-     (function (lambda (x) (list 'calcFunc-exp x))))
+     (lambda (x) (list 'calcFunc-exp x)))
 @end smallexample
 
 This function can call @samp{(math-solve-get-sign @var{x})} to create
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index b5f26e0..2b38544 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -4818,7 +4818,7 @@ For example:
 @example
 (defun make-adder (n)
   (lexical-let ((n n))
-    (function (lambda (m) (+ n m)))))
+    (lambda (m) (+ n m))))
 (setq add17 (make-adder 17))
 (funcall add17 4)
      @result{} 21
diff --git a/lisp/master.el b/lisp/master.el
index 387116a..32556a5 100644
--- a/lisp/master.el
+++ b/lisp/master.el
@@ -36,12 +36,12 @@
 ;; SQL buffer.
 ;;
 ;; (add-hook 'sql-mode-hook
-;;        (function (lambda ()
-;;                    (master-mode t)
-;;                    (master-set-slave sql-buffer))))
+;;            (lambda ()
+;;              (master-mode t)
+;;              (master-set-slave sql-buffer)))
 ;; (add-hook 'sql-set-sqli-hook
-;;        (function (lambda ()
-;;                    (master-set-slave sql-buffer))))
+;;            (lambda ()
+;;              (master-set-slave sql-buffer)))
 
 ;;; Thanks to all the people who helped me out:
 ;;
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index c31c5dd..7aa7d64 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4293,14 +4293,14 @@ Here is an example for your init file.  It keeps the 
SQLi buffer a
 certain length.
 
 \(add-hook \\='sql-interactive-mode-hook
-    (function (lambda ()
-        (setq comint-output-filter-functions #\\='comint-truncate-buffer))))
+    (lambda ()
+        (setq comint-output-filter-functions #\\='comint-truncate-buffer)))
 
 Here is another example.  It will always put point back to the statement
 you entered, right above the output it created.
 
 \(setq comint-output-filter-functions
-       (function (lambda (STR) (comint-show-output))))"
+       (lambda (STR) (comint-show-output)))"
   :syntax-table sql-mode-syntax-table
   ;; FIXME: The doc above uses `setq' on `comint-output-filter-functions',
   ;; whereas hooks should be manipulated with things like `add/remove-hook'.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index e862e35..65702d0 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -524,7 +524,7 @@ invoking `ispell-change-dictionary'.
 
 Consider using the `ispell-parser' to check your text.  For instance
 consider adding:
-\(add-hook \\='tex-mode-hook (function (lambda () (setq ispell-parser 
\\='tex))))
+\(add-hook \\='tex-mode-hook (lambda () (setq ispell-parser \\='tex)))
 in your init file.
 
 \\[flyspell-region] checks all words inside a region.
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index a99dfe4..05a4bd0 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3937,7 +3937,7 @@ in your init file:
 
 You can bind this to the key C-c i in GNUS or mail by adding to
 `news-reply-mode-hook' or `mail-mode-hook' the following lambda expression:
-   (function (lambda () (local-set-key \"\\C-ci\" \\='ispell-message)))"
+   (lambda () (local-set-key \"\\C-ci\" \\='ispell-message))"
   (interactive)
   (save-excursion
     (goto-char (point-min))
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index c7bf687..391e757 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -339,8 +339,8 @@
 ;; When using `table-cell-map-hook' do not use `local-set-key'.
 ;;
 ;;   (add-hook 'table-cell-map-hook
-;;     (function (lambda ()
-;;       (local-set-key [<key sequence>] '<function>))))
+;;     (lambda ()
+;;       (local-set-key [<key sequence>] '<function>)))
 ;;
 ;; Adding the above to your init file is a common way to customize a
 ;; mode specific keymap.  However it does not work for this package.
@@ -349,8 +349,8 @@
 ;; explicitly.  The correct way of achieving above task is:
 ;;
 ;;   (add-hook 'table-cell-map-hook
-;;     (function (lambda ()
-;;       (define-key table-cell-map [<key sequence>] '<function>))))
+;;     (lambda ()
+;;       (define-key table-cell-map [<key sequence>] '<function>)))
 ;;
 ;; -----
 ;; Menu:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]