]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't recommend quoting lambdas
authorStefan Kangas <stefan@marxist.se>
Wed, 30 Sep 2020 14:02:22 +0000 (16:02 +0200)
committerStefan Kangas <stefan@marxist.se>
Thu, 1 Oct 2020 13:28:14 +0000 (15:28 +0200)
* 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
doc/misc/cl.texi
lisp/master.el
lisp/progmodes/sql.el
lisp/textmodes/flyspell.el
lisp/textmodes/ispell.el
lisp/textmodes/table.el

index 1dab29b8a5af5c72321ae300ef3a97fbff2e1f54..a356cecf2b77b554cae3ccbe960ed707525189ec 100644 (file)
@@ -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
index b5f26e004b07b297122628c13b14e2b507f921f5..2b38544dc87d24635895e734e6c3454795fa85a4 100644 (file)
@@ -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
index 387116a8fbdc312bf8616189a0bd6c524493c8f3..32556a535f31561fa669995e94daf56c190bcadb 100644 (file)
 ;; 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:
 ;;
index c31c5ddd87ea0926098199ff97d05fc0e10f3bc6..7aa7d6410ea27f8bd15f05a8393ab5385c48c5fc 100644 (file)
@@ -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'.
index e862e354b5c852ae58e36f6849cd8724b77afa9f..65702d081f10f82049a44769ecf2f0f3a528619e 100644 (file)
@@ -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.
index a99dfe4067049d46667f4768ed560987a7857ac8..05a4bd058c441c9a6eb70ec59dfaa18880e00f4a 100644 (file)
@@ -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))
index c7bf687a9e13e20ac1920541196b3095a709e5c5..391e7570b5f60a67a65e50098beaa26ba12ecf7c 100644 (file)
 ;; 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.
 ;; 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: