Stefan Monnier
be307485f7
* lisp: Prefer inlinable functions to macros.
...
* lisp/fringe.el (fringe-bitmap-p): Make it a plain function.
* lisp/tooltip.el (tooltip-region-active-p): Remove.
* lisp/net/shr.el (shr-char-breakable-p, shr-char-kinsoku-bol-p)
(shr-char-kinsoku-eol-p, shr-char-nospace-p): Use define-inline.
* lisp/url/url-future.el (url-future-done-p, url-future-completed-p)
(url-future-errored-p, url-future-cancelled-p):
* lisp/url/url-dav.el (url-dav-http-success-p): Use define-inline.
* lisp/vc/ediff-init.el (ediff-odd-p): Remove.
(ediff-background-face): Use cl-oddp instead.
(ediff-buffer-live-p): Make it a defsubst.
2014-12-05 12:49:53 -05:00
Lars Magne Ingebrigtsen
64755ed3ad
* net/shr.el (shr--extract-best-source): Ignore non-text children.
2014-12-04 14:42:57 +01:00
Lars Magne Ingebrigtsen
6d80f26a9a
shr-dom-print dom.el changes
...
* net/shr.el (shr-dom-print): Fix up `shr-dom-print' after the
dom.el changes.
2014-12-01 20:18:15 +01:00
Lars Magne Ingebrigtsen
803df8492d
* net/shr.el (shr-make-table-1): dom.el changes for table rendering.
2014-11-27 00:03:09 +01:00
Lars Magne Ingebrigtsen
d9ba097fe4
Use the new dom.el accessors in shr and eww
...
* net/shr.el: Ditto.
* net/eww.el: Use the new dom.el accessors throughout.
2014-11-26 19:42:29 +01:00
Lars Magne Ingebrigtsen
cbd90e1d30
Move eww and shr to customization group `web'
...
* net/eww.el (eww): Ditto.
* net/shr.el (shr): Move to the new defgroup `web'.
2014-11-16 21:29:40 +01:00
Lars Magne Ingebrigtsen
14b1c9d82d
* net/shr.el (shr-inhibit-images): Add a doc string.
2014-11-13 23:06:05 +01:00
Lars Magne Ingebrigtsen
f7a192cb5c
Make shr stop descending into the dom before `max-specpdl-size' stops us
...
* net/shr.el (shr-descend): Don't descend further than
`max-specpdl-size' allows (bug#16587).
(shr-depth): New variable.
(shr-warning): New variable.
2014-11-13 22:11:51 +01:00
Ivan Shmakov
fdae50c73f
shr URL expansion fixes
...
Fixes: debbugs:17958
* net/shr.el (shr-parse-base): Handle <base href=""> correctly.
(shr-expand-url): Expand absolute URLs correctly (bug#17958).
2014-11-13 19:41:20 +01:00
Lars Magne Ingebrigtsen
cbf8ea6f7f
Display SVG images in external <object> files
...
Fixes: debbugs:16244
* net/eww.el (eww-form-file): Fix version number.
* net/shr.el (shr-parse-image-data): Remove blocked bits from
external SVG images.
(shr-tag-object): Display images in <object> forms.
(shr-tag-table): Also insert <objects> after the tables.
2014-11-13 17:16:51 +01:00
Lars Magne Ingebrigtsen
704da6eeb4
shr typo fix from recent check-in
...
* net/shr.el (shr-retransform-dom): Typo fix.
2014-11-03 23:59:07 +01:00
Lars Magne Ingebrigtsen
1ca31e8cbd
Minor readability parsing issues with SVC images
...
* net/eww.el (eww-score-readability): Parse SVC images correctly.
* net/shr.el: Ditto.
2014-11-03 23:54:16 +01:00
Lars Magne Ingebrigtsen
772a965c5f
Minor `shr-retransform-dom' fix
...
* net/shr.el (shr-retransform-dom): Don't ignore elements that
have no children like <br />.
2014-11-03 23:38:26 +01:00
Lars Magne Ingebrigtsen
01af3a585d
* net/shr.el (shr-retransform-dom): Allow several text sub-nodes.
2014-11-03 02:02:37 +01:00
Lars Magne Ingebrigtsen
2e8259b044
Add a new, somewhat experimental "readability" command to eww
...
* net/eww.el (eww-readable): New command and keystroke.
* net/shr.el (shr-retransform-dom): New function.
2014-11-03 01:01:20 +01:00
Ivan Kanis
212b4d631b
Allow users to specify `shr-width'
...
* net/shr.el, net/eww.el: Don't override `shr-width', but
introduce a new variable `shr-internal-width'. This allows users
to specify a width themselves.
2014-09-18 21:18:34 +02:00
Glenn Morris
6d26235315
Merge from emacs-24; up to 2014-07-02T00:57:53Z!juri@jurta.org
2014-08-27 18:59:29 -07:00
Glenn Morris
bd3be308f7
shr.el: Comment.
2014-08-26 22:06:20 -07:00
João Távora
e7b37ae4df
* net/shr.el (shr-expand-url): Plain expand-file-name is not enough;
...
use url-expand-file-name.
Fixes: debbugs:18310
2014-08-26 22:04:47 -07:00
Lars Magne Ingebrigtsen
42ee94e0f4
Fix typo in last shr.el check-in
2014-08-25 18:04:39 +02:00
Lars Magne Ingebrigtsen
0a4aa6bd20
shr.el: Encode copied URLs
...
* net/shr.el (shr-copy-url): Encode copied URL to avoid getting
URLs containing spaces and the like.
2014-08-25 17:59:38 +02:00
Lars Magne Ingebrigtsen
488df60acc
* lisp/net/shr.el (shr-copy-url): Also copy the image URL.
...
* lisp/net/shr.el (shr-copy-url): Also copy the image URL.
2014-08-05 20:15:03 +02:00
João Távora
f596f897c6
Fix relative links to parent directories in shr
...
* lisp/net/shr.el (shr-expand-url): Use `expand-file-name' for relative
links. .
Fixes: debbugs:17217
2014-04-14 23:01:54 +01:00
Lars Ingebrigtsen
6952100dc3
(eww-textarea-map): [tab] doesn't work on tty.
...
Reported by Mario Lang.
* net/shr.el (shr-map): Ditto.
2014-03-05 19:44:58 +01:00
Glenn Morris
b70257b07e
Tweak earlier shr.el change
2014-02-28 15:00:12 -05:00
Ivan Kanis
8a73034ea9
* net/shr.el (shr-put-image): add custom variable
...
`shr-image-animate' to turn off image animation. It is so slow it
will render emacs unusable.
2014-02-28 09:49:59 +01:00
Lars Ingebrigtsen
cc477daa01
Make shr respect privacy when viewing documents with SVG images
...
(shr-tag-svg): Respect `shr-inhibit-images'.
(shr-dom-to-xml): Respect `shr-blocked-images'.
Fixes: debbugs:15882
2014-01-31 13:44:11 -08:00
Lars Ingebrigtsen
dba6e3ec42
Make shr-generic into a defsusbt to make the stack shallower
...
* net/shr.el (shr-generic): Make into a defsubst to make the stack
depth shallower.
2014-01-31 13:08:13 -08:00
Adam Sjøgren
35408b1a6c
* net/shr.el (shr-tag-img): Prefer the title over the alt text.
...
Fixes: debbugs:16537
2014-01-24 17:52:16 -07:00
Stefan Monnier
6137cb82db
* lisp/net/shr.el (shr-render-region): Autoload.
2014-01-12 18:34:33 -05:00
Lars Magne Ingebrigtsen
3d95a0f45a
Make shr do line filling better when encountering very long words
...
(shr-insert): If we have a word that's longer than `shr-width',
break after it anyway. Otherwise we'll do no breaking once we get
such a long word.
2014-01-05 11:23:35 +01:00
Lars Magne Ingebrigtsen
1a29adc257
* net/shr.el (shr-descend): Don't bug out if the anchor is empty.
...
Fixes: debbugs:16285
2014-01-05 10:45:45 +01:00
Paul Eggert
ba3189039a
Update copyright year to 2014 by running admin/update-copyright.
2014-01-01 07:43:34 +00:00
Glenn Morris
bb0980751e
Add missing custom :versions, plus small fixes
...
* emacs-lisp/smie.el (smie-config): Add type, version, initialize.
* bookmark.el (bookmark-bmenu-use-header-line):
* doc-view.el (doc-view-scale-internally):
* pcmpl-x.el (pcmpl-x-tlmgr-program, pcmpl-x-ack-program):
* register.el (register-preview-delay):
* net/shr.el (shr-bullet):
* progmodes/cfengine.el (cfengine-cf-promises)
(cfengine-parameters-indent):
* progmodes/octave.el (inferior-octave-error-regexp-alist):
* textmodes/reftex-vars.el (reftex-label-regexps):
* vc/log-edit.el (log-edit-setup-add-author): Add version.
* cedet/ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default): Fix custom types. Add version.
* gnus/gnus-icalendar.el (gnus-icalendar-org, gnus-icalendar):
* gnus/gnus-sum.el (gnus-subthread-sort-functions): Add version.
* gnus/gnus-sync.el (gnus-sync-file-encrypt-to): Add type and version.
2013-12-27 18:16:05 -08:00
Lars Ingebrigtsen
e572a7d800
* net/shr.el (shr-insert): Don't infloop if the width is zero.
2013-12-27 16:43:54 +01:00
Lars Ingebrigtsen
24a6b65e90
Fix another shr infloop in the filling code
...
(shr-find-fill-point): Off by one error in comparison with the
indentation.
2013-12-27 03:58:16 +01:00
Lars Ingebrigtsen
ac5758d162
shr didn't fill Japanese text correctly any more
...
* net/shr.el (shr-find-fill-point): Don't try to fill if the
indentation level is larger than the width, because that will
infloop.
(shr-insert): Fill repeatedly long texts, so that Japanese is
formatted correctly.
Fixes: debbugs:16263
2013-12-27 03:21:42 +01:00
Lars Ingebrigtsen
f7f071dcf4
Don't infloop when we can't find a good place to break lines in shr
...
(shr-insert): Don't infloop if we can't find a good place to break
the line.
Fixes: debbugs:16256
2013-12-25 23:52:15 +01:00
Lars Ingebrigtsen
3c856c1415
* net/shr.el (shr-visit-file): Removed debugging function.
2013-12-25 20:37:41 +01:00
Lars Ingebrigtsen
c6c2058404
Further shr quotation mark fill fixes
...
(shr-char-kinsoku-bol-p): The quotation mark isn't a kinsoky BOL char.
(shr-find-fill-point): Remove the special checks for the quotation
mark, since `shr-char-kinsoku-bol-p' should now return the right
thing.
2013-12-25 19:14:49 +01:00
Lars Ingebrigtsen
99e4926fcb
Fold shr text with single quotation marks better
...
* net/shr.el (shr-find-fill-point): Don't break lines before a
quotation mark.
2013-12-25 18:31:39 +01:00
Lars Magne Ingebrigtsen
073d5cfd9e
* net/shr.el (shr--extract-best-source): Don't bug out on audio elements
...
That have text inside. Also remove debugging.
2013-12-21 18:54:16 +01:00
Lars Magne Ingebrigtsen
cf91cee781
* net/shr.el (shr-insert): Protect against infloops in degenerate tables.
2013-12-20 05:29:08 +01:00
Stefan Monnier
e914544431
* lisp/net/shr.el (shr-insert-document): Remove unused var
...
`shr-preliminary-table-render'.
(shr-rescale-image): Remove unused arg `force'.
(shr-put-image): Update calls accordingly.
(shr-tag-a): Use `cont' rather than dyn-bound `dom'.
2013-12-16 21:48:06 -05:00
Lars Magne Ingebrigtsen
1c4b1e6107
* net/shr.el (shr-tag-a): Support zero-length <a name="foo"> elements.
2013-12-17 00:40:17 +01:00
Lars Magne Ingebrigtsen
e330b64699
* net/shr.el (shr-tag-img): Don't bug out on <img src=""> data.
2013-12-07 02:44:15 +01:00
Paul Eggert
f224e50022
Spelling and punctuation fixes.
2013-12-01 14:33:13 -08:00
Rüdiger Sonderfeld
ad9a773c50
Allow preferring some media types over others
...
* net/shr.el (shr-prefer-media-type-alist): : New customizable
variable.
(shr--get-media-pref): New function.
(shr--extract-best-source): New function.
(shr-tag-video, shr-tag-audio): Use `shr--extract-best-source' when
no :src tag was specified.
2013-12-01 16:49:18 +01:00
Rüdiger Sonderfeld
eb2dd24d5b
(shr-tag-audio): Add support for <audio> tag.
2013-12-01 16:41:10 +01:00
Rüdiger Sonderfeld
177948a5b2
Display content for video if no poster is available.
...
* net/shr.el (shr-tag-video): Display content for video if no
poster is available.
2013-12-01 16:40:12 +01:00