Commit 14a570af authored by Mattias Engdegård's avatar Mattias Engdegård

Remove #' and function quoting from lambda forms in manual

* 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.
parent d5ec18c6
Pipeline #5316 passed with stage
in 55 minutes and 52 seconds
...@@ -370,9 +370,9 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}. ...@@ -370,9 +370,9 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
(funcall expand)))) (funcall expand))))
(add-hook 'foo-mode-hook (add-hook 'foo-mode-hook
#'(lambda () (lambda ()
(add-function :around (local 'abbrev-expand-function) (add-function :around (local 'abbrev-expand-function)
#'foo-mode-abbrev-expand-function))) #'foo-mode-abbrev-expand-function)))
@end smallexample @end smallexample
@node Standard Abbrev Tables @node Standard Abbrev Tables
......
...@@ -807,7 +807,7 @@ If you just want to automatically auto-revert every ...@@ -807,7 +807,7 @@ If you just want to automatically auto-revert every
@example @example
(setq-local buffer-stale-function (setq-local buffer-stale-function
#'(lambda (&optional noconfirm) 'fast)) (lambda (&optional noconfirm) 'fast))
@end example @end example
@noindent @noindent
......
...@@ -970,7 +970,7 @@ string. ...@@ -970,7 +970,7 @@ string.
@end group @end group
@group @group
(mapconcat (function (lambda (x) (format "%c" (1+ x)))) (mapconcat (lambda (x) (format "%c" (1+ x)))
"HAL-8000" "HAL-8000"
"") "")
@result{} "IBM.9111" @result{} "IBM.9111"
......
...@@ -175,49 +175,47 @@ All symbols that have PATTERN in their name are described ...@@ -175,49 +175,47 @@ All symbols that have PATTERN in their name are described
in the *Help* buffer." in the *Help* buffer."
(interactive "sDescribe symbols matching: ") (interactive "sDescribe symbols matching: ")
(let ((describe-func (let ((describe-func
(function (lambda (s)
(lambda (s)
@end group @end group
@group @group
;; @r{Print description of symbol.} ;; @r{Print description of symbol.}
(if (fboundp s) ; @r{It is a function.} (if (fboundp s) ; @r{It is a function.}
(princ (princ
(format "%s\t%s\n%s\n\n" s (format "%s\t%s\n%s\n\n" s
(if (commandp s) (if (commandp s)
(let ((keys (where-is-internal s))) (let ((keys (where-is-internal s)))
(if keys (if keys
(concat (concat
"Keys: " "Keys: "
(mapconcat 'key-description (mapconcat 'key-description
keys " ")) keys " "))
"Keys: none")) "Keys: none"))
"Function") "Function")
@end group @end group
@group @group
(or (documentation s) (or (documentation s)
"not documented")))) "not documented"))))
(if (boundp s) ; @r{It is a variable.} (if (boundp s) ; @r{It is a variable.}
@end group @end group
@group @group
(princ (princ
(format "%s\t%s\n%s\n\n" s (format "%s\t%s\n%s\n\n" s
(if (custom-variable-p s) (if (custom-variable-p s)
"Option " "Variable") "Option " "Variable")
@end group @end group
@group @group
(or (documentation-property (or (documentation-property
s 'variable-documentation) s 'variable-documentation)
"not documented"))))))) "not documented"))))))
sym-list) sym-list)
@end group @end group
@group @group
;; @r{Build a list of symbols that match pattern.} ;; @r{Build a list of symbols that match pattern.}
(mapatoms (function (mapatoms (lambda (sym)
(lambda (sym) (if (string-match pattern (symbol-name sym))
(if (string-match pattern (symbol-name sym)) (setq sym-list (cons sym sym-list)))))
(setq sym-list (cons sym sym-list))))))
@end group @end group
@group @group
......
...@@ -1572,14 +1572,14 @@ For example, here is how to examine the elements of the syntax table: ...@@ -1572,14 +1572,14 @@ For example, here is how to examine the elements of the syntax table:
@example @example
(let (accumulator) (let (accumulator)
(map-char-table (map-char-table
#'(lambda (key value) (lambda (key value)
(setq accumulator (setq accumulator
(cons (list (cons (list
(if (consp key) (if (consp key)
(list (car key) (cdr key)) (list (car key) (cdr key))
key) key)
value) value)
accumulator))) accumulator)))
(syntax-table)) (syntax-table))
accumulator) accumulator)
@result{} @result{}
......
...@@ -1118,9 +1118,9 @@ bidi-class}). ...@@ -1118,9 +1118,9 @@ bidi-class}).
;; 'bidi-class' Unicode property is R, AL, or RLO -- ;; 'bidi-class' Unicode property is R, AL, or RLO --
;; these have a right-to-left directionality. ;; these have a right-to-left directionality.
(map-char-table (map-char-table
#'(lambda (key val) (lambda (key val)
(if (memq val '(R AL RLO)) (if (memq val '(R AL RLO))
(modify-category-entry key ?R category-table))) (modify-category-entry key ?R category-table)))
uniprop-table) uniprop-table)
category-table)) category-table))
@end example @end example
......
...@@ -2073,11 +2073,10 @@ its @code{sort-subr} call looks like this: ...@@ -2073,11 +2073,10 @@ its @code{sort-subr} call looks like this:
@example @example
@group @group
(sort-subr reverse (sort-subr reverse
(function (lambda ()
(lambda () (while (and (not (eobp))
(while (and (not (eobp)) (looking-at paragraph-separate))
(looking-at paragraph-separate)) (forward-line 1)))
(forward-line 1))))
'forward-paragraph) 'forward-paragraph)
@end group @end group
@end example @end example
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment