summaryrefslogtreecommitdiff
path: root/lisp/net/shr.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor svg wrap tweakLars Ingebrigtsen2019-09-191-1/+1
| | | | | * lisp/net/shr.el (svg--wrap-svg): Add the size to the wrapper to avoid having the SVG images shrink (bug#37159).
* Further fix-ups for SVG wrapping in shrLars Ingebrigtsen2019-09-191-9/+9
| | | | | * lisp/net/shr.el (svg--wrap-svg): Add the size to the wrapper to avoid having the SVG images shrink (bug#37159).
* lisp/*.el, src/*.c: Fix typos in docstringsJuanma Barranquero2019-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/apropos.el (apropos-do-all): * lisp/auth-source-pass.el (auth-source-pass--select-from-entries): * lisp/auth-source.el (auth-source-user-or-password): * lisp/calc/calc-forms.el (math-tzone-names): * lisp/calendar/diary-lib.el (diary-face-attrs) (diary-mark-entries-1): * lisp/cedet/cedet-files.el (cedet-files-list-recursively): * lisp/cedet/ede.el (ede-constructing, ede-deep-rescan): * lisp/cedet/ede/cpp-root.el (ede-cpp-root-header-file-p): * lisp/cedet/ede/proj.el (ede-proj-target-makefile): * lisp/cedet/inversion.el (inversion-check-version) (inversion-test): * lisp/cedet/mode-local.el (mode-local-map-file-buffers): * lisp/cedet/semantic/complete.el (semantic-displayer-ghost): * lisp/cedet/semantic/db-find.el (semanticdb-find-translate-path-default): * lisp/cedet/semantic/db.el (semanticdb-table) (semanticdb-search-system-databases): * lisp/cedet/semantic/imenu.el (semantic-imenu-index-directory): * lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map): * lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-use-headers-flag): * lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table) (semantic-lex-make-type-table, semantic-lex-debug-analyzers): * lisp/cedet/semantic/tag-ls.el (semantic-tag-abstract-p) (semantic-tag-leaf-p, semantic-tag-static-p) (semantic-tag-prototype-p): * lisp/dnd.el (dnd-open-remote-file-function, dnd-open-local-file): * lisp/emacs-lisp/eieio-opt.el (eieio-build-class-alist) (eieio-read-class, eieio-read-subclass): * lisp/emacs-lisp/generator.el (cps--replace-variable-references) (cps--handle-loop-for): * lisp/erc/erc-dcc.el (erc-dcc-list, erc-dcc-member, erc-dcc-server) (erc-dcc-auto-mask-p, erc-dcc-get-file, erc-dcc-chat-accept): * lisp/eshell/em-pred.el (eshell-pred-file-type): * lisp/faces.el (defined-colors-with-face-attributes): * lisp/font-core.el (font-lock-mode): * lisp/frame.el (frame-restack): * lisp/net/shr.el (shr-image-animate): * lisp/org/org-agenda.el (org-agenda-change-all-lines) (org-agenda-today-p): * lisp/org/org-id.el (org-id-get): * lisp/org/org.el (org-highlight-latex-and-related) (org--valid-property-p): * lisp/org/ox-beamer.el (org-beamer--get-label): * lisp/org/ox-latex.el (org-latex--caption-above-p): * lisp/org/ox-odt.el (org-odt--copy-image-file) (org-odt--copy-formula-file): * lisp/org/ox.el (org-export-with-timestamps): * lisp/progmodes/verilog-mode.el (verilog-indent-declaration-macros): * lisp/ses.el (ses-file-format-extend-parameter-list): * lisp/term.el (ansi-term): * lisp/textmodes/bibtex.el (bibtex-no-opt-remove-re) (bibtex-beginning-of-first-entry, bibtex-autokey-get-title) (bibtex-read-key, bibtex-initialize): * lisp/textmodes/flyspell.el (flyspell-word): * lisp/view.el (view-mode-exit): * src/composite.c: * src/floatfns.c (Fisnan): Fix typos in docstrings.
* Add default foreground colours to SVG imagesLars Ingebrigtsen2019-09-141-0/+16
| | | | | | | | * lisp/net/shr.el (svg--wrap-svg): Add a default foreground colour to SVG images (bug#37159). This helps with images like the ones in https://en.wikipedia.org/wiki/Banach_fixed-point_theorem that specify no foreground or background colours. (shr-parse-image-data): Use it.
* Tweak shr background colour handlingLars Ingebrigtsen2019-08-291-2/+6
| | | | | * lisp/net/shr.el (shr-fill-line): Extend the background to the end of the line when folding lines.
* Remove debugging from previous shr.el patchLars Ingebrigtsen2019-08-231-1/+0
|
* Avoid an infloop in shr when filling text with :align-to propertiesLars Ingebrigtsen2019-08-231-0/+2
| | | | | * lisp/net/shr.el (shr-fill-line): Only join together URL buttons if there are any URL buttons.
* Mark shr buttons as button.el buffersLars Ingebrigtsen2019-07-301-0/+2
| | | | | * lisp/net/shr.el (shr-urlify): Mark buttons as button.el buffers for easier reuse in buttonified buffers.
* Rename the new `browse-url-external-browser' variableLars Ingebrigtsen2019-07-291-3/+3
| | | | | | | | | | | | * lisp/net/shr.el (shr-external-browser, shr-browse-url): * lisp/net/eww.el (eww-browse-with-external-browser) (eww-follow-link): * lisp/net/browse-url.el (browse-url-secondary-browser-function) (browse-url-button-open): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): Rename from `browse-url-external-browser' to `browse-url-secondary-browser-function'.
* Enable browse-url to buttonize buffersLars Ingebrigtsen2019-07-281-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also moves the internal/external browser logic from shr to browse-url, where it belongs more naturally. * doc/misc/eww.texi (Basics): Adjust to browse-url-external-browser. * doc/misc/gnus.texi (Article Commands): Ditto. * lisp/gnus/gnus-art.el (gnus-button-url-regexp): Default to `browse-url-button-regexp', which has taken over the definition previously enjoyed by this variable. * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): Adjust usage. * lisp/net/browse-url.el (browse-url--browser-defcustom-type): New internal variable... (browse-url-browser-function, browse-url-external-browser): Used by these two; the latter of which is a new variable. (browse-url-botton-regexp): New variable. (browse-url-button-map): New keymap. (browse-url-button): New face. (browse-url-add-buttons): New function to add clickable browse-url buttons to almost any buffer. (browse-url-button-open): New command. (browse-url-button-copy): New command. * lisp/net/eww.el (eww-browse-with-external-browser) (eww-follow-link): Adjust usage. * lisp/net/shr.el (shr-external-browser): Make an obsolete alias of `browse-url-external-browser'. (shr-browse-url): Adjust usage.
* Tweak the sizing of the shr placeholder images on HiDPI screensLars Ingebrigtsen2019-07-251-1/+1
| | | | | | | * lisp/net/shr.el (shr-make-placeholder-image): We have already computed the size of the placeholder including the scale, so force the automatic scale to 1. This will make the placeholder the correct size on HiDPI screen.
* Tweak background colour handling in shrLars Ingebrigtsen2019-07-141-4/+6
| | | | | * lisp/net/shr.el (shr-fill-line): Keep the background colour on the newline and the indentation.
* Handle 'abbr' and 'acronym' tags in shr.elNick Drozd2019-07-071-0/+21
| | | | | | * lisp/net/shr.el (shr-tag-abbr, shr-tag-acronym): New functions handling 'abbr' and 'acronym' tags, respectively. * etc/NEWS: Announce change in shr behavior (bug#36475).
* ; * lisp/net/shr.el (shr-selected-link): Doc fix.Basil L. Contovounesios2019-07-041-1/+3
|
* Handle 'code' tag in shr.elNick Drozd2019-06-231-1/+5
| | | | | * etc/NEWS: Announce change in shr behavior (bug#36247). * lisp/net/shr.el: Add 'code' tag handling.
* Restore image scaling support when there's no native image scalingLars Ingebrigtsen2019-06-121-2/+12
| | | | | | * lisp/net/shr.el (shr--image-type): New function. (shr-rescale-image): Use it to allow image scaling on Emacsen with ImageMagick support that does not have native image scaling support.
* Make shr-rescale-image respect get-buffer-window againLars Ingebrigtsen2019-05-161-27/+29
| | | | | * lisp/net/shr.el (shr-rescale-image): Partially revert previous change -- ressurrect the check for `get-buffer-window'.
* Make image scaling work without imagemagick support in ewwLars Ingebrigtsen2019-05-151-31/+28
| | | | | | * lisp/net/shr.el (shr-rescale-image): Emacs has native image scaling now, so images can be rescaled without imagemagick support.
* Add a comment about the previous shr changeLars Ingebrigtsen2019-05-131-0/+2
|
* Fix problems in shr when indenting tablesLars Ingebrigtsen2019-05-131-2/+4
| | | | | | * lisp/net/shr.el (shr-mark-fill, shr-insert-table): Fix problems when block-quoting/<li>-ing a table -- the indentation/prefix was inserted twice (bug#32277).
* Handle HTML 'ol' start attribute in shr.elNicholas Drozd2019-02-221-1/+8
| | | | | | | | | | * lisp/net/shr.el (shr-tag-ol): Don't automatically assume 1-indexing for all ordered lists, use <ol> if given. * etc/NEWS: Announce change in shr behavior. * test/data/shr/ol.html: * test/data/shr/ol.txt: New test data files.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Merge from origin/emacs-26Glenn Morris2018-09-281-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 1908173 (origin/emacs-26) Fix Bug#32828 7f5086d * lisp/net/shr.el (shr-copy-url): Fix docstring. d309994 Fix typos in documentation 25cdd65 ; Spellcheck two more documentation strings c8bda05 ; * lisp/simple.el (save-interprogram-paste-before-kill): Fix... dc7fdee * doc/emacs/kmacro.texi (Basic Keyboard Macro): Mention old b... 17766a1 Improve docs of functions/variables related to 'display-buffer' a363931 * lisp/mouse.el (tear-off-window): Fix non-mouse use (bug#32799) 8b8a4c0 Improve documentation of directory-local variables c9c9756 Don't use obsolete variable 'save-place' in documentation ca208e8 Use save-place-mode instead of save-place
| * * lisp/net/shr.el (shr-copy-url): Fix docstring.Noam Postavsky2018-09-271-3/+3
| |
* | shr: Allow skipping tags with aria-hidden (Bug#32348)Noam Postavsky2018-08-271-1/+10
| | | | | | | | | | | | | | * lisp/net/shr.el (shr-discard-aria-hidden): New option. (shr-descend): Suppress aria-hidden=true tags if it's set. * doc/misc/eww.texi (Advanced): Document shr-discard-aria-hidden. * etc/NEWS: Announce it.
* | Don't have shr bug out on degenerate <img> tagsLars Ingebrigtsen2018-06-111-0/+4
| | | | | | | | | | * lisp/net/shr.el (shr-tag-img): Protect against contructs like <img src=" ">.
* | Set :version of shr facesBasil L. Contovounesios2018-04-171-0/+3
| | | | | | | | | | * lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link): Set :version tag (bug#31200).
* | shr doc string fixLars Ingebrigtsen2018-04-171-3/+3
| | | | | | | | | | * lisp/net/shr.el (shr-strike-through, shr-link) (shr-selected-link): Doc string fix.
* | Modernise face specs and set version tags in eww/shrBasil L. Contovounesios2018-04-171-3/+3
| | | | | | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link): Set :version tag (bug#31200). * lisp/net/eww.el (eww-form-text, eww-form-textarea): * lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link): Use (DISPLAY . PLIST) face spec syntax as recommended in '(elisp) Defining Faces'.
* | Tweak shr window width computationLars Ingebrigtsen2018-04-171-1/+2
| | | | | | | | | | | | * lisp/net/shr.el (shr-insert-document): The computation of the window width is apparently one pixel too wide for the shr line folding algorithm (bug#31196).
* | Reimplement `shr-next-link' and `shr-previous-link'Lars Ingebrigtsen2018-04-171-39/+9
| | | | | | | | | | | | * lisp/net/shr.el (shr-next-link): Use `text-property-search-forward'. (shr-previous-link): Use `text-property-search-backward'.
* | Query the user whether to increase stack depth in shrLars Ingebrigtsen2018-04-151-2/+6
| | | | | | | | | | | | | | * lisp/net/shr.el (shr-insert-document): Bind `max-specpdl-size' here... (bug#30675). (shr-descend): So that we can increase it temporarily here if the user wants to.
* | Avoid an infloop in shr filling when not using fontsLars Ingebrigtsen2018-04-151-36/+39
| | | | | | | | | | | | * lisp/net/shr.el (shr-fill-line): If we have an indentation that's wider than the width of what we're trying to fill, just give up. This avoids an infloop when `shr-use-fonts' in nil.
* | Further shr line folding/link continuation tweaksLars Ingebrigtsen2018-04-141-10/+17
| | | | | | | | | | * lisp/net/shr.el (shr-fill-line): Tweak the link continuations further when folding lines.
* | Tweak shr link text property adjustments when foldingLars Ingebrigtsen2018-04-141-2/+2
| | | | | | | | | | | | * lisp/net/shr.el (shr-fill-line): If a link starts at the first word on a new folded line, then don't copy the link properties to the newline inserted.
* | Tweak the fonts applied to shr indentationLars Ingebrigtsen2018-04-131-6/+6
| | | | | | | | | | * lisp/net/shr.el (shr-fill-line): Don't use fonts (especially link fonts) over indentation, because that's ugly..
* | Fix bug in shr-urlify introduced in previous patchLars Ingebrigtsen2018-04-131-2/+3
| | | | | | | | | | * lisp/net/shr.el (shr-urlify): Not all URLs have domains, so check for that before doing IDNA.
* | Make shr support inline <div>sLars Ingebrigtsen2018-04-131-3/+7
| | | | | | | | | | * lisp/net/shr.el (shr-tag-div): Support display: inline; for <div>, since that's a very common thing (bug#25588).
* | Notify the user a bit more before clicking IDNA linksLars Ingebrigtsen2018-04-131-6/+18
| | | | | | | | | | * lisp/net/shr.el (shr-urlify): Show the puny-encoded domain name in the mouseover string (bug#25600).
* | When opening external links in eww, blink the linkLars Ingebrigtsen2018-04-131-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/eww.el (eww-follow-link): Ditto. * lisp/net/shr.el (shr-selected-link): New face (bug#25096). (shr--blink-link): New function to blink links. (shr--current-link-region): New utility function. (shr-browse-url): Use it to blink external links. Blinking the link allows the user to get immediate feedback that the action has been performed. Opening the external browser may take a while, and may not be obvious that is going on.
* | <label> shouldn't introduce a line breakLars Ingebrigtsen2018-04-131-4/+0
| | | | | | | | | | | | * lisp/net/shr.el (shr-tag-label): Remove so that labels don't break lines (because they shouldn't: They're usually part of a selection interface) (bug#30557).
* | Merge from origin/emacs-26Glenn Morris2018-04-011-2/+6
|\| | | | | | | | | | | | | | | | | | | | | af1624f * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957) 3a451bd ; * doc/emacs/msdos.texi: Fix wording of last change. 3bc1e2f Mention `key-description' as inverse of `kbd' (Bug#30942) e50196e Document return value of pcase (Bug#30425) 8a2466f * doc/emacs/macos.texi: Tweak grammar and capitalization. 9db62bf Distinguish free from non-free OSes ff49d86 * doc/emacs/misc.texi (Amusements): Avoid non-printing charac... 5bab671 Fix xrefs in pdf Emacs manual
| * * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957)Eli Zaretskii2018-04-011-2/+6
| |
* | Quieten cl-lib related compiler warningsGlenn Morris2018-03-221-1/+1
|/ | | | | | | | | | | | | | | | * lisp/completion.el (cl-set-difference): * lisp/files.el (map-merge-with, map-merge): * lisp/emacs-lisp/radix-tree.el (map-apply): Declare. * lisp/emacs-lisp/thunk.el: Load cl-lib at run-time, not cl-macs at compile. * lisp/gnus/gnus-group.el: Load cl-lib at run-time, not cl at compile. * lisp/emacs-lisp/checkdoc.el, lisp/emacs-lisp/package.el * lisp/gnus/gnus-sum.el, lisp/gnus/message.el, lisp/net/shr.el: Load cl-lib at run-time. * lisp/gnus/mml-sec.el (mml-signencrypt-style) (mml-secure-cust-record-keys): Replace cl with cl-lib, and load it at run-time. * lisp/cedet/ede/linux.el, lisp/vc/vc-hg.el: Reorder requires.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,Katsumi Yamaoka2017-12-181-4/+5
| | | | not position (bug#29734).
* Avoid reordering of output in 'shr-insert-document'Eli Zaretskii2017-12-161-3/+8
| | | | | * lisp/net/shr.el (shr-string-pixel-width): Preserve point across shr-pixel-column invocations. (Bug#29734)
* Escape column-zero doc parensGlenn Morris2017-12-121-1/+1
| | | | | | | | | * lisp/htmlfontify.el (hfy-display-class): * lisp/calendar/icalendar.el (icalendar--do-create-ical-alarm): * lisp/net/shr.el (shr-external-rendering-functions): * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag): * lisp/textmodes/tildify.el (tildify-tildify): Escape column-zero doc parens. A shame bug#21871 remains unfixed.
* Allow shr to use data: URLs without encodingLars Ingebrigtsen2017-12-031-1/+2
| | | | | | | * lisp/net/shr.el (shr-image-from-data): Don't bug out on image data: URLs that have no base64 encoding like (shr-image-from-data "text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E").