1. 05 Jun, 2019 1 commit
    • Alan Third's avatar
      Add native image rotation and cropping · 610fb73a
      Alan Third authored
      * 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.
      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
      * 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
      * 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.
  2. 25 May, 2019 1 commit
    • Paul Eggert's avatar
      Go back to "Maintainer: emacs-devel@gnu.org" · f744797a
      Paul Eggert authored
      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.
  3. 20 May, 2019 1 commit
  4. 18 May, 2019 1 commit
    • Paul Eggert's avatar
      For SVG, 8192 is the new 256 · db9af103
      Paul Eggert authored
      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.
  5. 18 Apr, 2019 1 commit
    • Basil L. Contovounesios's avatar
      Fix off-by-one-link error in image--set-property · a4ad7bed
      Basil L. Contovounesios authored
      * 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.
  6. 23 Feb, 2019 1 commit
    • Paul Eggert's avatar
      Avoid some double-rounding of Lisp timestamps · 476066e8
      Paul Eggert authored
      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)
      * lisp/emacs-lisp/timer-list.el (list-timers):
      * lisp/emacs-lisp/timer.el (timer-until)
      * lisp/erc/erc-backend.el (erc-server-send-ping)
      (erc-server-send-queue, erc-handle-parsed-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)
      * lisp/mpc.el (mpc--faster-toggle):
      * lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE)
      * lisp/net/tramp-cache.el (tramp-get-file-property):
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p)
      * 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)
      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)
      * 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-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)
      * 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)
      * lisp/vc/vc-git.el (vc-git-stash-snapshot):
      * lisp/erc/erc-match.el (erc-log-matches-come-back):
  7. 20 Feb, 2019 1 commit
  8. 25 Jan, 2019 1 commit
  9. 10 Jan, 2019 1 commit
    • Alan Third's avatar
      Add native image scaling (bug#33587) · a1b7a3f2
      Alan Third authored
      * 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.
      (compute_image_size): Make available when any form of scaling is
      (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.
  10. 01 Jan, 2019 1 commit
  11. 21 Aug, 2018 1 commit
    • Paul Eggert's avatar
      Audit use of lsh and fix glitches · f18af6cd
      Paul Eggert authored
      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
      * lisp/progmodes/hideif.el (hif-shiftleft, hif-shiftright):
      * lisp/term/common-win.el (x-setup-function-keys):
      * 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.
  12. 31 May, 2018 1 commit
  13. 12 Apr, 2018 1 commit
  14. 11 Mar, 2018 1 commit
    • Charles A. Roelli's avatar
      Improve and make use of 'image--get-image' · 08aa6a05
      Charles A. Roelli authored
      * 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'.
  15. 27 Feb, 2018 1 commit
    • Glenn Morris's avatar
      Quieten without-x, without-xml2 builds · ea2008ae
      Glenn Morris authored
      * 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.
  16. 10 Feb, 2018 1 commit
    • Eli Zaretskii's avatar
      Avoid printing garbled error message from image.el · 32fb8c4c
      Eli Zaretskii authored
      * 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)
  17. 01 Jan, 2018 1 commit
  18. 03 Dec, 2017 1 commit
    • Alan Third's avatar
      Add image resizing and rotation to NS port · e4f2061e
      Alan Third authored
      * 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.
  19. 16 Oct, 2017 1 commit
  20. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      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.
  21. 01 Jan, 2017 1 commit
  22. 02 Dec, 2016 1 commit
  23. 16 Nov, 2016 1 commit
    • Tino Calancha's avatar
      Update parameter :version to 26.1 in several defcustom · 5ffdbe0a
      Tino Calancha authored
      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)
      * 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)
      * 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)
      * lisp/window.el (switch-to-buffer-preserve-window-point)
      * lisp/ibuffer.el (ibuffer-formats, ibuffer-locked-char)
      * 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)
      * lisp/net/shr.el (shr-use-fonts)
      * lisp/files.el (mounted-file-systems, kill-emacs-query-functions)
  24. 04 Sep, 2016 2 commits
  25. 23 Aug, 2016 1 commit
  26. 19 Jul, 2016 1 commit
  27. 23 May, 2016 4 commits
  28. 22 May, 2016 1 commit
  29. 03 May, 2016 1 commit
  30. 02 May, 2016 2 commits
  31. 23 Feb, 2016 1 commit
  32. 22 Feb, 2016 1 commit
    • Lars Ingebrigtsen's avatar
      Rework the image property getter/setters · 3007b422
      Lars Ingebrigtsen authored
      * doc/lispref/display.texi (Defining Images): Document the
      renamed `image-get/set-property' functions.
      * lisp/image.el (image--set-property): Rename from
      (image-property): Declare a setf form.
      (image-property): Rename from `image-get-property'.
  33. 20 Feb, 2016 1 commit
  34. 10 Feb, 2016 2 commits