1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

157 Commits

Author SHA1 Message Date
Mattias Engdegård
3b7b181bde Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state.  Use it where applicable and obviously safe (erring on the
conservative side).

* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:35:56 +02:00
akater
6535fd1fa9 Evaluate eql specializers
* lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Evaluate
forms that are eql specializers.  Provide backward compatibility
with a warning.

* test/lisp/emacs-lisp/cl-generic-tests.el: Add a test.
* lisp/emacs-lisp/bindat.el (bindat--type): Adhere to the new rule.
* lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Adhere to the new rule.
* lisp/emacs-lisp/map.el (map-into): Adhere to the new rule.
* lisp/emacs-lisp/radix-tree.el (map-into): Adhere to the new rule.
* lisp/frame.el (cl-generic-define-context-rewriter): Adhere to the new rule.
* lisp/gnus/gnus-search.el
(gnus-search-transform-expression): Adhere to the new rule.
* lisp/image/image-converter.el
(image-converter--probe image-converter--convert): Adhere to the new rule.
* lisp/mail/smtpmail.el (smtpmail-try-auth-method): Adhere to the new rule.
* lisp/progmodes/elisp-mode.el
(xref-backend-definitions)
(xref-backend-apropos): Adhere to the new rule.
* lisp/progmodes/etags.el (xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table)
(xref-backend-identifier-completion-ignore-case)
(xref-backend-definitions)(xref-backend-apropos): Adhere to the new rule.
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-cl-defmethod-with-types-ok)
(checkdoc-cl-defmethod-qualified-ok)
(checkdoc-cl-defmethod-with-extra-qualifier-ok): Adhere to the new rule.

