]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove #' and function quoting from lambda forms in manual
authorMattias Engdegård <mattiase@acm.org>
Sun, 19 Apr 2020 10:40:43 +0000 (12:40 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 19 Apr 2020 11:19:37 +0000 (13:19 +0200)
* doc/lispref/abbrevs.texi (Abbrev Expansion):
* doc/lispref/backups.texi (Reverting):
* doc/lispref/functions.texi (Mapping Functions):
* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/sequences.texi (Char-Tables):
* doc/lispref/syntax.texi (Categories):
* doc/lispref/text.texi (Sorting):
Remove function quoting from lambda in examples where it still occurs,
since examples should follow our best style and be consistent.

doc/lispref/abbrevs.texi
doc/lispref/backups.texi
doc/lispref/functions.texi
doc/lispref/help.texi
doc/lispref/sequences.texi
doc/lispref/syntax.texi
doc/lispref/text.texi

index 6689b560c78cc204e2241c322bfb6d617e2901ec..575be187d3f6f284cf17420702c93377f6083c15 100644 (file)
@@ -370,9 +370,9 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
       (funcall expand))))
 
 (add-hook 'foo-mode-hook
-          #'(lambda ()
-              (add-function :around (local 'abbrev-expand-function)
-                            #'foo-mode-abbrev-expand-function)))
+          (lambda ()
+            (add-function :around (local 'abbrev-expand-function)
+                          #'foo-mode-abbrev-expand-function)))
 @end smallexample
 
 @node Standard Abbrev Tables
index b7318a99b8fe6de24bdf872eab95c9b6ec1915d5..4ed1a10fcf6a40e83c4090b00438f207e50ee92d 100644 (file)
@@ -807,7 +807,7 @@ If you just want to automatically auto-revert every
 
 @example
 (setq-local buffer-stale-function
-     #'(lambda (&optional noconfirm) 'fast))
+     (lambda (&optional noconfirm) 'fast))
 @end example
 
 @noindent
index f31bacaed743a9040a9fed4cd9a323bfd84e688d..bc8ec0ef1b07685f52364d098170b22c57ed886e 100644 (file)
@@ -970,7 +970,7 @@ string.
 @end group
 
 @group
-(mapconcat (function (lambda (x) (format "%c" (1+ x))))
+(mapconcat (lambda (x) (format "%c" (1+ x)))
            "HAL-8000"
            "")
      @result{} "IBM.9111"
index eea1fd2e8f160c3da9661b12520d46a49ed03b28..9b3c4fcb23d13eeeed293eddb7bf794e33d7018c 100644 (file)
@@ -175,49 +175,47 @@ All symbols that have PATTERN in their name are described
 in the *Help* buffer."
   (interactive "sDescribe symbols matching: ")
   (let ((describe-func
-         (function
-          (lambda (s)
+         (lambda (s)
 @end group
 @group
-            ;; @r{Print description of symbol.}
-            (if (fboundp s)             ; @r{It is a function.}
-                (princ
-                 (format "%s\t%s\n%s\n\n" s
-                   (if (commandp s)
-                       (let ((keys (where-is-internal s)))
-                         (if keys
-                             (concat
-                              "Keys: "
-                              (mapconcat 'key-description
-                                         keys " "))
-                           "Keys: none"))
-                     "Function")
+           ;; @r{Print description of symbol.}
+           (if (fboundp s)             ; @r{It is a function.}
+               (princ
+                (format "%s\t%s\n%s\n\n" s
+                  (if (commandp s)
+                      (let ((keys (where-is-internal s)))
+                        (if keys
+                            (concat
+                             "Keys: "
+                             (mapconcat 'key-description
+                                        keys " "))
+                          "Keys: none"))
+                    "Function")
 @end group
 @group
-                   (or (documentation s)
-                       "not documented"))))
+                  (or (documentation s)
+                      "not documented"))))
 
-            (if (boundp s)              ; @r{It is a variable.}
+           (if (boundp s)              ; @r{It is a variable.}
 @end group
 @group
-                (princ
-                 (format "%s\t%s\n%s\n\n" s
-                   (if (custom-variable-p s)
-                       "Option " "Variable")
+               (princ
+                (format "%s\t%s\n%s\n\n" s
+                  (if (custom-variable-p s)
+                      "Option " "Variable")
 @end group
 @group
-                   (or (documentation-property
-                         s 'variable-documentation)
-                       "not documented")))))))
+                  (or (documentation-property
+                        s 'variable-documentation)
+                      "not documented"))))))
         sym-list)
 @end group
 
 @group
     ;; @r{Build a list of symbols that match pattern.}
-    (mapatoms (function
-               (lambda (sym)
-                 (if (string-match pattern (symbol-name sym))
-                     (setq sym-list (cons sym sym-list))))))
+    (mapatoms (lambda (sym)
+                (if (string-match pattern (symbol-name sym))
+                    (setq sym-list (cons sym sym-list)))))
 @end group
 
 @group
index f6faf9448c2128425a4967c7b34249490c5587c2..7a3f26e584f1fca024af01f8a4af2e632aa4fac6 100644 (file)
@@ -1572,14 +1572,14 @@ For example, here is how to examine the elements of the syntax table:
 @example
 (let (accumulator)
    (map-char-table
-    #'(lambda (key value)
-        (setq accumulator
-              (cons (list
-                     (if (consp key)
-                         (list (car key) (cdr key))
-                       key)
-                     value)
-                    accumulator)))
+    (lambda (key value)
+      (setq accumulator
+            (cons (list
+                   (if (consp key)
+                       (list (car key) (cdr key))
+                     key)
+                   value)
+                  accumulator)))
     (syntax-table))
    accumulator)
 @result{}
index ad45a8edaff7a2857cc048405e262eb4df84a3b9..9eb99a0ac925a238e30324eba44e878daa942b6a 100644 (file)
@@ -1118,9 +1118,9 @@ bidi-class}).
     ;; 'bidi-class' Unicode property is R, AL, or RLO --
     ;; these have a right-to-left directionality.
     (map-char-table
-     #'(lambda (key val)
-         (if (memq val '(R AL RLO))
-             (modify-category-entry key ?R category-table)))
+     (lambda (key val)
+       (if (memq val '(R AL RLO))
+           (modify-category-entry key ?R category-table)))
      uniprop-table)
     category-table))
 @end example
index fe3d48b3ff5b16afe1982dfe5d6685fe7c077988..58424a4231ba7372d0c1498d9d3dcffdee9c4943 100644 (file)
@@ -2073,11 +2073,10 @@ its @code{sort-subr} call looks like this:
 @example
 @group
 (sort-subr reverse
-           (function
-            (lambda ()
-              (while (and (not (eobp))
-                          (looking-at paragraph-separate))
-                (forward-line 1))))
+           (lambda ()
+             (while (and (not (eobp))
+                         (looking-at paragraph-separate))
+               (forward-line 1)))
            'forward-paragraph)
 @end group
 @end example