1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

239 Commits

Author SHA1 Message Date
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
8b5e92921e Remove :group from a recent defcustom
* lisp/image.el (convert-images-externally): Remove :group.
2019-09-29 02:16:41 +02: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
776872766c Make the image keymaps not extend after the image
* lisp/image.el (insert-image): Make all the properties
rear-nonsticky.  Before this change, the keymap would extend after
the image.
2019-07-28 22:48:18 +02:00
Basil L. Contovounesios
b728620a75 Allow counter-clockwise rotations in image-rotate
* lisp/image.el (image-rotate): Extend with an optional argument
specifying the rotation in degrees (bug#35421).
* doc/lispref/display.texi (Showing Images):
* etc/NEWS: Document the change.
* test/lisp/image-tests.el (image-rotate): New test.
2019-07-20 16:00:31 +01:00
Alan Third
610fb73ab6 Add native image rotation and cropping
* lisp/image.el (image--get-imagemagick-and-warn): Only fallback to
ImageMagick if native transforms aren't available.
* src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): New
macros for matrix manipulation.
(HAVE_NATIVE_SCALING, HAVE_NATIVE_TRANSFORMS): Rename and change all
relevant locations.
* src/image.c (x_set_image_rotation):
(x_set_transform): New functions.
(x_set_image_size): Use transform matrix for resizing under X and NS.
(x_set_image_crop): New function.
(lookup_image): Use the new transform functions.
(Fimage_scaling_p, Fimage_transforms_p): Rename and update all
callers.
* src/nsimage.m (ns_load_image): Remove rotation code.
(ns_image_set_transform): New function.
([EmacsImage dealloc]): Release the saved transform.
([EmacsImage rotate:]): Remove unneeded method.
([EmacsImage setTransform:]): New method.
* src/nsterm.h (EmacsImage): Add transform property and update method
definitions.
* src/nsterm.m (ns_dumpglyphs_image): Use the transform to draw the
image correctly.
* src/xterm.c (x_composite_image): Use PictOpSrc as we don't care
about alpha values here.
* doc/lispref/display.texi (Image Descriptors): Add :rotation.
(ImageMagick Images): Remove :rotation.
2019-06-05 22:28:46 +01:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
Paul Eggert
db9af10394 For SVG, 8192 is the new 256
Prefer librsvg for display of splash.svg
When both librsvg and Imagemagick are available, Emacs should
prefer librsvg to render SVG images.  However, Emacs was using
Imagemagick to render its own splash.svg file because
image-type-from-file-header returned nil for that file.
* lisp/image.el (image-type-from-buffer)
(image-type-from-file-header): Look at the first 8192 bytes of
the image, not just the first 256.  For Emacs’s own splash.svg
file, image-type-header-regexps needs to look at 939 bytes.
8192 bytes is a reasonable number nowadays given typical file
system design.
* test/lisp/image-tests.el (image-tests--emacs-images-directory):
New contant.
(image-type-from-file-header-test): New test.
2019-05-18 10:01:10 -07:00
Glenn Morris
50d00e7153 Merge from origin/emacs-26
037970f Document insert-image-file's return value (Bug#32978)
598b45a Autoload cua-toggle-rectangle-mark (Bug#34947)
95bd56d Tell xclip not to expect job-control under eshell (Bug#35257)
9997bbb ; * src/emacs.c: Fix typo in comment (Bug#35320).
a4ad7be Fix off-by-one-link error in image--set-property
2019-04-21 07:51:36 -07:00
Basil L. Contovounesios
a4ad7bed18 Fix off-by-one-link error in image--set-property
* lisp/image.el (image--set-property): Ensure new value is set even
in the unlikely case that the plist is empty.  Fix off-by-one-link
error when deleting a property. (bug#35285)
* test/lisp/image-tests.el: New file.
(image--set-property): New test.
2019-04-18 16:07:55 +01:00
Paul Eggert
476066e89d Avoid some double-rounding of Lisp timestamps
Also, simplify some time-related Lisp timestamp code
while we’re in the neighborhood.
* lisp/battery.el (battery-linux-proc-acpi)
(battery-linux-sysfs, battery-upower, battery-bsd-apm):
* lisp/calendar/timeclock.el (timeclock-seconds-to-string)
(timeclock-log, timeclock-last-period)
(timeclock-entry-length, timeclock-entry-list-span)
(timeclock-find-discrep, timeclock-generate-report):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-decay-1):
* lisp/emacs-lisp/ert.el (ert--results-update-stats-display)
(ert--results-update-stats-display-maybe):
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/emacs-lisp/timer.el (timer-until)
(timer-event-handler):
* lisp/erc/erc-backend.el (erc-server-send-ping)
(erc-server-send-queue, erc-handle-parsed-server-response)
(erc-handle-unknown-server-response):
* lisp/erc/erc-track.el (erc-buffer-visible):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p)
(erc-cmd-PING, erc-send-current-line):
* lisp/eshell/em-pred.el (eshell-pred-file-time):
* lisp/eshell/em-unix.el (eshell-show-elapsed-time):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
* lisp/gnus/gnus-int.el (gnus-backend-trace):
* lisp/gnus/gnus-sum.el (gnus-user-date):
* lisp/gnus/mail-source.el (mail-source-delete-crash-box):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/ibuf-ext.el (ibuffer-mark-old-buffers):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/mouse.el (mouse--down-1-maybe-follows-link)
(mouse--click-1-maybe-follows-link):
* lisp/mpc.el (mpc--faster-toggle):
* lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE)
(rcirc-sentinel):
* lisp/net/tramp-cache.el (tramp-get-file-property):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/org/org-clock.el (org-clock-resolve):
(org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds):
* lisp/org/org.el (org-evaluate-time-range):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/pixel-scroll.el (pixel-scroll-in-rush-p):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cpp.el (cpp-progress-message):
* lisp/progmodes/flymake.el (flymake--handle-report):
* lisp/progmodes/js.el (js--wait-for-matching-output):
* lisp/subr.el (progress-reporter-do-update):
* lisp/term/xterm.el (xterm--read-event-for-query):
* lisp/time.el (display-time-update, emacs-uptime):
* lisp/tooltip.el (tooltip-delay):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-queue.el (url-queue-prune-old-entries):
* lisp/url/url.el (url-retrieve-synchronously):
* lisp/xt-mouse.el (xterm-mouse-event):
Avoid double-rounding of time-related values.  Simplify.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
When hoping for the best (unlikely), use a better decoded time.
(icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time.
* lisp/calendar/timeclock.el (timeclock-when-to-leave):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle):
* lisp/org/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
Use time-since instead of open-coding most of it.
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel):
* lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt):
Now obsolete.  All uses changed.
(erc-time-diff): Accept all Lisp time values.
All uses changed.
* lisp/gnus/gnus-demon.el (gnus-demon-idle-since):
* lisp/gnus/gnus-score.el (gnus-score-headers):
* lisp/gnus/nneething.el (nneething-make-head):
* lisp/gnus/nnheader.el (nnheader-message-maybe):
* lisp/gnus/nnimap.el (nnimap-keepalive):
* lisp/image.el (image-animate-timeout):
* lisp/mail/feedmail.el (feedmail-rfc822-date):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/newst-backend.el (newsticker--image-get):
* lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333):
* lisp/obsolete/xesam.el (xesam-refresh-entry):
* lisp/org/org-agenda.el (org-agenda-show-clocking-issues)
(org-agenda-check-clock-gap, org-agenda-to-appt):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-columns-edit-value)
(org-columns, org-agenda-columns):
* lisp/org/org-duration.el (org-duration-from-minutes):
* lisp/org/org-element.el (org-element-cache-sync-duration)
(org-element-cache-sync-break)
(org-element--cache-interrupt-p, org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-table.el (org-table-sum):
* lisp/org/org-timer.el (org-timer-show-remaining-time)
(org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-today)
(org-auto-repeat-maybe, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/ses.el (ses--time-check):
* lisp/type-break.el (type-break-time-warning)
(type-break-statistics, type-break-demo-boring):
* lisp/url/url-cache.el (url-cache-expired)
(url-cache-prune-cache):
* lisp/vc/vc-git.el (vc-git-stash-snapshot):
* lisp/erc/erc-match.el (erc-log-matches-come-back):
Simplify.
2019-02-22 18:33:57 -08:00
Glenn Morris
83a9133e35 Merge from origin/emacs-26
ff9c962 ; * lisp/ldefs-boot.el: Update.
b4a251c * ; ChangeLog.3 update
d3104e3 * etc/AUTHORS: Update.
a19bfb7 Remove .art from the default list of ImageMagick extensions
6985caa Fix input after setting x-wait-for-event-timeout nil
715388a Fix two warnings in eshell.texi
d49cdd9 * lisp/minibuffer.el (completion-table-dynamic): Improve docs...
5dc4e51 * lisp/emacs-lisp/debug.el (debug-on-variable-change): Doc fi...
76ef805 Fix a typo in ELisp manual
b5e66f4 Update citations of Internet RFCs
57ece2a Fix handling of manpage references divided by hyphenation
7ad0cd6 * doc/misc/eshell.texi: Fix some @ref's.
12b7940 Fix a typo in lispref/syntax.texi

# Conflicts:
#	lisp/gnus/nnrss.el
#	lisp/mail/ietf-drums.el
2019-02-20 12:07:22 -08:00
Glenn Morris
a19bfb7a5e Remove .art from the default list of ImageMagick extensions
It seems that .art files can be non-image files that
ImageMagick mistakenly treats as extremely large images.
Real .art images seem rare.
* lisp/image.el (imagemagick-enabled-types): Remove ART.  (Bug#22289)
2019-02-19 22:04:19 -08:00
Glenn Morris
08bc407a22 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
2019-01-30 09:12:15 -08:00
Benjamin Riefenstahl
b6c762a520 create-image: Expand documentation (bug#33990)
* lisp/image.el (create-image): Discuss default for :scale in the doc
string.
2019-01-25 10:20:55 +02:00
Alan Third
a1b7a3f2a3 Add native image scaling (bug#33587)
* configure.ac: Test for XRender outside of xft checks.
* src/Makefile.in (XRENDER_LIBS): List XRender libs separately from
xft libs.
* lisp/image.el (image--get-imagemagick-and-warn): Allow resizing if
native scaling is available.
* src/dispextern.h: Add XRender and image scaling stuff.
(struct image): Add XRender Pictures.
* src/image.c (x_create_bitmap_mask):
(image_create_x_image_and_pixmap): Handle XRender Picture.
(scale_image_size):
(compute_image_size): Make available when any form of scaling is
enabled.
(x_set_image_size): New function.
(lookup_image): Set image size.
(x_create_x_image_and_pixmap): Create XRender Picture when necessary.
(x_put_x_image): Handle the case where desired size != actual size.
(free_image): Free XRender Pictures.
(Fimage_scaling_p): New function.
(syms_of_image): Add image-scaling-p.
* src/nsimage.m (ns_load_image): Remove NS specific resizing.
([EmacsImage setSizeFromSpec:]): Remove method.
(ns_image_set_size): New function.
* src/nsterm.m (ns_draw_fringe_bitmap): Cocoa and GNUstep both have
the same compositing functions, so remove unnecessary difference.
* src/xterm.c (x_composite_image): New function.
(x_draw_image_foreground): Use new x_composite_image function.
* doc/lispref/display.texi (Image Descriptors): Document
image-scaling-p and add resizing descriptors.
(ImageMagick Images): Remove resizing descriptors.
2019-01-10 19:24:20 +00: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
Paul Eggert
f18af6cd5c Audit use of lsh and fix glitches
I audited use of lsh in the Lisp source code, and fixed the
glitches that I found.  While I was at it, I replaced uses of lsh
with ash when either will do.  Replacement is OK when either
argument is known to be nonnegative, or when only the low-order
bits of the result matter, and is a (minor) win since ash is a bit
more solid than lsh nowadays, and is a bit faster.
* lisp/calc/calc-ext.el (math-check-fixnum):
Prefer most-positive-fixnum to (lsh -1 -1).
* lisp/vc/vc-hg.el (vc-hg-state-fast): When testing fixnum width,
prefer (zerop (ash most-positive-fixnum -32)) to (zerop (lsh -1
32)) (Bug#32485#11).
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode):
Tighten sanity-check for bytecode overflow, by checking that the
result of (ash pc -8) is nonnegative.  Formerly this check was not
needed since lsh was used and the number overflowed differently.
* lisp/net/dns.el (dns-write): Fix some obvious sign typos in
shift counts.  Evidently this part of the code has never been
exercised.
* lisp/progmodes/hideif.el (hif-shiftleft, hif-shiftright):
* lisp/term/common-win.el (x-setup-function-keys):
Simplify.
* admin/unidata/unidata-gen.el, admin/unidata/uvs.el:
* doc/lispref/keymaps.texi, doc/lispref/syntax.texi:
* doc/misc/calc.texi, doc/misc/cl.texi, etc/NEWS.19:
* lisp/arc-mode.el, lisp/calc/calc-bin.el, lisp/calc/calc-comb.el:
* lisp/calc/calc-ext.el, lisp/calc/calc-math.el:
* lisp/cedet/semantic/wisent/comp.el, lisp/composite.el:
* lisp/disp-table.el, lisp/dos-fns.el, lisp/edmacro.el:
* lisp/emacs-lisp/bindat.el, lisp/emacs-lisp/byte-opt.el:
* lisp/emacs-lisp/bytecomp.el, lisp/emacs-lisp/cl-extra.el:
* lisp/erc/erc-dcc.el, lisp/facemenu.el, lisp/gnus/message.el:
* lisp/gnus/nndoc.el, lisp/gnus/nnmaildir.el, lisp/image.el:
* lisp/international/ccl.el, lisp/international/fontset.el:
* lisp/international/mule-cmds.el, lisp/international/mule.el:
* lisp/json.el, lisp/mail/binhex.el, lisp/mail/rmail.el:
* lisp/mail/uudecode.el, lisp/md4.el, lisp/net/dns.el:
* lisp/net/ntlm.el, lisp/net/sasl.el, lisp/net/socks.el:
* lisp/net/tramp.el, lisp/obsolete/levents.el:
* lisp/obsolete/pgg-parse.el, lisp/org/org.el:
* lisp/org/ox-publish.el, lisp/progmodes/cc-defs.el:
* lisp/progmodes/ebnf2ps.el, lisp/progmodes/hideif.el:
* lisp/ps-bdf.el, lisp/ps-print.el, lisp/simple.el:
* lisp/tar-mode.el, lisp/term/common-win.el:
* lisp/term/tty-colors.el, lisp/term/xterm.el, lisp/vc/vc-git.el:
* lisp/vc/vc-hg.el, lisp/x-dnd.el, test/src/data-tests.el:
Prefer ash to lsh when either will do.
2018-08-21 13:44:32 -07:00
Robert Pluim
c0a0351249 Obsolete image-jpeg-p
* lisp/image.el (image-jpeg-p): Declare obsolete.
2018-05-31 17:14:28 +02:00
Glenn Morris
db71b31827 Merge from origin/emacs-26
5a6bb01 (origin/emacs-26) Fix building etc/DOC in the MSDOS port
274c979 * lisp/select.el (gui-get-selection): Doc fix.
ad731b0 ; * doc/lispref/display.texi (Temporary Displays): Fix typos.
f1450e9 Complete documentation of syntax flags by adding `c'
6bdcaec Fix typos and minor wording issues in ELisp manual
febac27 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
6c2e21e Avoid segfault in processes of type 'pipe'
60e10c5 Remove repetitions in documentation strings
208e752 * lisp/image.el (image-load-path): Doc fix.
92e0fd8 ; * etc/NEWS: Remove a FIXME.  (Bug#31122)

Conflicts:
	etc/NEWS
2018-04-14 07:50:45 -07:00
Eli Zaretskii
208e7520b6 * lisp/image.el (image-load-path): Doc fix. 2018-04-12 15:44:06 +03:00
Charles A. Roelli
08aa6a0533 Improve and make use of 'image--get-image'
* lisp/image.el (image--get-image): Add documentation, and
check overlays for images too (since function 'put-image' from
the same library uses overlays to insert images).
(image-save): Use 'image--get-image'.
2018-03-11 11:13:47 +01:00
Glenn Morris
ea2008aeeb Quieten without-x, without-xml2 builds
* lisp/help.el (x-display-pixel-height, x-display-pixel-width):
* lisp/image.el (image-flush, image-size):
* lisp/textmodes/sgml-mode.el (libxml-parse-html-region):
Declare for compiler.
2018-02-26 22:47:27 -08:00
Glenn Morris
98f4e336e8 Merge from origin/emacs-26
333d6f4 (origin/emacs-26) More changes in the Emacs manual
52ca0d1 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors.
69e8046 Don't signal error in vc-deduce-backend
f568c91 * doc/misc/tramp.texi: Index more user options.
92ca881 Minor change in the Emacs manual
e055a12 NEWS update about 'string-trim'
96b6e24 Clarify TRAMP process-environment interaction (Bug#30419)
4fa467e * lisp/progmodes/grep.el (grep-num-matches-found): New variable.
a22820a Avoid aborts in cm.c due to too small TTY frame
26f6441 Another set of improvements in the Emacs manual
cef3b42 Fix help in mode-line-mode-menu
f8a493c Improve documentation of desktop restoring
10637af Improve the Emacs manual's chapter "Frames"
d924953 Fix unbound mm-uu-entry in mm-uu
cb2487b Improve Emacs user manual in fixit.texi
66e9527 Another minor change in the manual
6a1c03d More minor changes in the Emacs manual
32fb8c4 Avoid printing garbled error message from image.el

Conflicts:
	etc/NEWS
	lisp/image.el
2018-02-13 09:26:20 -08:00
Eli Zaretskii
32fb8c4c33 Avoid printing garbled error message from image.el
* lisp/image.el (image--get-imagemagick-and-warn): Don't use
apostrophe in the error message, as that message is shown from a
unibyte buffer, and will run afoul of the default style of showing
quote characters.  (Bug#30405)
2018-02-10 09:51:00 +02: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
Alan Third
e4f2061ebc Add image resizing and rotation to NS port
* lisp/image.el (image--get-imagemagick-and-warn): Bypass imagemagick
check when using NS.
* src/nsimage.m (ns_load_image): Add rotation and resizing
functionality. Move the getMetaData call to before the resize/rotation
so it returns correct metadata.
(EmacsImage::setSizeFromSpec, EmacsImage::rotate): New functions.
* src/nsterm.h (EmacsImage): Add new function prototypes.
(NSCompositingOperationCopy): Add define to older equivalent for
GNUstep and pre-10.12 macOS.
* configure.ac: Don't use libjpeg on Cocoa.
2017-12-03 22:41:05 +00:00
Andy Moreton
613db8d35c Don't reject PBM header whitespace unnecessarily
* lisp/image.el (image-type-header-regexps):
Allow two or more CRs or LFs in initial whitespace sequences.  See:
http://netpbm.sourceforge.net/doc/pbm.html
2017-10-16 01:24:27 -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
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Evgeny Zajcev
0b3f8ca863 Support for rawrgb images using imagemagick
* src/image.c (imagemagick_load_image): Set wand size before loading
blob when ':width' and ':height' are provided.

* lisp/image.el (image-format-suffixes): Add 'image/x-rgb'.
2016-12-02 12:09:31 +02:00
Tino Calancha
5ffdbe0a5e Update parameter :version to 26.1 in several defcustom
Following defcustom where added or modified for 25.2 release.
In fact all these changes belong to 26.1 release.
* lisp/battery.el (battery-linux-sysfs-regexp)
* lisp/comint.el (comint-password-prompt-regexp)
* lisp/dired.el (dired-always-read-filesystem)
* lisp/image.el (image-scaling-factor)
* lisp/ibuf-ext.el (ibuffer-never-search-content-name)
(ibuffer-never-search-content-mode)
* lisp/mouse.el (mouse-select-region-move-to-beginning)
* lisp/net/net-utils.el (iwconfig-program, iwconfig-program-options)
(netstat-program, route-program, route-program-options)
* lisp/net/sieve-manage.el (sieve-manage-default-stream)
* lisp/progmodes/grep.el (grep-save-buffers)
* lisp/vc/add-log.el (change-log-directory-files)
* lisp/url/url-vars.el (url-user-agent)
* lisp/vc/vc-hg.el (vc-hg-symbolic-revision-styles)
(vc-hg-use-file-version-for-mode-line-version)
(vc-hg-parse-hg-data-structures)
* lisp/wdired.el (wdired-create-parent-directories)
* lisp/faces.el (homoglyph, nobreak-hyphen, read-multiple-choice-face)
* lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
(gnus-button-url-regexp)
* lisp/window.el (switch-to-buffer-preserve-window-point)
* lisp/ibuffer.el (ibuffer-formats, ibuffer-locked-char)
(ibuffer-locked-buffer)
* lisp/textmodes/flyspell.el (flyspell-sort-corrections-function)
* lisp/emacs-lisp/edebug.el (edebug-sit-on-break)
* lisp/gnus/message.el (message-user-fqdn)
* lisp/simple.el (shell-command-dont-erase-buffer)
(extended-command-suggest-shorter)
* lisp/net/shr.el (shr-use-fonts)
* lisp/files.el (mounted-file-systems, kill-emacs-query-functions)
2016-11-17 00:39:43 +09:00
Tino Calancha
2db3307e8a image-type-from-file-name: Perform a case insensitive match
Fix Bug#24317
* lisp/image.el (image-type-from-file-name): Bind case-fold-search
to a non-nil value to force a case insensitive match.
* lisp/image-dired.el (image-dired-rotate-original):
Use image-type (Bug#24317).
(image-dired-get-exif-file-name): Idem.
Set 'no-exif-data-found' and 'data' in same setq call.
Use file-attribute-modification-time.
2016-09-04 11:09:31 +09:00
Tino Calancha
7c16c89c57 image-increase-size: Fix non-interactive calls
* lisp/image.el (image-increase-size, image-decrease-size):
Compute a floating point division.
Problem reported in:
https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00067.html
2016-09-04 10:59:07 +09:00
Lars Ingebrigtsen
8d73c252be Fix invalid image rotations
* lisp/image.el (image-rotate): Limit rotation to 360 degrees.
2016-08-24 00:31:57 +02:00
Katsumi Yamaoka
439f3c3e56 Make gif animation work (bug#24004)
* lisp/image.el (image-animate-timeout): Fix the logic that tests if
an animation is too big (bug#24004).
2016-07-19 07:34:54 +00:00
Stefan Monnier
5e17f50911 * lisp/image.el: Use lexical-binding
(image-scaling-factor, imagemagick-types-inhibit)
(imagemagick-enabled-types): Remove redundant :group.
(image--get-image): Apply de-Morgan and use car-safe.
(image-compute-scaling-factor): Use the argument.
2016-05-23 15:12:24 -04:00
Glenn Morris
d5f42ab6f0 * lisp/image.el (image--get-image): Remove nonsensical code.
; 1) put-image does not add a display property to its overlay
; 2) it does add a display text property
; 3) an overlay is not a cons whose car is 'image
2016-05-23 12:51:44 -04:00
Glenn Morris
9c969e1f84 * lisp/image.el (image--get-image): Avoid requiring a library for
one trivial operation.
2016-05-23 12:48:19 -04:00
Paul Eggert
c6493c68f8 Fix seq requirement that broke bootstrap
* lisp/image.el (image--get-image): Require seq here, not at the
top level, to avoid ‘(require seq) while preparing to dump’ while
bootstrapping.  Suggested by Tino Calancha in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00477.html
2016-05-23 08:13:20 -07:00
Nicolas Petton
2dc0ef2942
Add missing dependencies to seq.el
* lisp/emacs-lisp/find-func.el:
* lisp/ibuffer.el:
* lisp/image.el: Require seq.
2016-05-22 21:51:11 +02:00
Lars Ingebrigtsen
9ec81c5a6e Add an animation sanity check
* lisp/image.el (image-multi-frame-p): Give up on animations
if it seems like they are too slow (bug#23431).
2016-05-04 01:37:01 +02:00
Lars Ingebrigtsen
6b3d64854f Revert "alas, a map can have only one parent"
This reverts commit d05806fda1.

This had already been fixed by using `make-composed-map'.  And
we don't want image-map to inherit from special-mode-map, anyway.
2016-05-02 20:08:48 +02:00
Sam Steingold
d05806fda1 alas, a map can have only one parent
* lisp/image-mode.el (image-model-map): Cannot have two parents.
* lisp/image.el (image-map): Inherit from `special-mode-map'.
2016-05-02 11:47:40 -04:00
Lars Ingebrigtsen
ad1879b7be Make (setf (image-property ...)) return VALUE
* lisp/image.el (image--set-property): Return VALUE, not IMAGE.
2016-02-23 12:26:30 +11:00
Lars Ingebrigtsen
3007b422b6 Rework the image property getter/setters
* doc/lispref/display.texi (Defining Images): Document the
renamed `image-get/set-property' functions.

* lisp/image.el (image--set-property): Rename from
image-set-property.
(image-property): Declare a setf form.
(image-property): Rename from `image-get-property'.
2016-02-22 12:50:40 +11:00