diff options
| author | Glenn Morris | 2019-01-30 09:12:15 -0800 |
|---|---|---|
| committer | Glenn Morris | 2019-01-30 09:12:15 -0800 |
| commit | 08bc407a228796b64e321cb28b38b39062ab1732 (patch) | |
| tree | 8e390c58a811f64a4f44c7f0e6934b3255155af2 | |
| parent | 49e253a0f803b497ee3177c1c346d4e0ac70fdae (diff) | |
| parent | b94d76752776cca4d1652cfe715a60f4a36f14a3 (diff) | |
| download | emacs-08bc407a228796b64e321cb28b38b39062ab1732.tar.gz emacs-08bc407a228796b64e321cb28b38b39062ab1732.zip | |
Merge from origin/emacs-26
b94d767 (origin/emacs-26) Minor copyedits in last manual change
73508e6 Improve documentation of face numbers
bf235ce * doc/emacs/custom.texi (Authentication): Refer to the "Help ...
ceccb3c New node Authentication in the Emacs manual
9078f34 Fix a loop in c-fl-decl-start. This fixes bug #34186.
a177fe7 Fix LaTeX output of month and day from cal-tex.el
90177d7 Avoid elisp crash for OpenPGP User IDs with no e-mail address
68e55a0 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
| -rw-r--r-- | doc/emacs/custom.texi | 39 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 7 | ||||
| -rw-r--r-- | lisp/calendar/cal-tex.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/mml-sec.el | 2 | ||||
| -rw-r--r-- | lisp/image-mode.el | 6 | ||||
| -rw-r--r-- | lisp/image.el | 9 | ||||
| -rw-r--r-- | lisp/isearch.el | 24 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 10 |
10 files changed, 86 insertions, 19 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 618692e479f..474149fcae6 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -32,6 +32,8 @@ Reference Manual}. | |||
| 32 | By changing them, you can redefine keys. | 32 | By changing them, you can redefine keys. |
| 33 | * Init File:: How to write common customizations in the | 33 | * Init File:: How to write common customizations in the |
| 34 | initialization file. | 34 | initialization file. |
| 35 | * Authentication:: Keeping persistent authentication information. | ||
| 36 | |||
| 35 | @end menu | 37 | @end menu |
| 36 | 38 | ||
| 37 | @node Easy Customization | 39 | @node Easy Customization |
| @@ -2639,3 +2641,40 @@ provided by the Emacs startup, such as @code{window-setup-hook} or | |||
| 2639 | 2641 | ||
| 2640 | For more information on the early init file, @pxref{Init File,,, | 2642 | For more information on the early init file, @pxref{Init File,,, |
| 2641 | elisp, The Emacs Lisp Reference Manual}. | 2643 | elisp, The Emacs Lisp Reference Manual}. |
| 2644 | |||
| 2645 | @node Authentication | ||
| 2646 | @section Keeping Persistent Authentication Information | ||
| 2647 | |||
| 2648 | Some Emacs packages, which connect to other services, require | ||
| 2649 | authentication (@pxref{Passwords}), e.g., see @ref{Top, Gnus,, gnus, The | ||
| 2650 | Gnus Manual}, or @ref{Top, Tramp,, tramp, The Tramp Manual}. Because | ||
| 2651 | it might be annoying to provide the same user name and password again | ||
| 2652 | and again, Emacs offers to keep this information persistent via the | ||
| 2653 | @file{auth-source} library. | ||
| 2654 | |||
| 2655 | @cindex @file{~/.authinfo} file | ||
| 2656 | @cindex @file{~/.authinfo.gpg} file | ||
| 2657 | @cindex ~/.netrc file | ||
| 2658 | By default, the authentication information is taken from the file | ||
| 2659 | @file{~/.authinfo} or @file{~/.authinfo.gpg} or @file{~/.netrc}. | ||
| 2660 | These files have a syntax similar to netrc files as known from the | ||
| 2661 | @command{ftp} program, like this: | ||
| 2662 | |||
| 2663 | @example | ||
| 2664 | machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport} | ||
| 2665 | @end example | ||
| 2666 | |||
| 2667 | Similarly, the @file{auth-source} library supports multiple storage | ||
| 2668 | backend, currently either the classic netrc backend, JSON files, the | ||
| 2669 | Secret Service API, and pass, the standard unix password manager. | ||
| 2670 | |||
| 2671 | @vindex auth-sources | ||
| 2672 | All these alternatives can be customized via the user option | ||
| 2673 | @code{auth-sources}, see @ref{Help for users, Emacs auth-source,, | ||
| 2674 | auth, Emacs auth-source}. | ||
| 2675 | |||
| 2676 | @vindex auth-source-save-behavior | ||
| 2677 | When a password is entered interactively, which is not found via the | ||
| 2678 | configured backend, some of the backends offer to save it | ||
| 2679 | persistently. This can be changed by customizing the user option | ||
| 2680 | @code{auth-source-save-behavior}. | ||
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 54c20251ef7..950ddc01123 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -1114,6 +1114,7 @@ Customization | |||
| 1114 | By changing them, you can redefine keys. | 1114 | By changing them, you can redefine keys. |
| 1115 | * Init File:: How to write common customizations in the | 1115 | * Init File:: How to write common customizations in the |
| 1116 | initialization file. | 1116 | initialization file. |
| 1117 | * Authentication:: Keeping persistent authentication information. | ||
| 1117 | 1118 | ||
| 1118 | Easy Customization Interface | 1119 | Easy Customization Interface |
| 1119 | 1120 | ||
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 350b3108715..95379b342b3 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3079,10 +3079,17 @@ value, which inherits from @var{face}'s global definition. | |||
| 3079 | This function returns a list of all defined face names. | 3079 | This function returns a list of all defined face names. |
| 3080 | @end defun | 3080 | @end defun |
| 3081 | 3081 | ||
| 3082 | @cindex face number | ||
| 3083 | @cindex face property of face symbols | ||
| 3082 | @defun face-id face | 3084 | @defun face-id face |
| 3083 | This function returns the @dfn{face number} of face @var{face}. This | 3085 | This function returns the @dfn{face number} of face @var{face}. This |
| 3084 | is a number that uniquely identifies a face at low levels within | 3086 | is a number that uniquely identifies a face at low levels within |
| 3085 | Emacs. It is seldom necessary to refer to a face by its face number. | 3087 | Emacs. It is seldom necessary to refer to a face by its face number. |
| 3088 | However, functions that manipulate glyphs, such as | ||
| 3089 | @code{make-glyph-code} and @code{glyph-face} (@pxref{Glyphs}) access | ||
| 3090 | the face numbers internally. Note that the face number is stored as | ||
| 3091 | the value of the @code{face} property of the face symbol, so we | ||
| 3092 | recommend not to set that property of a face to any value of your own. | ||
| 3086 | @end defun | 3093 | @end defun |
| 3087 | 3094 | ||
| 3088 | @defun face-documentation face | 3095 | @defun face-documentation face |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 01793c27687..78ab0765952 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -925,7 +925,7 @@ argument EVENT specifies a different buffer position." | |||
| 925 | (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) | 925 | (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) |
| 926 | (insert ", ") | 926 | (insert ", ") |
| 927 | (cal-tex-large-bf (cal-tex-month-name month)) | 927 | (cal-tex-large-bf (cal-tex-month-name month)) |
| 928 | (insert " ") | 928 | (insert "\\ ") |
| 929 | (cal-tex-large-bf (number-to-string day)) | 929 | (cal-tex-large-bf (number-to-string day)) |
| 930 | (unless (string-equal "" (setq s (cal-tex-latexify-list | 930 | (unless (string-equal "" (setq s (cal-tex-latexify-list |
| 931 | holidays date "; "))) | 931 | holidays date "; "))) |
| @@ -976,7 +976,7 @@ shown are hard-coded to 8-12, 13-17." | |||
| 976 | (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) | 976 | (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) |
| 977 | (insert ", ") | 977 | (insert ", ") |
| 978 | (cal-tex-large-bf (cal-tex-month-name month)) | 978 | (cal-tex-large-bf (cal-tex-month-name month)) |
| 979 | (insert " ") | 979 | (insert "\\ ") |
| 980 | (cal-tex-large-bf (number-to-string day)) | 980 | (cal-tex-large-bf (number-to-string day)) |
| 981 | (unless (string-equal "" (setq s (cal-tex-latexify-list | 981 | (unless (string-equal "" (setq s (cal-tex-latexify-list |
| 982 | holidays date "; "))) | 982 | holidays date "; "))) |
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index a6d989a45fd..db7489fbf1c 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el | |||
| @@ -659,6 +659,8 @@ The passphrase is read and cached." | |||
| 659 | (catch 'break | 659 | (catch 'break |
| 660 | (dolist (uid uids nil) | 660 | (dolist (uid uids nil) |
| 661 | (if (and (stringp (epg-user-id-string uid)) | 661 | (if (and (stringp (epg-user-id-string uid)) |
| 662 | (car (mail-header-parse-address | ||
| 663 | (epg-user-id-string uid))) | ||
| 662 | (equal (downcase (car (mail-header-parse-address | 664 | (equal (downcase (car (mail-header-parse-address |
| 663 | (epg-user-id-string uid)))) | 665 | (epg-user-id-string uid)))) |
| 664 | (downcase (car (mail-header-parse-address | 666 | (downcase (car (mail-header-parse-address |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 3be515d9143..fa1362c471b 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -741,9 +741,11 @@ was inserted." | |||
| 741 | (type (if (image--imagemagick-wanted-p filename) | 741 | (type (if (image--imagemagick-wanted-p filename) |
| 742 | 'imagemagick | 742 | 'imagemagick |
| 743 | (image-type file-or-data nil data-p))) | 743 | (image-type file-or-data nil data-p))) |
| 744 | ;; :scale 1: If we do not set this, create-image will apply | ||
| 745 | ;; default scaling based on font size. | ||
| 744 | (image (if (not edges) | 746 | (image (if (not edges) |
| 745 | (create-image file-or-data type data-p) | 747 | (create-image file-or-data type data-p :scale 1) |
| 746 | (create-image file-or-data type data-p | 748 | (create-image file-or-data type data-p :scale 1 |
| 747 | :max-width (- (nth 2 edges) (nth 0 edges)) | 749 | :max-width (- (nth 2 edges) (nth 0 edges)) |
| 748 | :max-height (- (nth 3 edges) (nth 1 edges))))) | 750 | :max-height (- (nth 3 edges) (nth 1 edges))))) |
| 749 | (inhibit-read-only t) | 751 | (inhibit-read-only t) |
diff --git a/lisp/image.el b/lisp/image.el index 2e84e47b5c0..3aa3b0aa240 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -415,13 +415,20 @@ must be available." | |||
| 415 | (defun create-image (file-or-data &optional type data-p &rest props) | 415 | (defun create-image (file-or-data &optional type data-p &rest props) |
| 416 | "Create an image. | 416 | "Create an image. |
| 417 | FILE-OR-DATA is an image file name or image data. | 417 | FILE-OR-DATA is an image file name or image data. |
| 418 | |||
| 418 | Optional TYPE is a symbol describing the image type. If TYPE is omitted | 419 | Optional TYPE is a symbol describing the image type. If TYPE is omitted |
| 419 | or nil, try to determine the image type from its first few bytes | 420 | or nil, try to determine the image type from its first few bytes |
| 420 | of image data. If that doesn't work, and FILE-OR-DATA is a file name, | 421 | of image data. If that doesn't work, and FILE-OR-DATA is a file name, |
| 421 | use its file extension as image type. | 422 | use its file extension as image type. |
| 423 | |||
| 422 | Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. | 424 | Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. |
| 425 | |||
| 423 | Optional PROPS are additional image attributes to assign to the image, | 426 | Optional PROPS are additional image attributes to assign to the image, |
| 424 | like, e.g. `:mask MASK'. | 427 | like, e.g. `:mask MASK'. If the property `:scale' is not given and the |
| 428 | display has a high resolution (more exactly, when the average width of a | ||
| 429 | character in the default font is more than 10 pixels), the image is | ||
| 430 | automatically scaled up in proportion to the default font. | ||
| 431 | |||
| 425 | Value is the image created, or nil if images of type TYPE are not supported. | 432 | Value is the image created, or nil if images of type TYPE are not supported. |
| 426 | 433 | ||
| 427 | Images should not be larger than specified by `max-image-size'. | 434 | Images should not be larger than specified by `max-image-size'. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 91e7ef171fd..b9441336f9e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -199,11 +199,14 @@ or to the end of the buffer for a backward search.") | |||
| 199 | to the search status stack.") | 199 | to the search status stack.") |
| 200 | 200 | ||
| 201 | (defvar isearch-filter-predicate #'isearch-filter-visible | 201 | (defvar isearch-filter-predicate #'isearch-filter-visible |
| 202 | "Predicate that filters the search hits that would normally be available. | 202 | "Predicate to filter hits of Isearch and replace commands. |
| 203 | Search hits that dissatisfy the predicate are skipped. The function | 203 | Isearch hits that don't satisfy the predicate will be skipped. |
| 204 | has two arguments: the positions of start and end of text matched by | 204 | The value should be a function of two arguments; it will be |
| 205 | the search. If this function returns nil, continue searching without | 205 | called with the the positions of the start and the end of the |
| 206 | stopping at this match. | 206 | text matched by Isearch and replace commands. If this function |
| 207 | returns nil, Isearch and replace commands will continue searching | ||
| 208 | without stopping at resp. replacing this match. | ||
| 209 | |||
| 207 | If you use `add-function' to modify this variable, you can use the | 210 | If you use `add-function' to modify this variable, you can use the |
| 208 | `isearch-message-prefix' advice property to specify the prefix string | 211 | `isearch-message-prefix' advice property to specify the prefix string |
| 209 | displayed in the search message.") | 212 | displayed in the search message.") |
| @@ -3509,10 +3512,13 @@ Optional third argument, if t, means if fail just return nil (no error). | |||
| 3509 | (setq isearch-hidden t))))))) | 3512 | (setq isearch-hidden t))))))) |
| 3510 | 3513 | ||
| 3511 | (defun isearch-filter-visible (beg end) | 3514 | (defun isearch-filter-visible (beg end) |
| 3512 | "Test whether the current search hit is visible at least partially. | 3515 | "Return non-nil if text between BEG and END is deemed visible by Isearch. |
| 3513 | Return non-nil if the text from BEG to END is visible to Isearch as | 3516 | This function is intended to be used as `isearch-filter-predicate'. |
| 3514 | determined by `isearch-range-invisible' unless invisible text can be | 3517 | It returns non-nil if the text between BEG and END is visible to |
| 3515 | searched too when `search-invisible' is t." | 3518 | Isearch, at least partially, as determined by `isearch-range-invisible'. |
| 3519 | If `search-invisible' is t, which allows Isearch matches inside | ||
| 3520 | invisible text, this function will always return non-nil, regardless | ||
| 3521 | of what `isearch-range-invisible' says." | ||
| 3516 | (or (eq search-invisible t) | 3522 | (or (eq search-invisible t) |
| 3517 | (not (isearch-range-invisible beg end)))) | 3523 | (not (isearch-range-invisible beg end)))) |
| 3518 | 3524 | ||
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 08d1d77c7be..a2ad07fddb0 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1779,6 +1779,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") | |||
| 1779 | ;; lock context (etc.) fontification. | 1779 | ;; lock context (etc.) fontification. |
| 1780 | (goto-char pos) | 1780 | (goto-char pos) |
| 1781 | (let ((lit-start (c-literal-start)) | 1781 | (let ((lit-start (c-literal-start)) |
| 1782 | old-pos | ||
| 1782 | (new-pos pos) | 1783 | (new-pos pos) |
| 1783 | capture-opener | 1784 | capture-opener |
| 1784 | bod-lim bo-decl) | 1785 | bod-lim bo-decl) |
| @@ -1801,12 +1802,14 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") | |||
| 1801 | (while | 1802 | (while |
| 1802 | ;; Go to a less nested declaration each time round this loop. | 1803 | ;; Go to a less nested declaration each time round this loop. |
| 1803 | (and | 1804 | (and |
| 1805 | (setq old-pos (point)) | ||
| 1804 | (c-syntactic-skip-backward "^;{}" bod-lim t) | 1806 | (c-syntactic-skip-backward "^;{}" bod-lim t) |
| 1805 | (> (point) bod-lim) | 1807 | (> (point) bod-lim) |
| 1806 | (progn (c-forward-syntactic-ws) | 1808 | (progn (c-forward-syntactic-ws) |
| 1807 | ;; Have we got stuck in a comment at EOB? | 1809 | ;; Have we got stuck in a comment at EOB? |
| 1808 | (not (and (eobp) | 1810 | (not (and (eobp) |
| 1809 | (c-literal-start)))) | 1811 | (c-literal-start)))) |
| 1812 | (< (point) old-pos) | ||
| 1810 | (progn (setq bo-decl (point)) | 1813 | (progn (setq bo-decl (point)) |
| 1811 | (or (not (looking-at c-protection-key)) | 1814 | (or (not (looking-at c-protection-key)) |
| 1812 | (c-forward-keyword-clause 1))) | 1815 | (c-forward-keyword-clause 1))) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index ed8acf70fe0..3fd2a7e701c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -361,6 +361,9 @@ A grep buffer becomes most recent when you select Grep mode in it. | |||
| 361 | Notice that using \\[next-error] or \\[compile-goto-error] modifies | 361 | Notice that using \\[next-error] or \\[compile-goto-error] modifies |
| 362 | `compilation-last-buffer' rather than `grep-last-buffer'.") | 362 | `compilation-last-buffer' rather than `grep-last-buffer'.") |
| 363 | 363 | ||
| 364 | (defvar grep-match-face 'match | ||
| 365 | "Face name to use for grep matches.") | ||
| 366 | |||
| 364 | ;;;###autoload | 367 | ;;;###autoload |
| 365 | (defconst grep-regexp-alist | 368 | (defconst grep-regexp-alist |
| 366 | `((,(concat "^\\(?:" | 369 | `((,(concat "^\\(?:" |
| @@ -384,7 +387,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 384 | (when grep-highlight-matches | 387 | (when grep-highlight-matches |
| 385 | (let* ((beg (match-end 0)) | 388 | (let* ((beg (match-end 0)) |
| 386 | (end (save-excursion (goto-char beg) (line-end-position))) | 389 | (end (save-excursion (goto-char beg) (line-end-position))) |
| 387 | (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) | 390 | (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) |
| 388 | (when mbeg | 391 | (when mbeg |
| 389 | (- mbeg beg))))) | 392 | (- mbeg beg))))) |
| 390 | . | 393 | . |
| @@ -392,7 +395,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 392 | (when grep-highlight-matches | 395 | (when grep-highlight-matches |
| 393 | (let* ((beg (match-end 0)) | 396 | (let* ((beg (match-end 0)) |
| 394 | (end (save-excursion (goto-char beg) (line-end-position))) | 397 | (end (save-excursion (goto-char beg) (line-end-position))) |
| 395 | (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) | 398 | (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) |
| 396 | (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) | 399 | (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) |
| 397 | (when mend | 400 | (when mend |
| 398 | (- mend beg)))))) | 401 | (- mend beg)))))) |
| @@ -416,9 +419,6 @@ See `compilation-error-regexp-alist' for format details.") | |||
| 416 | (defvar grep-error-face 'compilation-error | 419 | (defvar grep-error-face 'compilation-error |
| 417 | "Face name to use for grep error messages.") | 420 | "Face name to use for grep error messages.") |
| 418 | 421 | ||
| 419 | (defvar grep-match-face 'match | ||
| 420 | "Face name to use for grep matches.") | ||
| 421 | |||
| 422 | (defvar grep-context-face 'shadow | 422 | (defvar grep-context-face 'shadow |
| 423 | "Face name to use for grep context lines.") | 423 | "Face name to use for grep context lines.") |
| 424 | 424 | ||