Merge from origin/emacs-26
b94d767
(origin/emacs-26) Minor copyedits in last manual change73508e6
Improve documentation of face numbersbf235ce
* doc/emacs/custom.texi (Authentication): Refer to the "Help ...ceccb3c
New node Authentication in the Emacs manual9078f34
Fix a loop in c-fl-decl-start. This fixes bug #34186.a177fe7
Fix LaTeX output of month and day from cal-tex.el90177d7
Avoid elisp crash for OpenPGP User IDs with no e-mail address68e55a0
image-mode: Do not use default scaling (bug#33990)b6c762a
create-image: Expand documentation (bug#33990)928d342
Improve documentation of 'isearch-filter-predicate'9034dd6
Fix cursor column positioning on Grep hits # Conflicts: # doc/emacs/custom.texi
This commit is contained in:
commit
08bc407a22
10 changed files with 86 additions and 19 deletions
|
@ -32,6 +32,8 @@ Reference Manual}.
|
|||
By changing them, you can redefine keys.
|
||||
* Init File:: How to write common customizations in the
|
||||
initialization file.
|
||||
* Authentication:: Keeping persistent authentication information.
|
||||
|
||||
@end menu
|
||||
|
||||
@node Easy Customization
|
||||
|
@ -2639,3 +2641,40 @@ provided by the Emacs startup, such as @code{window-setup-hook} or
|
|||
|
||||
For more information on the early init file, @pxref{Init File,,,
|
||||
elisp, The Emacs Lisp Reference Manual}.
|
||||
|
||||
@node Authentication
|
||||
@section Keeping Persistent Authentication Information
|
||||
|
||||
Some Emacs packages, which connect to other services, require
|
||||
authentication (@pxref{Passwords}), e.g., see @ref{Top, Gnus,, gnus, The
|
||||
Gnus Manual}, or @ref{Top, Tramp,, tramp, The Tramp Manual}. Because
|
||||
it might be annoying to provide the same user name and password again
|
||||
and again, Emacs offers to keep this information persistent via the
|
||||
@file{auth-source} library.
|
||||
|
||||
@cindex @file{~/.authinfo} file
|
||||
@cindex @file{~/.authinfo.gpg} file
|
||||
@cindex ~/.netrc file
|
||||
By default, the authentication information is taken from the file
|
||||
@file{~/.authinfo} or @file{~/.authinfo.gpg} or @file{~/.netrc}.
|
||||
These files have a syntax similar to netrc files as known from the
|
||||
@command{ftp} program, like this:
|
||||
|
||||
@example
|
||||
machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport}
|
||||
@end example
|
||||
|
||||
Similarly, the @file{auth-source} library supports multiple storage
|
||||
backend, currently either the classic netrc backend, JSON files, the
|
||||
Secret Service API, and pass, the standard unix password manager.
|
||||
|
||||
@vindex auth-sources
|
||||
All these alternatives can be customized via the user option
|
||||
@code{auth-sources}, see @ref{Help for users, Emacs auth-source,,
|
||||
auth, Emacs auth-source}.
|
||||
|
||||
@vindex auth-source-save-behavior
|
||||
When a password is entered interactively, which is not found via the
|
||||
configured backend, some of the backends offer to save it
|
||||
persistently. This can be changed by customizing the user option
|
||||
@code{auth-source-save-behavior}.
|
||||
|
|
|
@ -1114,6 +1114,7 @@ Customization
|
|||
By changing them, you can redefine keys.
|
||||
* Init File:: How to write common customizations in the
|
||||
initialization file.
|
||||
* Authentication:: Keeping persistent authentication information.
|
||||
|
||||
Easy Customization Interface
|
||||
|
||||
|
|
|
@ -3079,10 +3079,17 @@ value, which inherits from @var{face}'s global definition.
|
|||
This function returns a list of all defined face names.
|
||||
@end defun
|
||||
|
||||
@cindex face number
|
||||
@cindex face property of face symbols
|
||||
@defun face-id face
|
||||
This function returns the @dfn{face number} of face @var{face}. This
|
||||
is a number that uniquely identifies a face at low levels within
|
||||
Emacs. It is seldom necessary to refer to a face by its face number.
|
||||
However, functions that manipulate glyphs, such as
|
||||
@code{make-glyph-code} and @code{glyph-face} (@pxref{Glyphs}) access
|
||||
the face numbers internally. Note that the face number is stored as
|
||||
the value of the @code{face} property of the face symbol, so we
|
||||
recommend not to set that property of a face to any value of your own.
|
||||
@end defun
|
||||
|
||||
@defun face-documentation face
|
||||
|
|
|
@ -925,7 +925,7 @@ argument EVENT specifies a different buffer position."
|
|||
(cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date)))
|
||||
(insert ", ")
|
||||
(cal-tex-large-bf (cal-tex-month-name month))
|
||||
(insert " ")
|
||||
(insert "\\ ")
|
||||
(cal-tex-large-bf (number-to-string day))
|
||||
(unless (string-equal "" (setq s (cal-tex-latexify-list
|
||||
holidays date "; ")))
|
||||
|
@ -976,7 +976,7 @@ shown are hard-coded to 8-12, 13-17."
|
|||
(cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date)))
|
||||
(insert ", ")
|
||||
(cal-tex-large-bf (cal-tex-month-name month))
|
||||
(insert " ")
|
||||
(insert "\\ ")
|
||||
(cal-tex-large-bf (number-to-string day))
|
||||
(unless (string-equal "" (setq s (cal-tex-latexify-list
|
||||
holidays date "; ")))
|
||||
|
|
|
@ -659,6 +659,8 @@ The passphrase is read and cached."
|
|||
(catch 'break
|
||||
(dolist (uid uids nil)
|
||||
(if (and (stringp (epg-user-id-string uid))
|
||||
(car (mail-header-parse-address
|
||||
(epg-user-id-string uid)))
|
||||
(equal (downcase (car (mail-header-parse-address
|
||||
(epg-user-id-string uid))))
|
||||
(downcase (car (mail-header-parse-address
|
||||
|
|
|
@ -741,9 +741,11 @@ was inserted."
|
|||
(type (if (image--imagemagick-wanted-p filename)
|
||||
'imagemagick
|
||||
(image-type file-or-data nil data-p)))
|
||||
;; :scale 1: If we do not set this, create-image will apply
|
||||
;; default scaling based on font size.
|
||||
(image (if (not edges)
|
||||
(create-image file-or-data type data-p)
|
||||
(create-image file-or-data type data-p
|
||||
(create-image file-or-data type data-p :scale 1)
|
||||
(create-image file-or-data type data-p :scale 1
|
||||
:max-width (- (nth 2 edges) (nth 0 edges))
|
||||
:max-height (- (nth 3 edges) (nth 1 edges)))))
|
||||
(inhibit-read-only t)
|
||||
|
|
|
@ -415,13 +415,20 @@ must be available."
|
|||
(defun create-image (file-or-data &optional type data-p &rest props)
|
||||
"Create an image.
|
||||
FILE-OR-DATA is an image file name or image data.
|
||||
|
||||
Optional TYPE is a symbol describing the image type. If TYPE is omitted
|
||||
or nil, try to determine the image type from its first few bytes
|
||||
of image data. If that doesn't work, and FILE-OR-DATA is a file name,
|
||||
use its file extension as image type.
|
||||
|
||||
Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data.
|
||||
|
||||
Optional PROPS are additional image attributes to assign to the image,
|
||||
like, e.g. `:mask MASK'.
|
||||
like, e.g. `:mask MASK'. If the property `:scale' is not given and the
|
||||
display has a high resolution (more exactly, when the average width of a
|
||||
character in the default font is more than 10 pixels), the image is
|
||||
automatically scaled up in proportion to the default font.
|
||||
|
||||
Value is the image created, or nil if images of type TYPE are not supported.
|
||||
|
||||
Images should not be larger than specified by `max-image-size'.
|
||||
|
|
|
@ -199,11 +199,14 @@ or to the end of the buffer for a backward search.")
|
|||
to the search status stack.")
|
||||
|
||||
(defvar isearch-filter-predicate #'isearch-filter-visible
|
||||
"Predicate that filters the search hits that would normally be available.
|
||||
Search hits that dissatisfy the predicate are skipped. The function
|
||||
has two arguments: the positions of start and end of text matched by
|
||||
the search. If this function returns nil, continue searching without
|
||||
stopping at this match.
|
||||
"Predicate to filter hits of Isearch and replace commands.
|
||||
Isearch hits that don't satisfy the predicate will be skipped.
|
||||
The value should be a function of two arguments; it will be
|
||||
called with the the positions of the start and the end of the
|
||||
text matched by Isearch and replace commands. If this function
|
||||
returns nil, Isearch and replace commands will continue searching
|
||||
without stopping at resp. replacing this match.
|
||||
|
||||
If you use `add-function' to modify this variable, you can use the
|
||||
`isearch-message-prefix' advice property to specify the prefix string
|
||||
displayed in the search message.")
|
||||
|
@ -3509,10 +3512,13 @@ Optional third argument, if t, means if fail just return nil (no error).
|
|||
(setq isearch-hidden t)))))))
|
||||
|
||||
(defun isearch-filter-visible (beg end)
|
||||
"Test whether the current search hit is visible at least partially.
|
||||
Return non-nil if the text from BEG to END is visible to Isearch as
|
||||
determined by `isearch-range-invisible' unless invisible text can be
|
||||
searched too when `search-invisible' is t."
|
||||
"Return non-nil if text between BEG and END is deemed visible by Isearch.
|
||||
This function is intended to be used as `isearch-filter-predicate'.
|
||||
It returns non-nil if the text between BEG and END is visible to
|
||||
Isearch, at least partially, as determined by `isearch-range-invisible'.
|
||||
If `search-invisible' is t, which allows Isearch matches inside
|
||||
invisible text, this function will always return non-nil, regardless
|
||||
of what `isearch-range-invisible' says."
|
||||
(or (eq search-invisible t)
|
||||
(not (isearch-range-invisible beg end))))
|
||||
|
||||
|
|
|
@ -1779,6 +1779,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
|
|||
;; lock context (etc.) fontification.
|
||||
(goto-char pos)
|
||||
(let ((lit-start (c-literal-start))
|
||||
old-pos
|
||||
(new-pos pos)
|
||||
capture-opener
|
||||
bod-lim bo-decl)
|
||||
|
@ -1801,12 +1802,14 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
|
|||
(while
|
||||
;; Go to a less nested declaration each time round this loop.
|
||||
(and
|
||||
(setq old-pos (point))
|
||||
(c-syntactic-skip-backward "^;{}" bod-lim t)
|
||||
(> (point) bod-lim)
|
||||
(progn (c-forward-syntactic-ws)
|
||||
;; Have we got stuck in a comment at EOB?
|
||||
(not (and (eobp)
|
||||
(c-literal-start))))
|
||||
(< (point) old-pos)
|
||||
(progn (setq bo-decl (point))
|
||||
(or (not (looking-at c-protection-key))
|
||||
(c-forward-keyword-clause 1)))
|
||||
|
|
|
@ -361,6 +361,9 @@ A grep buffer becomes most recent when you select Grep mode in it.
|
|||
Notice that using \\[next-error] or \\[compile-goto-error] modifies
|
||||
`compilation-last-buffer' rather than `grep-last-buffer'.")
|
||||
|
||||
(defvar grep-match-face 'match
|
||||
"Face name to use for grep matches.")
|
||||
|
||||
;;;###autoload
|
||||
(defconst grep-regexp-alist
|
||||
`((,(concat "^\\(?:"
|
||||
|
@ -384,7 +387,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
|
|||
(when grep-highlight-matches
|
||||
(let* ((beg (match-end 0))
|
||||
(end (save-excursion (goto-char beg) (line-end-position)))
|
||||
(mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)))
|
||||
(mbeg (text-property-any beg end 'font-lock-face grep-match-face)))
|
||||
(when mbeg
|
||||
(- mbeg beg)))))
|
||||
.
|
||||
|
@ -392,7 +395,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
|
|||
(when grep-highlight-matches
|
||||
(let* ((beg (match-end 0))
|
||||
(end (save-excursion (goto-char beg) (line-end-position)))
|
||||
(mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))
|
||||
(mbeg (text-property-any beg end 'font-lock-face grep-match-face))
|
||||
(mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end))))
|
||||
(when mend
|
||||
(- mend beg))))))
|
||||
|
@ -416,9 +419,6 @@ See `compilation-error-regexp-alist' for format details.")
|
|||
(defvar grep-error-face 'compilation-error
|
||||
"Face name to use for grep error messages.")
|
||||
|
||||
(defvar grep-match-face 'match
|
||||
"Face name to use for grep matches.")
|
||||
|
||||
(defvar grep-context-face 'shadow
|
||||
"Face name to use for grep context lines.")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue