aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2017-10-20 22:44:13 -0700
committerPaul Eggert2017-10-20 22:44:13 -0700
commit3155cb1585da7235145d76791feaf6170d8be0f1 (patch)
tree19b655867f27bb630b182f4bdb00a2e2d5ee6427 /doc
parentcb29f41624e5163a0aea4bfc98591e683807a2f8 (diff)
parent11bd8aa24b347f75e674528dd1a94b0a4037105e (diff)
downloademacs-3155cb1585da7235145d76791feaf6170d8be0f1.tar.gz
emacs-3155cb1585da7235145d76791feaf6170d8be0f1.zip
Merge from origin/emacs-26
11bd8aa24b Fix flymake's loading of subr-x b500e06f4d Fix Bug#28896 d815de017b Skip a Flymake test for old gcc versions fd3d8610b2 Make :align-to account for display-line-numbers 831eafc8ae Augment Flymake API for third-party extensions ddd547fada Improve treatment of Fortran's "class default" 234b1e3864 Flymake backends must check proc obsoleteness in source bu... 3ea6a4d4ba Skip an rsync test in tramp-tests.el 25f83fa7c5 ; Indentation fixes 4d578d432d On Windows default a frame's border width to zero (Bug#28873) 6f1dea5c74 Spelling fixes b8433b0954 Use pop-to-buffer-same-window instead of switch-to-buffer 2f7163fb72 Fix the MSDOS build. 2551d28fe8 Fix line number display after 'widen' dc8812829b Remove resizable attribute on macOS undecorated frames (bu... b970a4a52a Fix handling of `border-width' in `frameset--restore-frame... 445e92658f Mention how to send CC to > 1 address in a bug report 8ca6fa585a Improve format-time-string doc 2e1b3522b8 Improve documentation of 'line-number-display-width' 5b6e59cfdb Implement vc-default-dir-extra-headers for vc-rcs 22adeca42a In NEWS give advice on use of `switch-to-buffer' (Bug#28645) 2c3e6f1ddc Dont update primary selection with winner-undo b38724ab67 Work around ImageMagick bug 825 20cc68e871 Document rectangle-preview option more (Bug#27974) a0b7b301dd Do not reject https://gnu.org in commit messages fb4200a875 Fix Edebug spec for cl-defun (bug#24255) db68cefe72 Fix errors in kmacro.el post-command-hook c63b344c3d Fix range-error in image-dired.el 081d2187c4 Fix 'line-number-display-width' in hscrolled windows 16e85456e7 Fix error in tramp-smb-handle-insert-directory 613db8d35c Don't reject PBM header whitespace unnecessarily 3205b12a78 Fix regression in display of PPM images 1ca9ae7069 Require subr-x when compiling nnimap.el de60992053 Fix ert-test finding by symbol (Bug#28849) 51615a8082 Don't remember old debugger window (Bug#17882) 5980de3727 Disable python native completion on w32 (Bug#28580) 616b4c5956 Let select-frame-by-name choose any frame when called from... 8eb3c01dbd * lisp/dired-aux.el (dired-create-directory): Doc fix. 325dfdae13 Avoid compilation warnings in optimized builds f79382819c ; * src/composite.c (Fclear_composition_cache): Fix last c... f95cd5cd70 Improve customization of arabic-shaper-ZWNJ-handling. a7f154688d Improve customization type of 'mouse-drag-and-drop-region' 864734d112 ; Prefer https: to http: in GNU URLs 3c78960a47 Encourage https: in commit messages def9715282 ; Cleanup of etc/NEWS 4e59ecc646 Fix wording in Elisp manual's child frames section (Bug#28... eda9f5018c Another fix for C mode fontification of w32 source files 05aadd8990 Fix fontification of ALIGN_STACK functions aa0c38f358 Make sure thread stack is properly aligned on MS-Windows d7038020aa Do not under-align pseudovectors ff33053012 Fix indentation bug in multi-line CSS selectors 8968be822e ; * etc/NEWS: Grammar and spelling fixes 716b84034d gnutls_mac_get_nonce_size has been added in gnutls 3.3 55e313f7be ; * CONTRIBUTE: More suggestions for using US English. 622c675648 * CONTRIBUTE: Suggest American English. # Conflicts: # etc/NEWS # msdos/sed2v2.inp
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi50
-rw-r--r--doc/lispref/frames.texi2
-rw-r--r--doc/lispref/os.texi37
-rw-r--r--doc/misc/flymake.texi75
4 files changed, 111 insertions, 53 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index afd09cfb330..17126ce72b9 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2050,13 +2050,17 @@ calculations.
2050 2050
2051@defun line-number-display-width &optional pixelwise 2051@defun line-number-display-width &optional pixelwise
2052This function returns the width used for displaying the line numbers 2052This function returns the width used for displaying the line numbers
2053in the selected window. Optional argument @var{pixelwise}, if 2053in the selected window. If the optional argument @var{pixelwise} is
2054non-@code{nil}, means return the value in pixels; otherwise the value 2054the symbol @code{columns}, the return value is a float number of the
2055is returned in column units of the font defined for the 2055frame's canonical columns; if @var{pixelwise} is @code{t} or any other
2056@code{line-number} face. If line numbers are not displayed in the 2056non-@code{nil} value, the value is an integer and is measured in
2057selected window, the value is zero. Use @code{with-selected-window} 2057pixels. If @var{pixelwise} is omitted or @code{nil}, the value is the
2058(@pxref{Selecting Windows}) if you need this information about another 2058integer number of columns of the font defined for the
2059window. 2059@code{line-number} face, and doesn't include the 2 columns used to pad
2060the numbers on display. If line numbers are not displayed in the
2061selected window, the value is zero regardless of the value of
2062@var{pixelwise}. Use @code{with-selected-window} (@pxref{Selecting
2063Windows}) if you need this information about another window.
2060@end defun 2064@end defun
2061 2065
2062 2066
@@ -4635,7 +4639,7 @@ as an absolute number of pixels.
4635 4639
4636@smallexample 4640@smallexample
4637@group 4641@group
4638 @var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{form} 4642 @var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{xwidget} | @var{form}
4639 @var{num} ::= @var{integer} | @var{float} | @var{symbol} 4643 @var{num} ::= @var{integer} | @var{float} | @var{symbol}
4640 @var{unit} ::= in | mm | cm | width | height 4644 @var{unit} ::= in | mm | cm | width | height
4641@end group 4645@end group
@@ -4651,22 +4655,34 @@ as an absolute number of pixels.
4651 The form @var{num} specifies a fraction of the default frame font 4655 The form @var{num} specifies a fraction of the default frame font
4652height or width. The form @code{(@var{num})} specifies an absolute 4656height or width. The form @code{(@var{num})} specifies an absolute
4653number of pixels. If @var{num} is a symbol, @var{symbol}, its 4657number of pixels. If @var{num} is a symbol, @var{symbol}, its
4654buffer-local variable binding is used. 4658buffer-local variable binding is used; that binding can be either a
4659number or a cons cell of the forms shown above (including yet another
4660cons cell whose @code{car} is a symbol that has a buffer-local
4661binding).
4655 4662
4656 The @code{in}, @code{mm}, and @code{cm} units specify the number of 4663 The @code{in}, @code{mm}, and @code{cm} units specify the number of
4657pixels per inch, millimeter, and centimeter, respectively. The 4664pixels per inch, millimeter, and centimeter, respectively. The
4658@code{width} and @code{height} units correspond to the default width 4665@code{width} and @code{height} units correspond to the default width
4659and height of the current face. An image specification @code{image} 4666and height of the current face. An image specification of the form
4660corresponds to the width or height of the image. 4667@w{@code{(image . @var{props})}} (@pxref{Image Descriptors})
4668corresponds to the width or height of the specified image. Similarly,
4669an xwidget specification of the form @w{@code{(xwidget . @var{props})}}
4670stands for the width or height of the specified xwidget.
4671@xref{Xwidgets}.
4661 4672
4662 The elements @code{left-fringe}, @code{right-fringe}, 4673 The elements @code{left-fringe}, @code{right-fringe},
4663@code{left-margin}, @code{right-margin}, @code{scroll-bar}, and 4674@code{left-margin}, @code{right-margin}, @code{scroll-bar}, and
4664@code{text} specify to the width of the corresponding area of the 4675@code{text} specify the width of the corresponding area of the window.
4665window. 4676When the window displays line numbers (@pxref{Size of Displayed
4677Text}), the width of the @code{text} area is decreased by the screen
4678space taken by the line-number display.
4666 4679
4667 The @code{left}, @code{center}, and @code{right} positions can be 4680 The @code{left}, @code{center}, and @code{right} positions can be
4668used with @code{:align-to} to specify a position relative to the left 4681used with @code{:align-to} to specify a position relative to the left
4669edge, center, or right edge of the text area. 4682edge, center, or right edge of the text area. When the window
4683displays line numbers, the @code{left} and the @code{center} positions
4684are offset to account for the screen space taken by the line-number
4685display.
4670 4686
4671 Any of the above window elements (except @code{text}) can also be 4687 Any of the above window elements (except @code{text}) can also be
4672used with @code{:align-to} to specify that the position is relative to 4688used with @code{:align-to} to specify that the position is relative to
@@ -4682,13 +4698,15 @@ the left-margin, use
4682 4698
4683 If no specific base offset is set for alignment, it is always relative 4699 If no specific base offset is set for alignment, it is always relative
4684to the left edge of the text area. For example, @samp{:align-to 0} in a 4700to the left edge of the text area. For example, @samp{:align-to 0} in a
4685header-line aligns with the first text column in the text area. 4701header-line aligns with the first text column in the text area. When
4702the window displays line numbers, the text is considered to start where
4703the space used for line-number display ends.
4686 4704
4687 A value of the form @code{(@var{num} . @var{expr})} stands for the 4705 A value of the form @code{(@var{num} . @var{expr})} stands for the
4688product of the values of @var{num} and @var{expr}. For example, 4706product of the values of @var{num} and @var{expr}. For example,
4689@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . 4707@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 .
4690@var{image})} specifies half the width (or height) of the specified 4708@var{image})} specifies half the width (or height) of the specified
4691image. 4709@var{image} (which should be given by its image spec).
4692 4710
4693 The form @code{(+ @var{expr} ...)} adds up the value of the 4711 The form @code{(+ @var{expr} ...)} adds up the value of the
4694expressions. The form @code{(- @var{expr} ...)} negates or subtracts 4712expressions. The form @code{(- @var{expr} ...)} negates or subtracts
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 07a8b825026..ad853418ac4 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -3202,7 +3202,7 @@ a number of other ways as well. Here we sketch a few of them:
3202@item 3202@item
3203The semantics of maximizing and iconifying child frames is highly 3203The semantics of maximizing and iconifying child frames is highly
3204window-system dependent. As a rule, applications should never invoke 3204window-system dependent. As a rule, applications should never invoke
3205these operations for on frames. By default, invoking 3205these operations on child frames. By default, invoking
3206@code{iconify-frame} on a child frame will try to iconify the top-level 3206@code{iconify-frame} on a child frame will try to iconify the top-level
3207frame corresponding to that child frame instead. To obtain a different 3207frame corresponding to that child frame instead. To obtain a different
3208behavior, users may customize the option @code{iconify-child-frame} 3208behavior, users may customize the option @code{iconify-child-frame}
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 59c269a3084..0cb9de9f9a8 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1486,8 +1486,8 @@ This stands for the full name of the month.
1486@item %c 1486@item %c
1487This is a synonym for @samp{%x %X}. 1487This is a synonym for @samp{%x %X}.
1488@item %C 1488@item %C
1489This has a locale-specific meaning. In the default locale (named C), it 1489This stands for the century, that is, the year divided by 100,
1490is equivalent to @samp{%A, %B %e, %Y}. 1490truncated toward zero.
1491@item %d 1491@item %d
1492This stands for the day of month, zero-padded. 1492This stands for the day of month, zero-padded.
1493@item %D 1493@item %D
@@ -1530,8 +1530,11 @@ This stands for the calendar quarter (1--4).
1530This is a synonym for @samp{%I:%M:%S %p}. 1530This is a synonym for @samp{%I:%M:%S %p}.
1531@item %R 1531@item %R
1532This is a synonym for @samp{%H:%M}. 1532This is a synonym for @samp{%H:%M}.
1533@item %s
1534This stands for the integer number of seconds since the epoch.
1533@item %S 1535@item %S
1534This stands for the seconds (00--59). 1536This stands for the second (00--59, or 00--60 on platforms
1537that support leap seconds).
1535@item %t 1538@item %t
1536This stands for a tab character. 1539This stands for a tab character.
1537@item %T 1540@item %T
@@ -1561,22 +1564,31 @@ This stands for the year with century.
1561@item %Z 1564@item %Z
1562This stands for the time zone abbreviation (e.g., @samp{EST}). 1565This stands for the time zone abbreviation (e.g., @samp{EST}).
1563@item %z 1566@item %z
1564This stands for the time zone numerical offset (e.g., @samp{-0500}). 1567This stands for the time zone numerical offset. The @samp{z} can be
1568preceded by one, two, or three colons; if plain @samp{%z} stands for
1569@samp{-0500}, then @samp{%:z} stands for @samp{-05:00}, @samp{%::z}
1570stands for @samp{-05:00:00}, and @samp{%:::z} is like @samp{%::z}
1571except it suppresses trailing instances of @samp{:00} so it stands for
1572@samp{-05} in the same example.
1573@item %%
1574This stands for a single @samp{%}.
1565@end table 1575@end table
1566 1576
1577One or more flag characters can appear immediately after the @samp{%}.
1578@samp{0} pads with zeros, @samp{_} pads with blanks, @samp{-}
1579suppresses padding, @samp{^} upper-cases letters, and @samp{#}
1580reverses the case of letters.
1581
1567You can also specify the field width and type of padding for any of 1582You can also specify the field width and type of padding for any of
1568these @samp{%}-sequences. This works as in @code{printf}: you write 1583these @samp{%}-sequences. This works as in @code{printf}: you write
1569the field width as digits in the middle of a @samp{%}-sequences. If you 1584the field width as digits in a @samp{%}-sequence, after any flags.
1570start the field width with @samp{0}, it means to pad with zeros. If you
1571start the field width with @samp{_}, it means to pad with spaces.
1572
1573For example, @samp{%S} specifies the number of seconds since the minute; 1585For example, @samp{%S} specifies the number of seconds since the minute;
1574@samp{%03S} means to pad this with zeros to 3 positions, @samp{%_3S} to 1586@samp{%03S} means to pad this with zeros to 3 positions, @samp{%_3S} to
1575pad with spaces to 3 positions. Plain @samp{%3S} pads with zeros, 1587pad with spaces to 3 positions. Plain @samp{%3S} pads with zeros,
1576because that is how @samp{%S} normally pads to two positions. 1588because that is how @samp{%S} normally pads to two positions.
1577 1589
1578The characters @samp{E} and @samp{O} act as modifiers when used between 1590The characters @samp{E} and @samp{O} act as modifiers when used after
1579@samp{%} and one of the letters in the table above. @samp{E} specifies 1591any flags and field widths in a @samp{%}-sequence. @samp{E} specifies
1580using the current locale's alternative version of the date and time. 1592using the current locale's alternative version of the date and time.
1581In a Japanese locale, for example, @code{%Ex} might yield a date format 1593In a Japanese locale, for example, @code{%Ex} might yield a date format
1582based on the Japanese Emperors' reigns. @samp{E} is allowed in 1594based on the Japanese Emperors' reigns. @samp{E} is allowed in
@@ -1587,6 +1599,11 @@ based on the Japanese Emperors' reigns. @samp{E} is allowed in
1587representation of numbers, instead of the ordinary decimal digits. This 1599representation of numbers, instead of the ordinary decimal digits. This
1588is allowed with most letters, all the ones that output numbers. 1600is allowed with most letters, all the ones that output numbers.
1589 1601
1602To help debug programs, unrecognized @samp{%}-sequences stand for
1603themselves and are output as-is. Programs should not rely on this
1604behavior, as future versions of Emacs may recognize new
1605@samp{%}-sequences as extensions.
1606
1590This function uses the C library function @code{strftime} 1607This function uses the C library function @code{strftime}
1591(@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference 1608(@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference
1592Manual}) to do most of the work. In order to communicate with that 1609Manual}) to do most of the work. In order to communicate with that
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 05d879d8f4b..b0a56492bcd 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -361,34 +361,38 @@ priority but without an overlay face.
361 (flymake-category . flymake-note)))) 361 (flymake-category . flymake-note))))
362@end example 362@end example
363 363
364@vindex flymake-text 364@vindex flymake-diagnostics
365@vindex flymake-diagnostic-backend
366@vindex flymake-diagnostic-buffer
367@vindex flymake-diagnostic-text
368@vindex flymake-diagnostic-beg
369@vindex flymake-diagnostic-end
365As you might have guessed, Flymake's annotations are implemented as 370As you might have guessed, Flymake's annotations are implemented as
366overlays (@pxref{Overlays,,, elisp, The Emacs Lisp Reference Manual}). 371overlays (@pxref{Overlays,,, elisp, The Emacs Lisp Reference Manual}).
367Along with the properties that you specify for the specific type of 372Along with the properties that you specify for the specific type of
368diagnostic, Flymake adds the property @code{flymake-text} to these 373diagnostic, Flymake adds the property @code{flymake-diagnostic} to
369overlays, and sets it to the message string that the backend used to 374these overlays, and sets it to the object that the backend created
370describe the diagnostic. 375with @code{flymake-make-diagnostic}.
371 376
372Since overlays also support arbitrary keymaps, you can use this 377Since overlays also support arbitrary keymaps, you can use this along
373property @code{flymake-text} to create interactive annotations, such 378with the functions @code{flymake-diagnostics} and
374as in the following example of binding a @kbd{mouse-3} event (middle 379@code{flymake-diagnostic-text} (@pxref{Flymake utility functions}) to
375mouse button click) to an Internet search for the text of a 380create interactive annotations, such as in the following example of
376@code{:warning} or @code{:error}. 381binding a @code{mouse-3} event (middle mouse button click) to an
382Internet search for the text of a @code{:warning} or @code{:error}.
377 383
378@example 384@example
379(defun my-search-for-message (event) 385(defun my-search-for-message (event)
380 (interactive "e") 386 (interactive "e")
381 (let ((ovs (overlays-at (posn-point (event-start event)))) 387 (let* ((diags (flymake-diagnostics (posn-point (event-start event))))
382 ov) 388 (topmost-diag (car diags)))
383 ;; loop until flymake overlay we clicked on is recovered 389 (eww-browse-url
384 (while (not (overlay-get (setq ov (pop ovs)) 'flymake-text))) 390 (concat
385 (when ov 391 "https://duckduckgo.com/?q="
386 (eww-browse-url 392 (replace-regexp-in-string " "
387 (concat "https://duckduckgo.com/?q=" 393 "+"
388 (replace-regexp-in-string " " 394 (flymake-diagnostic-text topmost-diag)))
389 "+" 395 t)))
390 (overlay-get ov 'flymake-text)))
391 t))))
392 396
393(dolist (type '(:warning :error)) 397(dolist (type '(:warning :error))
394 (let ((a (assoc type flymake-diagnostic-types-alist))) 398 (let ((a (assoc type flymake-diagnostic-types-alist)))
@@ -513,6 +517,24 @@ Make a Flymake diagnostic for @var{buffer}'s region from @var{beg} to
513of the problem detected in this region. 517of the problem detected in this region.
514@end deffn 518@end deffn
515 519
520@cindex access diagnostic object
521These objects' properties can be accessed with the functions
522@code{flymake-diagnostic-backend}, @code{flymake-diagnostic-buffer},
523@code{flymake-diagnostic-text}, @code{flymake-diagnostic-beg},
524@code{flymake-diagnostic-end} and @code{flymake-diagnostic-type}.
525
526Additionally, the function @code{flymake-diagnostics} will collect
527such objects in the region you specify.
528
529@cindex collect diagnostic objects
530@deffn Function flymake-diagnostics beg end
531Get a list of Flymake diagnostics in the region determined by
532@var{beg} and @var{end}. If neither @var{beg} or @var{end} is
533supplied, use the whole buffer, otherwise if @var{beg} is
534non-@code{nil} and @var{end} is @code{nil}, consider only diagnostics
535at @var{beg}.
536@end deffn
537
516@cindex buffer position from line and column number 538@cindex buffer position from line and column number
517It is often the case with external syntax tools that a diagnostic's 539It is often the case with external syntax tools that a diagnostic's
518position is reported in terms of a line number, and sometimes a column 540position is reported in terms of a line number, and sometimes a column
@@ -520,9 +542,10 @@ number. To convert this information into a buffer position, backends
520can use the following function: 542can use the following function:
521 543
522@deffn Function flymake-diag-region buffer line &optional col 544@deffn Function flymake-diag-region buffer line &optional col
523Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding to 545Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding
524@var{line} and @var{col}. If @var{col} is nil, return a region just 546to @var{line} and @var{col}. If @var{col} is @code{nil}, return a
525for @var{line}. Return nil if the region is invalid. 547region just for @var{line}. Return @code{nil} if the region is
548invalid.
526@end deffn 549@end deffn
527 550
528@cindex add a log message 551@cindex add a log message
@@ -560,7 +583,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
560 583
561(defun ruby-flymake (report-fn &rest _args) 584(defun ruby-flymake (report-fn &rest _args)
562 ;; Not having a ruby interpreter is a serious problem which should cause 585 ;; Not having a ruby interpreter is a serious problem which should cause
563 ;; the backend to disable itself, so an @code{error} is signalled. 586 ;; the backend to disable itself, so an @code{error} is signaled.
564 ;; 587 ;;
565 (unless (executable-find 588 (unless (executable-find
566 "ruby") (error "Cannot find a suitable ruby")) 589 "ruby") (error "Cannot find a suitable ruby"))
@@ -600,7 +623,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
600 ;; `ruby--flymake-proc', which indicates that 623 ;; `ruby--flymake-proc', which indicates that
601 ;; `proc' is not an obsolete process. 624 ;; `proc' is not an obsolete process.
602 ;; 625 ;;
603 (if (eq proc ruby--flymake-proc) 626 (if (with-current-buffer source (eq proc ruby--flymake-proc))
604 (with-current-buffer (process-buffer proc) 627 (with-current-buffer (process-buffer proc)
605 (goto-char (point-min)) 628 (goto-char (point-min))
606 ;; Parse the output buffer for diagnostic's 629 ;; Parse the output buffer for diagnostic's
@@ -625,7 +648,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
625 msg) 648 msg)
626 into diags 649 into diags
627 finally (funcall report-fn diags))) 650 finally (funcall report-fn diags)))
628 (flymake-log :warning "Cancelling obsolete check %s" 651 (flymake-log :warning "Canceling obsolete check %s"
629 proc)) 652 proc))
630 ;; Cleanup the temporary buffer used to hold the 653 ;; Cleanup the temporary buffer used to hold the
631 ;; check's output. 654 ;; check's output.