* etc/NEWS: Describe the change.
2021-08-03 18:26:15 -04:00
Lars Ingebrigtsen
64ef8ff74d Don't move point in `exif-parse-buffer'
* lisp/image/exif.el (exif-parse-buffer): Don't move point
(bug#46552).
2021-02-17 00:43:52 +01:00
Lars Ingebrigtsen
3ddea271cc Slight gravatar.el code clean up
* lisp/image/gravatar.el (gravatar--service-libravatar): Clean the
code up slightly.
2021-01-29 05:52:51 +01:00
Lars Ingebrigtsen
0120f45db6 Protect against bad results from libravatar
* lisp/image/gravatar.el (gravatar--service-libravatar): Don't
have (gravatar-retrieve "foobar@zjp.codes" 'ignore) (which returns
a CNAME) bug out.
2021-01-28 13:10:45 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Lars Ingebrigtsen
72bcc6f988 Fix parsing error in exif
* lisp/image/exif.el (exif--parse-exif-chunk): The offset is a
four-byte number.  Reported by Alan Light <lightalan@gmail.com>.
2020-12-11 15:16:05 +01:00
Lars Ingebrigtsen
0aa4647f9c Restrict the range of image formats to be converted
* lisp/image/image-converter.el (image-converter--filter-formats):
New function.
(image-converter): Mention this in the doc string.
2020-08-22 15:18:15 +02:00
Philip K
f45e79233c Fix Libravatar federation handling
* lisp/image/gravatar.el (gravatar--service-libravatar): Implement
correct algorithm (bug#40354).
2020-08-18 21:19:21 +02:00
Philip K
ea0e09cf2c Fix Libravatar federation handling
* lisp/image/gravatar.el (gravatar--service-libravatar): Implement
correct algorithm (bug#40354).
2020-08-18 21:18:06 +02:00
Lars Ingebrigtsen
23e6c36645 Implement a cache for all types of gravatars
* lisp/image/gravatar.el (gravatar-automatic-caching): Made obsolete.
(gravatar-cache-ttl): Ditto.
(gravatar--cache): New variable to cache gravatars in-memory.
(gravatar-retrieve): Maintain the cache.
(gravatar--prune-cache): Remove old entries.
(gravatar-retrieved): Remove use of the old-style cache (bug#40355).
2020-08-18 16:45:29 +02:00
Lars Ingebrigtsen
e1f09607e0 Make n'/p' in image-mode also find externally converted images
* lisp/image-file.el (image-file-name-regexp): Use it to make
`n'/`p' in image mode work (bug#39994).

* lisp/image/image-converter.el
(image-converter-file-name-extensions): New variable to keep track
of all suffixes.
(image-convert-p): Update.
(image-converter--find-converter): Set.
2020-08-03 09:14:52 +02:00
Lars Ingebrigtsen
50a12de877 Make gravatar-build-url respect dynamically bound variables again
* lisp/image/gravatar.el (gravatar-build-url): Compute
query-string first, so that dynamically bound values of
`gravatar-rating' (etc.) are respected, instead of computing it
when the callback happens.
2020-07-31 04:19:03 +02:00
Lars Ingebrigtsen
a0b18d3cc2 Make libravatar lookups asynchronous
* lisp/gnus/gnus-gravatar.el (gnus-gravatar-insert): Fix check for
repeated gravatars, which is now easier to trigger now that things
are more asynchronous.

* lisp/image/gravatar.el (gravatar--service-libravatar): Fetch the
data asynchronously (bug#40676).
(gravatar-service-alist): Adjust all providers so they are
asynchronous.
(gravatar-build-url): Adjust caller to be asynchronous.
(gravatar-retrieve): Ditto.
(gravatar-retrieve-synchronously): Ditto.
2020-07-30 05:32:16 +02:00
Lars Ingebrigtsen
28bf56b871 Don't default to librgravatar, since there are security implications
* lisp/image/gravatar.el (gravatar-service): Change the default
from libravatar, since that has privacy concerns (bug#40676).
2020-07-29 08:47:29 +02:00
Glenn Morris
477b9eaf45 Merge from origin/emacs-27
05089a4d65 (origin/emacs-27) Tweak wording re constant variables
a1040861f1 Tweak setcar-related wording
751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend...
9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor...
e1d42da0d6 Fix mutability glitches reported by Drew Adams
5805df74f5 Improve mutability doc
dca35b31d0 Improve mutability documentation
81e7d7f111 Document that quoting yields constants
5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu...
14a570afae Remove #' and function quoting from lambda forms in manual
d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ...
4df8a61117 Add new node "Image Mode" to Emacs Manual.
d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701)
5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo.
eebfb72c90 Document constant vs mutable objects better
6c187ed6b0 Improve documentation of 'sort-lines'
52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta...
067b070598 ; Fix some typos and doc issues (bug#40695)

# Conflicts:
#	etc/NEWS
2020-04-20 07:50:19 -07:00
Štěpán Němec
067b070598 ; Fix some typos and doc issues (bug#40695) 2020-04-18 17:10:02 +02:00
Glenn Morris
fa4eec5cfa Merge from origin/emacs-27
c6e0981b96 (origin/emacs-27) * lisp/image/image-converter.el: Fix cus...
461bd9cc20 Fix url-cookie.el for lexical binding
f3ccfb1926 ; * src/decompress.c: Fix comment style.
1af03e7e92 ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo.
93945fcd19 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit
ee47e00f4e Don't suggest setting face-remapping-alist to a literal (B...
c2b8ce4439 Calc: don't treat nil as an integer (bug#40155)
e1f0e08922 * lisp/files.el (directory-files-recursively): Doc fix.  (...
02b3820315 Document how to disable Tramp file archives
2020-03-30 07:50:37 -07:00
Juri Linkov
c6e0981b96 * lisp/image/image-converter.el: Fix customization of image-converter.
* lisp/image/image-converter.el (image-convert-p): Update
image-converter-regexp when image-converter was customized (bug#39994).
2020-03-30 02:16:12 +03:00
Robert Pluim
e906cd0d58 Fix gravatar tests
* lisp/image/gravatar.el (gravatar--service-libravatar): Don't error
when failing to parse email address, just return the default URL.

* test/lisp/image/gravatar-tests.el (gravatar-build-url): Adjust
for new default gravatar url.
2020-03-24 22:21:26 +01:00
Philip K
421eeff243 Add support for multiple Gravatar services
Now supports Libravatar and Unicornify, next to Gravatar (Bug#39965).

* lisp/image/gravatar.el (gravatar-base-url): Remove constant.
(gravatar-service-alist): List supported services.
(gravatar-service): Add user option to specify service, defaults to
Libravatar.
(gravatar--service-libravatar): New function, libravatar image host
resolver implementation.
(gravatar-build-url): Use alist gravatar-service-alist instead of
gravatar-base-url.
* etc/NEWS: Mention new gravatar service option.
2020-03-24 17:56:01 +01:00
Lars Ingebrigtsen
d801d1d8cc Don't have exif bugging out on short strings
* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.
2020-03-19 16:17:48 +01:00
Lars Ingebrigtsen
0128375a50 Don't have exif bugging out on short strings
* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.
2020-03-19 16:15:24 +01:00
Juri Linkov
f8254aad14 * lisp/image/image-converter.el: Support more ImageMagick versions (bug#39994)
* lisp/image/image-converter.el (image-converter--probe): Match
a possible additional second column in some ImageMagick versions
of "convert -list format".
2020-03-15 01:58:58 +02:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Lars Ingebrigtsen
f5667953f7 Give better error messages in image-convert
* lisp/image/image-converter.el (image-convert): Make
image-convert bug out earlier on a wrong IMAGE-FORMAT value
(bug#38310).
2019-11-22 13:15:46 +01:00
Lars Ingebrigtsen
832bdaf6e5 Rewrite the image-convert doc string
* lisp/image/image-converter.el (image-convert): Clarify the
calling convention (bug#38310).
2019-11-21 13:59:37 +01:00
Lars Ingebrigtsen
067a42f8dd Allow eww to display exotic images like webp
* lisp/image.el (image-type): Allow passing in the image type.
(create-image): Make conversion work with data in addition to files.

* lisp/image/image-converter.el (image-convert-p): Allow taking
working on data in addition to files (bug#38036).
(image-convert): Ditto.
(image-converter--convert): Extend signature to say whether we're
getting a file or data.
(image-converter--convert-magick): Convert data.
(image-converter--convert): Ditto.
2019-11-19 11:47:25 +01:00
Lars Ingebrigtsen
7ce00e9a8b Fix image-converter probes
* lisp/image/image-converter.el (image-converter--probe): Check
that the executable exists before trying to call it.
2019-10-30 01:02:48 +01:00
Lars Ingebrigtsen
1997e3b80f Fix image-converter probing
* lisp/image/image-converter.el (image-converter--find-converter):
Stop probing on the first successful probe.
2019-10-29 21:42:39 +01:00
Lars Ingebrigtsen
150bf03107 Change the commands in image-converter--converters to lists
* lisp/image/image-converter.el (image-converter--converters):
Change format of the commands to lists.
(image-converter--probe, image-converter--convert): Adjust usages.
2019-09-30 06:29:27 +02:00
Lars Ingebrigtsen
58847eaf0d Try ImageMagick last for external image converters
* lisp/image/image-converter.el (image-converter--converters):
Move ImageMagick last in the list.
2019-09-29 13:44:55 +02:00
Lars Ingebrigtsen
f19879c36a Remove duplicated image conversion defcustom
* lisp/image/image-converter.el (convert-external-images): Remove
defcustom that was accidentally not removed when moving to
image.el (and renamed).
2019-09-29 13:26:33 +02:00
Eli Zaretskii
82c79220f5 Improve documentation of image conversion feature
* lisp/image/image-converter.el (image-converter)
(image-convert-p, image-convert):
* lisp/image.el (convert-images-externally):
* etc/NEWS:
* doc/lispref/display.texi (Defining Images): Fix recently
added documentation.
2019-09-29 10:09:56 +03:00
Lars Ingebrigtsen
63f4f02aa7 If requested, use external image converters for exotic formats
* doc/lispref/display.texi (Defining Images): Document it.

* lisp/image.el (convert-images-externally): New variable.
(image-type): Use it.
(create-image): Convert images.

* lisp/image/image-converter.el (image-converter--convert): New file.
2019-09-29 01:26:12 +02:00
Lars Ingebrigtsen
0c9a9d4219 Adjust the exif.el interface functions
* lisp/image/exif.el (exif-parse-buffer): New function.
(exif-orientation): Ditto.
(exif-error): New error symbol, and adjust all error signalling to
only use that signal.
2019-09-22 14:21:47 +02:00
Lars Ingebrigtsen
b5afd295cc Fix some commentary typos in exif.el
* lisp/image/exif.el (exif--parse-exif-chunk)
(exif--parse-directory): Commentary typo fixes.
2019-09-21 18:27:53 +02:00
Lars Ingebrigtsen
535b65875e Add an Exif parsing library
* lisp/image/exif.el: New file (bug#23070).

* test/lisp/image/exif-tests.el: Add some basic tests.
2019-09-21 18:13:11 +02:00
Basil L. Contovounesios
eddf4664d7 Make gravatar.el more configurable
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html

* etc/NEWS: Announce changes in gravatar.el user options.

* lisp/image/gravatar.el (gravatar-cache-ttl): Change :type to
number of seconds without changing the default value and while still
accepting other timestamp formats.
(gravatar-rating): Restrict :type to ratings recognized by Gravatar.
(gravatar-size): Allow nil as a value, in which case Gravatar's
default size is used.
(gravatar-default-image, gravatar-force-default): New user options
controlling the Gravatar query parameters 'default' and
'forcedefault', respectively.
(gravatar-base-url): Use HTTPS.
(gravatar--query-string): New helper function to facilitate testing.
(gravatar-build-url): Use it.

* test/lisp/image/gravatar-tests.el (gravatar-size)
(gravatar-default-image, gravatar-force-default)
(gravatar-build-url): New tests.
2019-08-02 16:33:30 +03:00
Basil L. Contovounesios
b4b1eda7fb Fix some minor gravatar.el issues
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html
* lisp/image/gravatar.el (gravatar-hash): Trim leading and trailing
whitespace in given address, as per the Gravatar docs.
(gravatar-retrieve-synchronously): Silence call to
url-retrieve-synchronously for consistency with gravatar-retrieve.
(gravatar-retrieved): Only cache buffer on successful retrieval.
* test/lisp/image/gravatar-tests.el: New file.
2019-08-02 16:33:30 +03:00
Basil L. Contovounesios
cf569e520e DRY in gravatar.el
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html
* lisp/image/gravatar.el (gravatar-data->image): Remove.
(gravatar-retrieve, gravatar-retrieve-synchronously): Reuse
url-fetch-from-cache and gravatar-retrieved to reduce duplication.
(gravatar-retrieved): Only cache buffer if url-current-object is
non-nil and return result of callback.  This affords reusing this
function in cached URL buffers.
2019-08-02 16:33:30 +03:00
Basil L. Contovounesios
60eb0a4834 Use lexical-binding for Gravatar support
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html
* lisp/gnus/gnus-gravatar.el: Use lexical-binding.  Link custom
group 'gnus-gravatar' to 'gravatar'.
(gnus-gravatar-size, gnus-gravatar-too-ugly): Doc fix.
(gnus-gravatar-insert): Check liveness of article buffer sooner.
(gnus-treat-from-gravatar, gnus-treat-mail-gravatar): Use
interactive spec "p" instead of emulating it.
* lisp/image/gravatar.el: Use lexical-binding.
(gravatar-cache-expired): Remove.  Change all callers to use
url-cache-expired instead.
(gravatar-get-data, gravatar-retrieve)
(gravatar-retrieve-synchronously): Simplify.
2019-08-02 16:33:30 +03:00
Glenn Morris
1ac0cfa264 Merge from origin/emacs-26
8fbe462 (origin/emacs-26) ; * doc/lispref/positions.texi (List Motion...
1d9efc0 Add index for "\( in strings" (Bug#25195)
304e96f Fix doc-string of 'fit-window-to-buffer' (Bug#36848)
d4c4987 Update view-mode docstring
d6ca1fc ; * lisp/term.el: Add missing / to esc seq commentary.
b3e2073 Fix subproc listening when setting filter to non-t (Bug#36591)
f671950 * etc/NEWS.25: Belatedly announce rcirc-reconnect-delay.
7f42277 Mention term.el's \032 dir tracking in commentary (Bug#19524)
16a529e Remove upload functionality of package-x from the elisp manual
78e6c2a * etc/AUTHORS: Update.
086a56e Clarify Gravatar docs
0592467 * doc/lispref/display.texi (Defining Faces): Say a face can't...

# Conflicts:
#	doc/emacs/programs.texi
#	etc/AUTHORS
#	lisp/term.el
2019-07-30 21:42:34 -07:00
Basil L. Contovounesios
086a56ed43 Clarify Gravatar docs
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html
* doc/misc/gnus.texi (X-Face): Fix cross-reference.
(Gravatars):
* lisp/gnus/gnus-gravatar.el (gnus-gravatar-too-ugly):
* lisp/image/gravatar.el (gravatar-cache-ttl, gravatar-rating)
(gravatar-size): Clarify user option descriptions.
(gravatar-retrieve, gravatar-retrieve-synchronously): Document
return value.
2019-07-23 09:30:39 +01:00
Basil L. Contovounesios
f02b9e9a6f Use lexical-binding in compface.el
* lisp/image/compface.el: Use lexical-binding.  Extend Keywords
header.
(uncompface): Call call-process-region directly.
2019-07-21 02:16:09 +01:00
Lars Ingebrigtsen
86c3d9280e Remove XEmacs compat code from gravatar.el
* lisp/image/gravatar.el (gravatar-retrieve): Remove XEmacs compat code
2019-06-20 12:51:39 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
4fa90ff8f5 Merge from origin/emacs-26
e5a2933 (origin/emacs-26) lisp/vc/: documentation fixes
f21f8e6 Document 'desktop-files-not-to-save'
d8917eb Improve documentation of Profiling features
b228839 Improve indexing of "performance" in ELisp manual
ab67b3e Minor change in Emacs manual's VC chapter
c352434 Avoid memory corruption with specpdl overflow + edebug (Bug#3...
593bbda Document comment-fill-column in the manual (Bug#11636)
bd4cc8d * doc/emacs/dired.texi (Marks vs Flags): Copyedits.
69107f3 ; Fix doc typos related to indefinite articles
aaad1e6 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
5906418 More fixes for the Emacs manual
9ab3df1 ; Fix doc typos related to indefinite articles
66a4e65 ; Fix doc typos related to indefinite articles
35e5c57 ; Fix doc typos related to indefinite articles
2018-02-17 07:50:28 -08:00
Glenn Morris
69107f347b ; Fix doc typos related to indefinite articles 2018-02-16 17:33:57 -05:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
c75f505dea Prefer nil to (current-time) when either works
* doc/misc/gnus.texi (Category Syntax):
* lisp/allout-widgets.el (allout-widgets-post-command-business):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay)
(pulse-tick):
* lisp/cedet/semantic.el (bovinate):
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-current-symbol-default, semantic-adebug-analyze):
* lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag):
* lisp/cedet/semantic/lex.el (semantic-lex-test):
* lisp/cedet/semantic/symref/filter.el:
(semantic-symref-test-count-hits-in-tag):
* lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary):
* lisp/cedet/srecode/map.el (srecode-adebug-maps):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/epa.el (epa--show-key):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p):
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles)
(gnus-agent-expire-group-1, gnus-agent-store-article):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data)
(gnus-cloud-collect-full-newsrc):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/gnus-html.el (gnus-html-cache-expired):
* lisp/gnus/gnus-score.el (gnus-score-load-file)
(gnus-decay-scores):
* lisp/gnus/nndiary.el (nndiary-expired-article-p):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/gnus/score-mode.el (gnus-score-edit-insert-date):
* lisp/image/gravatar.el (gravatar-cache-expired):
* lisp/net/newst-backend.el (newsticker--image-get)
(newsticker--cache-mark-expired):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-agenda.el (org-agenda-to-appt):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org/org-colview.el (org-columns-edit-value, org-columns)
(org-columns-compute-all, org-agenda-columns):
* lisp/org/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds)
(org-timer-show-remaining-time, org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe, org-read-date-analyze)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/time.el (emacs-uptime):
* lisp/type-break.el (type-break-mode, type-break)
(type-break-time-warning-schedule, type-break-check):
* lisp/url/url-cache.el (url-cache-expired):
* lisp/url/url.el (url-retrieve-synchronously):
* test/lisp/char-fold-tests.el (char-fold--speed-test):
* test/manual/cedet/semantic-ia-utest.el:
(semantic-symref-test-count-hits-in-tag):
* test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test)
(semantic-lex-test-full-depth):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
2017-10-20 19:42:23 -07:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Lars Ingebrigtsen
91ea60cf58 Avoid using mm-util functoins in gravatar.el
* lisp/image/gravatar.el (gravatar-retrieve): Avoid using
mm-util functions.
(gravatar-retrieve-synchronously): Ditto.
2016-02-24 13:07:34 +11:00
Lars Ingebrigtsen
21fe2ebec8 Move low-level library files from the lisp/gnus directory
The files moved from lisp/gnus are:

auth-source.el -> /
compface.el -> /image
ecomplete.el -> /
flow-fill.el -> /mail
gravatar.el -> /image
gssapi.el -> /net
html2text.el -> /net
ietf-drums.el -> /mail
mail-parse.el -> /mail
mail-prsvr.el -> /mail
mailcap.el -> /net
plstore.el -> /
pop3.el -> /net
qp.el -> /mail
registry.el -> /
rfc1843.el -> /international
rfc2045.el -> /mail
rfc2047.el -> /mail
rfc2231.el -> /mail
rtree.el -> /
sieve-manage.el -> /net
sieve-mode.el -> /net
sieve.el -> /net
starttls.el -> /net
utf7.el -> /international
yenc.el -> /mail
2016-02-24 13:04:03 +11:00