commit d1fb5e6c49383c67df136efe2d34a5d3cfed78fd (HEAD, refs/remotes/origin/master) Author: Nicolas Petton Date: Wed Sep 30 10:12:26 2015 +0200 * lisp/arc-mode.el (archive-rar-summarize): Better alignment of the columns. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 7d2cab3..cf071e2 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -2064,10 +2064,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (setq files (nreverse files)) (goto-char (point-min)) (let* ((format (format " %%s %%s %%%ds %%5s %%s" maxsize)) - (sep (format format "--------" "-----" (make-string maxsize ?-) + (sep (format format "----------" "-----" (make-string maxsize ?-) "-----" "")) (column (length sep))) - (insert (format format " Date " "Time " "Size " "Ratio" " Filename") "\n") + (insert (format format " Date " "Time " "Size" "Ratio" "Filename") "\n") (insert sep (make-string maxname ?-) "\n") (archive-summarize-files (mapcar (lambda (desc) (let ((text commit 25979c8e35e0f4fdb21b873b6976177df0b02e02 Author: Nicolas Petton Date: Wed Sep 30 10:04:09 2015 +0200 Use unar and lsar to handle RAR archives in arc-mode * lisp/arc-mode.el (archive-rar-extract, archive-extract-by-file): Rely on unar and lsar instead of unrar-free for RAR archives (Bug#17663). diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index f852f2d..7d2cab3 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1162,7 +1162,7 @@ using `make-temp-file', and the generated name is returned." nil `(:file ,stdout-file) nil - (append (cdr command) (list archive name dest))) + `(,archive ,name ,@(cdr command) ,dest)) (with-temp-buffer (insert-file-contents stdout-file) (goto-char (point-min)) @@ -2038,27 +2038,26 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (maxsize 5) (files ())) (with-temp-buffer - (call-process "unrar-free" nil t nil "--list" (or file copy)) + (call-process "lsar" nil t nil "-l" (or file copy)) (if copy (delete-file copy)) (goto-char (point-min)) - (re-search-forward "^-+\n") - (while (looking-at (concat " \\(.*\\)\n" ;Name. - ;; Size ; Packed. - " +\\([0-9]+\\) +[0-9]+" - ;; Ratio ; Date' - " +\\([0-9%]+\\) +\\([-0-9]+\\)" - ;; Time ; Attr. - " +\\([0-9:]+\\) +[^ \n]\\{6,10\\}" - ;; CRC; Meth ; Var. - " +[0-9A-F]+ +[^ \n]+ +[0-9.]+\n")) + (re-search-forward "^\\(\s+=+\s?+\\)+\n") + (while (looking-at (concat "^\s+[0-9.]+\s+-+\s+" ; Flags + "\\([0-9-]+\\)\s+" ; Size + "\\([0-9.%]+\\)\s+" ; Ratio + "\\([0-9a-zA-Z]+\\)\s+" ; Mode + "\\([0-9-]+\\)\s+" ; Date + "\\([0-9:]+\\)\s+" ; Time + "\\(.*\\)\n" ; Name + )) (goto-char (match-end 0)) - (let ((name (match-string 1)) - (size (match-string 2))) + (let ((name (match-string 6)) + (size (match-string 1))) (if (> (length name) maxname) (setq maxname (length name))) (if (> (length size) maxsize) (setq maxsize (length size))) (push (vector name name nil nil ;; Size, Ratio. - size (match-string 3) + size (match-string 2) ;; Date, Time. (match-string 4) (match-string 5)) files)))) @@ -2091,7 +2090,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." ;; The code below assumes the name is relative and may do undesirable ;; things otherwise. (error "Can't extract files with non-relative names") - (archive-extract-by-file archive name '("unrar-free" "--extract") "All OK"))) + (archive-extract-by-file archive name `("unar" "-no-directory" "-o") "Successfully extracted"))) ;;; Section: Rar self-extracting .exe archives. commit 9a241ddfff0ad51782b8ea2e45042c6e941e2a95 Author: Vibhav Pant Date: Wed Sep 30 13:18:17 2015 +0530 ; * Add admin/MAINTAINERS entries * Add entries for Vibhav Pant. * Add entries for files in lisp/net that don't have a maintainer. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index ba8edbc..8a158e4 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -237,6 +237,10 @@ Dmitry Gutov lisp/whitespace.el lisp/vc/* +Vibhav Pant + lisp/net/browse-url.el + lisp/erc/* + ============================================================================== 3. ============================================================================== @@ -515,7 +519,57 @@ lisp/mouse.el lisp/mpc.el lisp/msb.el lisp/mwheel.el -lisp/net/* +lisp/net/ange-ftp.el +lisp/net/dig.el +lisp/net/dns.el +lisp/net/eudcb-bbdb.el +lisp/net/eudcb-ldap.el +lisp/net/eudcb-mab.el +lisp/net/eudc-bob.el +lisp/net/eudcb-ph.el +lisp/net/eudc.el +lisp/net/eudc-export.el +lisp/net/eudc-hotlist.el +lisp/net/eudc-vars.el +lisp/net/eww.el +lisp/net/gnutls.el +lisp/net/goto-addr.el +lisp/net/hmac-def.el +lisp/net/hmac-md5.el +lisp/net/imap.el +lisp/net/ldap.el +lisp/net/mairix.el +lisp/net/netrc.el +lisp/net/net-utils.el +lisp/net/network-stream.el +lisp/net/newst-backend.el +lisp/net/newsticker.el +lisp/net/newst-plainview.el +lisp/net/newst-reader.el +lisp/net/newst-ticker.el +lisp/net/newst-treeview.el +lisp/net/nsm.el +lisp/net/ntlm.el +lisp/net/pinentry.el +lisp/net/quickurl.el +lisp/net/rcirc.el +lisp/net/rfc2104.el +lisp/net/rlogin.el +lisp/net/sasl-cram.el +lisp/net/sasl-digest.el +lisp/net/sasl.el +lisp/net/sasl-ntlm.el +lisp/net/sasl-scram-rfc.el +lisp/net/shr-color.el +lisp/net/shr.el +lisp/net/snmp-mode.el +lisp/net/soap-client.el +lisp/net/soap-inspect.el +lisp/net/socks.el +lisp/net/telnet.el +lisp/net/tls.el +lisp/net/trampver.el +lisp/net/webjump.el lisp/newcomment.el lisp/novice.el lisp/nxml/* commit afd17a95b835e921f7756da37b8a40e23bd962a8 Author: Wieland Hoffmann Date: Tue Sep 1 18:28:30 2015 +0200 Clarify :create in auth-source's docs * auth-source.el (auth-source-search): Clarify :create's meaning. Copyright-paperwork-exempt: yes diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index f101ecd..32e22eb 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -560,7 +560,7 @@ other properties will always hold scalar values. Typically the :secret property, if present, contains a password. Common search keys are :max, :host, :port, and :user. In -addition, :create specifies how tokens will be or created. +addition, :create specifies if and how tokens will be created. Finally, :type can specify which backend types you want to check. A string value is always matched literally. A symbol is matched commit 3968fa6a44275c16d82704fd29621ac1757bca63 Author: Phil Sainty Date: Wed Sep 30 10:39:21 2015 +0300 Avoid empty -path arguments in rgrep * lisp/progmodes/grep.el (rgrep-default-command): Remove nil from the list produced according to grep-find-ignored-directories, before passing it to Find/Grep invocation. (Bug#21548) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 3240ee8..452a42f 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1039,16 +1039,18 @@ to specify a command to run." ;; we should use shell-quote-argument here " -path " (mapconcat - #'(lambda (ignore) - (cond ((stringp ignore) - (shell-quote-argument - (concat "*/" ignore))) - ((consp ignore) - (and (funcall (car ignore) dir) - (shell-quote-argument - (concat "*/" - (cdr ignore))))))) - grep-find-ignored-directories + 'identity + (delq nil (mapcar + #'(lambda (ignore) + (cond ((stringp ignore) + (shell-quote-argument + (concat "*/" ignore))) + ((consp ignore) + (and (funcall (car ignore) dir) + (shell-quote-argument + (concat "*/" + (cdr ignore))))))) + grep-find-ignored-directories)) " -o -path ") " " (shell-quote-argument ")") commit 47089e0cc85906831f5d078d460a581ad70d963a Author: Eli Zaretskii Date: Wed Sep 30 10:19:41 2015 +0300 Clarify documentation of pos-visible-in-window-p * src/window.c (Fpos_visible_in_window_p): Clarify the meaning of t for POS. See http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg01040.html for the original report. * doc/lispref/windows.texi (Window Start and End): Clarify the meaning of t for the POSITION argument of pos-visible-in-window-p. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 00161b2..881d364 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -3179,7 +3179,7 @@ Locations that are partially obscured are not considered visible unless @var{partially} is non-@code{nil}. The argument @var{position} defaults to the current position of point in @var{window}; @var{window}, to the selected window. If @var{position} is @code{t}, that means to check the -last visible position in @var{window}. +first visible position of the last visible screen line in @var{window}. This function considers only vertical scrolling. If @var{position} is out of view only because @var{window} has been scrolled horizontally, diff --git a/src/window.c b/src/window.c index 42a2ca6..0f35066 100644 --- a/src/window.c +++ b/src/window.c @@ -1686,8 +1686,9 @@ Return nil if that position is scrolled vertically out of view. If a character is only partially visible, nil is returned, unless the optional argument PARTIALLY is non-nil. If POS is only out of view because of horizontal scrolling, return non-nil. If POS is t, it -specifies the position of the last visible glyph in WINDOW. POS -defaults to point in WINDOW; WINDOW defaults to the selected window. +specifies the position of the first glyph displayed on the last visible +screen line in WINDOW. POS defaults to point in WINDOW; WINDOW defaults +to the selected window. If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, the return value is a list of 2 or 6 elements (X Y [RTOP RBOT ROWH VPOS]), commit e1877439d889e5584dabfd769338367f186e0741 Author: Stefan Monnier Date: Tue Sep 29 23:28:32 2015 -0400 * lisp/progmodes/prolog.el: Fix various indentation cases (prolog-operator-chars): New const (add \\). (prolog-smie-forward-token, prolog-smie-backward-token): Use it. (prolog-smie-rules): Add rules according to bug#21526. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 3d9b0c3..ff2769e 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -840,6 +840,8 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (require 'smie) +(defconst prolog-operator-chars "-\\\\#&*+./:<=>?@\\^`~") + (defun prolog-smie-forward-token () ;; FIXME: Add support for 0', if needed after adding it to ;; syntax-propertize-functions. @@ -848,7 +850,7 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (point) (progn (cond ((looking-at "[!;]") (forward-char 1)) - ((not (zerop (skip-chars-forward "#&*+-./:<=>?@\\^`~")))) + ((not (zerop (skip-chars-forward prolog-operator-chars)))) ((not (zerop (skip-syntax-forward "w_'")))) ;; In case of non-ASCII punctuation. ((not (zerop (skip-syntax-forward "."))))) @@ -861,8 +863,8 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (buffer-substring-no-properties (point) (progn (cond - ((memq (char-before) '(?! ?\;)) (forward-char -1)) - ((not (zerop (skip-chars-backward "#&*+-./:<=>?@\\^`~")))) + ((memq (char-before) '(?! ?\; ?\,)) (forward-char -1)) + ((not (zerop (skip-chars-backward prolog-operator-chars)))) ((not (zerop (skip-syntax-backward "w_'")))) ;; In case of non-ASCII punctuation. ((not (zerop (skip-syntax-backward "."))))) @@ -947,12 +949,36 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." ;; ; c) ;; ;; based on the space between the open paren and the "a". - (unless (and (smie-rule-parent-p "(") + (unless (and (smie-rule-parent-p "(" ";") (save-excursion (smie-indent-forward-token) (smie-backward-sexp 'halfsexp) - (not (eq ?\( (char-before))))) + (if (smie-rule-parent-p "(") + (not (eq (char-before) ?\()) + (smie-indent-backward-token) + (smie-rule-bolp)))) prolog-indent-width)) + (`(:after . ";") + ;; Align with same-line comment as in: + ;; ; %% Toto + ;; foo + (and (smie-rule-bolp) + (looking-at ";[ \t]*\\(%\\)") + (let ((offset (- (save-excursion (goto-char (match-beginning 1)) + (current-column)) + (current-column)))) + ;; Only do it for small offsets, since the comment may actually be + ;; an "end-of-line" comment at comment-column! + (if (<= offset prolog-indent-width) offset)))) + (`(:after . ",") + ;; Special indent for: + ;; foopredicate(x) :- !, + ;; toto. + (and (eq (char-before) ?!) + (save-excursion + (smie-indent-backward-token) ;Skip ! + (equal ":-" (car (smie-indent-backward-token)))) + (smie-rule-parent prolog-indent-width))) (`(:after . ,(or `":-" `"-->")) prolog-indent-width))) diff --git a/test/indent/prolog.prolog b/test/indent/prolog.prolog index 6bf9437..9ac6df1 100644 --- a/test/indent/prolog.prolog +++ b/test/indent/prolog.prolog @@ -1,16 +1,18 @@ %% -*- mode: prolog; coding: utf-8; fill-column: 78 -*- %% bug#21526 -test1 :- +test21526_1 :- ( a -> - ( a -> - b - ; c - ) - ; c + ( a -> + b + ; c + ) + ; % Toto + c -> + d ). -test2 :- +test21526_2 :- ( a -> ( a, b @@ -19,7 +21,31 @@ test2 :- b2 ; c1, c2 - ) + ). + +test21526_3 :- + X \= Y, + \+ a, + b, + \+ \+ c, + d. + +test21526_4 :- + ( \+ a -> + b + ; \+ c, + \+ d + ). + + +test21526_5 :- + (a; + b -> + c). + +test21526_predicate(c) :- !, + test_goal1, + test_goal2. %% Testing correct tokenizing. foo(X) :- 0'= = X. @@ -74,11 +100,11 @@ subst(X, V, FV, lambda(Y, Ti, Bi), lambda(Y1, To, Bo)) :- %% If X is equal to Y, X is shadowed, so no subst can take place. -> Y1 = Y, Bo = Bi ; (member((Y, _), FV) - %% If Y appears in FV, it can appear in V, so we need to - %% rename it to avoid name capture. - -> new_atom(Y, Y1), - subst(Y, Y1, [], Bi, Bi1) - ; Y1 = Y, Bi1 = Bi), + %% If Y appears in FV, it can appear in V, so we need to + %% rename it to avoid name capture. + -> new_atom(Y, Y1), + subst(Y, Y1, [], Bi, Bi1) + ; Y1 = Y, Bi1 = Bi), %% Perform substitution on the body. subst(X, V, FV, Bi1, Bo) ). commit 300bce3a09da12396a1a686f20ac16acefe80cbc Author: Dmitry Gutov Date: Wed Sep 30 05:17:30 2015 +0300 ; * admin/MAINTAINERS: Add entries for Dmitry Gutov Author: diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index c6a7be1..ba8edbc 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -122,6 +122,13 @@ The GNU AUCTeX maintainers (auctex-devel@gnu.org) lisp/textmodes/reftex-vars.el lisp/textmodes/reftex.el +Dmitry Gutov + lisp/progmodes/ruby-mode.el + test/automated/ruby-mode-tests.el + test/indent/ruby.rb + lisp/progmodes/xref.el + lisp/progmodes/project.el + ============================================================================== 2. ============================================================================== @@ -226,6 +233,10 @@ Xue Fuqiao Tassilo Horn lisp/doc-view.el +Dmitry Gutov + lisp/whitespace.el + lisp/vc/* + ============================================================================== 3. ============================================================================== @@ -590,11 +601,9 @@ lisp/progmodes/octave.el lisp/progmodes/opascal.el lisp/progmodes/pascal.el lisp/progmodes/prog-mode.el -lisp/progmodes/project.el lisp/progmodes/prolog.el lisp/progmodes/ps-mode.el lisp/progmodes/python.el -lisp/progmodes/ruby-mode.el lisp/progmodes/scheme.el lisp/progmodes/sh-script.el lisp/progmodes/simula.el @@ -604,7 +613,6 @@ lisp/progmodes/vera-mode.el lisp/progmodes/verilog-mode.el lisp/progmodes/vhdl-mode.el lisp/progmodes/which-func.el -lisp/progmodes/xref.el lisp/progmodes/xscheme.el lisp/ps-bdf.el lisp/ps-def.el @@ -703,14 +711,12 @@ lisp/type-break.el lisp/uniquify.el lisp/url/* lisp/userlock.el -lisp/vc/* lisp/vcursor.el lisp/version.el lisp/view.el lisp/vt-control.el lisp/vt100-led.el lisp/wdired.el -lisp/whitespace.el lisp/wid-browse.el lisp/wid-edit.el lisp/widget.el @@ -740,4 +746,5 @@ test/rmailmm.el ;;; Local Variables: ;;; coding: utf-8 +;;; indent-tabs-mode: t ;;; End: commit d6b49570f6fe1cfb5314c1b61b81ede0497a06b2 Author: Stefan Monnier Date: Tue Sep 29 21:43:07 2015 -0400 * lisp/progmodes/sh-script.el: Old "dumb" continued line indent (sh-indent-after-continuation): Add new value `always' (bug#17620) (sh-smie-sh-rules): Remove old handling of continued lines. (sh-smie--indent-continuation): New function. (sh-set-shell): Use it. diff --git a/etc/NEWS b/etc/NEWS index e823905..26f0474 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -634,9 +634,13 @@ you can no longer use commas to separate regular expressions. ** SES now supports local printer functions; see `ses-define-local-printer'. -** In sh-mode, you can now use `sh-shell' as a file-local variable to +** sh-script +*** In sh-mode you can now use `sh-shell' as a file-local variable to specify the type of shell in use (bash, csh, etc). +*** New value `always' for sh-indent-after-continuation. +This provides old-style ("dumb") indentation of continued lines. + ** TLS --- *** Fatal TLS errors are now silent by default. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 049c93d..fbb4a90 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1991,9 +1991,30 @@ Does not preserve point." (t tok))))))) (defcustom sh-indent-after-continuation t - "If non-nil, try to make sure text is indented after a line continuation." - :version "24.3" - :type 'boolean + "If non-nil, indent relative to the continued line's beginning. +Continued lines can either be indented as \"one long wrapped line\" without +paying attention to the actual syntactic structure, as in: + + for f \ + in a; do \ + toto; \ + done + +or as lines that just don't have implicit semi-colons between them, as in: + + for f \ + in a; do \ + toto; \ + done + +With `always' you get the former behavior whereas with nil you get the latter. +With t, you get the latter as long as that would indent the continuation line +deeper than the initial line." + :version "25.1" + :type '(choice + (const nil :tag "Never") + (const t :tag "Only if needed to make it deeper") + (const always :tag "Always")) :group 'sh-indentation) (defun sh-smie--continuation-start-indent () @@ -2004,24 +2025,49 @@ May return nil if the line should not be treated as continued." (unless (sh-smie--looking-back-at-continuation-p) (current-indentation)))) +(defun sh-smie--indent-continuation () + (cond + ((not (and sh-indent-after-continuation + (save-excursion + (ignore-errors + (skip-chars-backward " \t") + (sh-smie--looking-back-at-continuation-p))))) + nil) + ((eq sh-indent-after-continuation 'always) + (save-excursion + (forward-line -1) + (if (sh-smie--looking-back-at-continuation-p) + (current-indentation) + (+ (current-indentation) sh-indentation)))) + (t + ;; Just make sure a line-continuation is indented deeper. + (save-excursion + (let ((indent (let ((sh-indent-after-continuation nil)) + (smie-indent-calculate))) + (max most-positive-fixnum)) + (if (not (numberp indent)) indent + (while (progn + (forward-line -1) + (let ((ci (current-indentation))) + (cond + ;; Previous line is less indented, we're good. + ((< ci indent) nil) + ((sh-smie--looking-back-at-continuation-p) + (setq max (min max ci)) + ;; Previous line is itself a continuation. + ;; If it's indented like us, we're good, otherwise + ;; check the line before that one. + (> ci indent)) + (t ;Previous line is the beginning of the continued line. + (setq indent (min (+ ci sh-indentation) max)) + nil))))) + indent)))))) + (defun sh-smie-sh-rules (kind token) (pcase (cons kind token) (`(:elem . basic) sh-indentation) (`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt) (sh-var-value 'sh-indent-for-case-label))) - ((and `(:before . ,_) - ;; After a line-continuation, make sure the rest is indented. - (guard sh-indent-after-continuation) - (guard (save-excursion - (ignore-errors - (skip-chars-backward " \t") - (sh-smie--looking-back-at-continuation-p)))) - (let initial (sh-smie--continuation-start-indent)) - (guard (let* ((sh-indent-after-continuation nil) - (indent (smie-indent-calculate))) - (and (numberp indent) (numberp initial) - (<= indent initial))))) - `(column . ,(+ initial sh-indentation))) (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case")) (if (not (smie-rule-prev-p "&&" "||" "|")) (when (smie-rule-hanging-p) @@ -2363,6 +2409,7 @@ Calls the value of `sh-set-shell-hook' if set." (if (looking-at "[ \t]*\\\\\n") (goto-char (match-end 0)) (funcall orig)))) + (add-hook 'smie-indent-functions #'sh-smie--indent-continuation nil t) (smie-setup (symbol-value (funcall mksym "grammar")) (funcall mksym "rules") :forward-token (funcall mksym "forward-token") commit 90a6f8d0741eb5391c204f059c845c361e615b49 Author: Stefan Monnier Date: Tue Sep 29 15:13:44 2015 -0400 * lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun Remove redundant :group keyword args. (octave-begin-keywords, octave-else-keywords, octave-end-keywords): Remove variables. (octave-operator-table, octave-smie-bnf-table): Use let-when-compile to turn them into compile-time variables. Auto-generate the "foo ... end" rules from the "foo ... endfoo" rules. Add rules for break, continue, return, global, and persistent. Refine the rule for "until". (octave-smie--funcall-p, octave-smie--end-index-p) (octave-smie--in-parens-p): New functions. (octave-smie-backward-token, octave-smie-forward-token): Use them to distinguish the "enumeration" function and the "end" index from their corresponding keywords. (octave--block-offset-keywords): New constant. (octave-smie-rules): Use it. Adjust rules for new global/persistent parsing. (octave-reserved-words): Redefine using octave-smie-grammar. (octave-font-lock-keywords): Use octave-smie--funcall-p and octave-smie--end-index-p. diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 70a2b1a..b54b88d 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -82,25 +82,6 @@ Used in `octave-mode' and `inferior-octave-mode' buffers.") (defvar octave-comment-start-skip "\\(^\\|\\S<\\)\\(?:%!\\|\\s<+\\)\\s-*" "Octave-specific `comment-start-skip' (which see).") -(defvar octave-begin-keywords - '("classdef" "do" "enumeration" "events" "for" "function" "if" "methods" - "parfor" "properties" "switch" "try" "unwind_protect" "while")) - -(defvar octave-else-keywords - '("case" "catch" "else" "elseif" "otherwise" "unwind_protect_cleanup")) - -(defvar octave-end-keywords - '("endclassdef" "endenumeration" "endevents" "endfor" "endfunction" "endif" - "endmethods" "endparfor" "endproperties" "endswitch" "end_try_catch" - "end_unwind_protect" "endwhile" "until" "end")) - -(defvar octave-reserved-words - (append octave-begin-keywords - octave-else-keywords - octave-end-keywords - '("break" "continue" "global" "persistent" "return")) - "Reserved words in Octave.") - (defvar octave-function-header-regexp (concat "^\\s-*\\_<\\(function\\)\\_>" "\\([^=;(\n]*=[ \t]*\\|[ \t]*\\)\\(\\(?:\\w\\|\\s_\\)+\\)\\_>") @@ -231,20 +212,17 @@ parenthetical grouping.") (defcustom octave-font-lock-texinfo-comment t "Control whether to highlight the texinfo comment block." :type 'boolean - :group 'octave :version "24.4") (defcustom octave-blink-matching-block t "Control the blinking of matching Octave block keywords. Non-nil means show matching begin of block when inserting a space, newline or semicolon after an else or end keyword." - :type 'boolean - :group 'octave) + :type 'boolean) (defcustom octave-block-offset 2 "Extra indentation applied to statements in Octave block structures." - :type 'integer - :group 'octave) + :type 'integer) (defvar octave-block-comment-start (concat (make-string 2 octave-comment-char) " ") @@ -252,8 +230,7 @@ newline or semicolon after an else or end keyword." (defcustom octave-continuation-offset 4 "Extra indentation applied to Octave continuation lines." - :type 'integer - :group 'octave) + :type 'integer) (eval-and-compile (defconst octave-continuation-marker-regexp "\\\\\\|\\.\\.\\.")) @@ -274,109 +251,135 @@ newline or semicolon after an else or end keyword." (defcustom octave-mode-hook nil "Hook to be run when Octave mode is started." - :type 'hook - :group 'octave) + :type 'hook) (defcustom octave-send-show-buffer t "Non-nil means display `inferior-octave-buffer' after sending to it." - :type 'boolean - :group 'octave) + :type 'boolean) (defcustom octave-send-line-auto-forward t "Control auto-forward after sending to the inferior Octave process. Non-nil means always go to the next Octave code line after sending." - :type 'boolean - :group 'octave) + :type 'boolean) (defcustom octave-send-echo-input t "Non-nil means echo input sent to the inferior Octave process." - :type 'boolean - :group 'octave) + :type 'boolean) ;;; SMIE indentation (require 'smie) -;; Use '__operators__' in Octave REPL to get a full list. -(defconst octave-operator-table - '((assoc ";" "\n") (assoc ",") ; The doc claims they have equal precedence!? - (right "=" "+=" "-=" "*=" "/=") - (assoc "&&") (assoc "||") ; The doc claims they have equal precedence!? - (assoc "&") (assoc "|") ; The doc claims they have equal precedence!? - (nonassoc "<" "<=" "==" ">=" ">" "!=" "~=") - (nonassoc ":") ;No idea what this is. - (assoc "+" "-") - (assoc "*" "/" "\\" ".\\" ".*" "./") - (nonassoc "'" ".'") - (nonassoc "++" "--" "!" "~") ;And unary "+" and "-". - (right "^" "**" ".^" ".**") - ;; It's not really an operator, but for indentation purposes it - ;; could be convenient to treat it as one. - (assoc "..."))) - -(defconst octave-smie-bnf-table - '((atom) - ;; We can't distinguish the first element in a sequence with - ;; precedence grammars, so we can't distinguish the condition - ;; if the `if' from the subsequent body, for example. - ;; This has to be done later in the indentation rules. - (exp (exp "\n" exp) - ;; We need to mention at least one of the operators in this part - ;; of the grammar: if the BNF and the operator table have - ;; no overlap, SMIE can't know how they relate. - (exp ";" exp) - ("try" exp "catch" exp "end_try_catch") - ("try" exp "catch" exp "end") - ("unwind_protect" exp - "unwind_protect_cleanup" exp "end_unwind_protect") - ("unwind_protect" exp "unwind_protect_cleanup" exp "end") - ("for" exp "endfor") - ("for" exp "end") - ("parfor" exp "endparfor") - ("parfor" exp "end") - ("do" exp "until" atom) - ("while" exp "endwhile") - ("while" exp "end") - ("if" exp "endif") - ("if" exp "else" exp "endif") - ("if" exp "elseif" exp "else" exp "endif") - ("if" exp "elseif" exp "elseif" exp "else" exp "endif") - ("if" exp "elseif" exp "elseif" exp "else" exp "end") - ("switch" exp "case" exp "endswitch") - ("switch" exp "case" exp "otherwise" exp "endswitch") - ("switch" exp "case" exp "case" exp "otherwise" exp "endswitch") - ("switch" exp "case" exp "case" exp "otherwise" exp "end") - ("function" exp "endfunction") - ("function" exp "end") - ("enumeration" exp "endenumeration") - ("enumeration" exp "end") - ("events" exp "endevents") - ("events" exp "end") - ("methods" exp "endmethods") - ("methods" exp "end") - ("properties" exp "endproperties") - ("properties" exp "end") - ("classdef" exp "endclassdef") - ("classdef" exp "end")) - ;; (fundesc (atom "=" atom)) - )) +(let-when-compile + ((operator-table + ;; Use '__operators__' in Octave REPL to get a full list? + '((assoc ";" "\n") (assoc ",") ;The doc says they have equal precedence!? + (right "=" "+=" "-=" "*=" "/=") + (assoc "&&") (assoc "||") ; The doc claims they have equal precedence!? + (assoc "&") (assoc "|") ; The doc claims they have equal precedence!? + (nonassoc "<" "<=" "==" ">=" ">" "!=" "~=") + (nonassoc ":") ;No idea what this is. + (assoc "+" "-") + (assoc "*" "/" "\\" ".\\" ".*" "./") + (nonassoc "'" ".'") + (nonassoc "++" "--" "!" "~") ;And unary "+" and "-". + (right "^" "**" ".^" ".**") + ;; It's not really an operator, but for indentation purposes it + ;; could be convenient to treat it as one. + (assoc "..."))) + + (matchedrules + ;; We can't distinguish the first element in a sequence with + ;; precedence grammars, so we can't distinguish the condition + ;; of the `if' from the subsequent body, for example. + ;; This has to be done later in the indentation rules. + '(("try" exp "catch" exp "end_try_catch") + ("unwind_protect" exp + "unwind_protect_cleanup" exp "end_unwind_protect") + ("for" exp "endfor") + ("parfor" exp "endparfor") + ("while" exp "endwhile") + ("if" exp "endif") + ("if" exp "else" exp "endif") + ("if" exp "elseif" exp "else" exp "endif") + ("if" exp "elseif" exp "elseif" exp "else" exp "endif") + ("switch" exp "case" exp "endswitch") + ("switch" exp "case" exp "otherwise" exp "endswitch") + ("switch" exp "case" exp "case" exp "otherwise" exp "endswitch") + ("function" exp "endfunction") + ("enumeration" exp "endenumeration") + ("events" exp "endevents") + ("methods" exp "endmethods") + ("properties" exp "endproperties") + ("classdef" exp "endclassdef") + )) + + (bnf-table + `((atom) + ;; FIXME: We don't parse these declarations correctly since + ;; SMIE *really* likes to parse "a b = 2 c" as "(a b) = (2 c)". + ;; IOW to do it right, we'd need to change octave-smie-*ward-token + ;; so that the spaces between vars in var-decls are lexed as + ;; something like ",". + ;; Doesn't seem worth the trouble/slowdown for now. + ;; We could hack smie-rules so as to work around the bad parse, + ;; but even that doesn't seem worth the trouble. + (var-decls (atom "=" atom)) ;; (var-decls "," var-decls) + (single-exp (atom "=" atom)) + (exp (exp "\n" exp) + ;; We need to mention at least one of the operators in this part + ;; of the grammar: if the BNF and the operator table have + ;; no overlap, SMIE can't know how they relate. + (exp ";" exp) + ("do" exp "until" single-exp) + ,@matchedrules + ;; For every rule that ends in "endfoo", add a corresponding + ;; rule which uses "end" instead. + ,@(mapcar (lambda (rule) (nconc (butlast rule) '("end"))) + matchedrules) + ("global" var-decls) ("persistent" var-decls) + ;; These aren't super-important, but having them here + ;; makes it easier to extract all keywords. + ("break") ("continue") ("return") + ;; The following rules do not correspond to valid code AFAIK, + ;; but they lead to a grammar that degrades more gracefully + ;; on incomplete/incorrect code. It also helps us in + ;; computing octave--block-offset-keywords. + ("try" exp "end") ("unwind_protect" exp "end") + ) + ;; (fundesc (atom "=" atom)) + ))) (defconst octave-smie-grammar - (smie-prec2->grammar - (smie-merge-prec2s - (smie-bnf->prec2 octave-smie-bnf-table - '((assoc "\n" ";"))) + (eval-when-compile + (smie-prec2->grammar + (smie-merge-prec2s + (smie-bnf->prec2 bnf-table '((assoc "\n" ";"))) + (smie-precs->prec2 operator-table))))) - (smie-precs->prec2 octave-operator-table)))) +(defconst octave-operator-regexp + (eval-when-compile + (regexp-opt (remove "\n" (apply #'append + (mapcar #'cdr operator-table))))))) ;; Tokenizing needs to be refined so that ";;" is treated as two ;; tokens and also so as to recognize the \n separator (and ;; corresponding continuation lines). -(defconst octave-operator-regexp - (regexp-opt (remove "\n" (apply 'append - (mapcar 'cdr octave-operator-table))))) +(defun octave-smie--funcall-p () + "Return non-nil if we're in an expression context. Moves point." + (looking-at "[ \t]*(")) + +(defun octave-smie--end-index-p () + (let ((ppss (syntax-ppss))) + (and (nth 1 ppss) + (memq (char-after (nth 1 ppss)) '(?\( ?\[ ?\{))))) + +(defun octave-smie--in-parens-p () + (let ((ppss (syntax-ppss))) + (and (nth 1 ppss) + (eq ?\( (char-after (nth 1 ppss)))))) (defun octave-smie-backward-token () (let ((pos (point))) @@ -390,10 +393,7 @@ Non-nil means always go to the next Octave code line after sending." (forward-comment (- (point))) nil) t) - ;; Ignore it if it's within parentheses. - (let ((ppss (syntax-ppss))) - (not (and (nth 1 ppss) - (eq ?\( (char-after (nth 1 ppss))))))) + (not (octave-smie--in-parens-p))) (skip-chars-forward " \t") ;; Why bother distinguishing \n and ;? ";") ;;"\n" @@ -403,7 +403,15 @@ Non-nil means always go to the next Octave code line after sending." (goto-char (match-beginning 0)) (match-string-no-properties 0)) (t - (smie-default-backward-token))))) + (let ((tok (smie-default-backward-token))) + (cond + ((equal tok "enumeration") + (if (save-excursion (smie-default-forward-token) + (octave-smie--funcall-p)) + "enumeration (function)" + tok)) + ((equal tok "end") (if (octave-smie--end-index-p) "end (index)" tok)) + (t tok))))))) (defun octave-smie-forward-token () (skip-chars-forward " \t") @@ -417,10 +425,7 @@ Non-nil means always go to the next Octave code line after sending." (not (or (save-excursion (skip-chars-backward " \t") ;; Only add implicit ; when needed. (or (bolp) (eq (char-before) ?\;))) - ;; Ignore it if it's within parentheses. - (let ((ppss (syntax-ppss))) - (and (nth 1 ppss) - (eq ?\( (char-after (nth 1 ppss)))))))) + (octave-smie--in-parens-p)))) (if (eolp) (forward-char 1) (forward-comment 1)) ;; Why bother distinguishing \n and ;? ";") ;;"\n" @@ -436,7 +441,25 @@ Non-nil means always go to the next Octave code line after sending." (goto-char (match-end 0)) (match-string-no-properties 0)) (t - (smie-default-forward-token)))) + (let ((tok (smie-default-forward-token))) + (cond + ((equal tok "enumeration") + (if (octave-smie--funcall-p) + "enumeration (function)" + tok)) + ((equal tok "end") (if (octave-smie--end-index-p) "end (index)" tok)) + (t tok)))))) + +(defconst octave--block-offset-keywords + (let* ((end-prec (nth 1 (assoc "end" octave-smie-grammar))) + (end-matchers + (delq nil + (mapcar (lambda (x) (if (eq end-prec (nth 2 x)) (car x))) + octave-smie-grammar)))) + ;; Not sure if it would harm to keep "switch", but the previous code + ;; excluded it, presumably because there shouldn't be any code on + ;; the lines between "switch" and "case". + (delete "switch" end-matchers))) (defun octave-smie-rules (kind token) (pcase (cons kind token) @@ -445,15 +468,12 @@ Non-nil means always go to the next Octave code line after sending." ;; - changes to octave-block-offset wouldn't take effect immediately. ;; - edebug wouldn't show the use of this variable. (`(:elem . basic) octave-block-offset) + (`(:list-intro . ,(or "global" "persistent")) t) ;; Since "case" is in the same BNF rules as switch..end, SMIE by default ;; aligns it with "switch". (`(:before . "case") (if (not (smie-rule-sibling-p)) octave-block-offset)) (`(:after . ";") - (if (smie-rule-parent-p "classdef" "events" "enumeration" "function" "if" - "while" "else" "elseif" "for" "parfor" - "properties" "methods" "otherwise" "case" - "try" "catch" "unwind_protect" - "unwind_protect_cleanup") + (if (apply #'smie-rule-parent-p octave--block-offset-keywords) (smie-rule-parent octave-block-offset) ;; For (invalid) code between switch and case. ;; (if (smie-rule-parent-p "switch") 4) @@ -473,28 +493,33 @@ Non-nil means always go to the next Octave code line after sending." (comment-choose-indent))))) +(defvar octave-reserved-words + (delq nil + (mapcar (lambda (x) + (setq x (car x)) + (and (stringp x) (string-match "\\`[[:alpha:]]" x) x)) + octave-smie-grammar)) + "Reserved words in Octave.") + (defvar octave-font-lock-keywords (list ;; Fontify all builtin keywords. - (cons (concat "\\_<\\(" - (regexp-opt octave-reserved-words) - "\\)\\_>") + (cons (concat "\\_<" (regexp-opt octave-reserved-words) "\\_>") 'font-lock-keyword-face) - ;; Note: 'end' also serves as the last index in an indexing expression. + ;; Note: 'end' also serves as the last index in an indexing expression, + ;; and 'enumerate' is also a function. ;; Ref: http://www.mathworks.com/help/matlab/ref/end.html + ;; Ref: http://www.mathworks.com/help/matlab/ref/enumeration.html (list (lambda (limit) - (while (re-search-forward "\\_" limit 'move) + (while (re-search-forward "\\_" + limit 'move) (let ((beg (match-beginning 0)) (end (match-end 0))) (unless (octave-in-string-or-comment-p) - (condition-case nil - (progn - (goto-char beg) - (backward-up-list) - (when (memq (char-after) '(?\( ?\[ ?\{)) - (put-text-property beg end 'face nil)) - (goto-char end)) - (error (goto-char end)))))) + (when (if (match-end 1) + (octave-smie--funcall-p) + (octave-smie--end-index-p)) + (put-text-property beg end 'face nil))))) nil)) ;; Fontify all operators. (cons octave-operator-regexp 'font-lock-builtin-face) @@ -609,27 +634,23 @@ Key bindings: (defcustom inferior-octave-program "octave" "Program invoked by `inferior-octave'." - :type 'string - :group 'octave) + :type 'string) (defcustom inferior-octave-buffer "*Inferior Octave*" "Name of buffer for running an inferior Octave process." - :type 'string - :group 'octave) + :type 'string) (defcustom inferior-octave-prompt ;; For Octave >= 3.8, default is always 'octave', see ;; http://hg.savannah.gnu.org/hgweb/octave/rev/708173343c50 "\\(?:^octave\\(?:.bin\\|.exe\\)?\\(?:-[.0-9]+\\)?\\(?::[0-9]+\\)?\\|^debug\\|^\\)>+ " "Regexp to match prompts for the inferior Octave process." - :type 'regexp - :group 'octave) + :type 'regexp) (defcustom inferior-octave-prompt-read-only comint-prompt-read-only "If non-nil, the Octave prompt is read only. See `comint-prompt-read-only' for details." :type 'boolean - :group 'octave :version "24.4") (defcustom inferior-octave-startup-file @@ -639,7 +660,6 @@ See `comint-prompt-read-only' for details." The contents of this file are sent to the inferior Octave process on startup." :type '(choice (const :tag "None" nil) file) - :group 'octave :version "24.4") (defcustom inferior-octave-startup-args '("-i" "--no-line-editing") @@ -647,13 +667,11 @@ startup." For example, for suppressing the startup message and using `traditional' mode, include \"-q\" and \"--traditional\"." :type '(repeat string) - :group 'octave :version "24.4") (defcustom inferior-octave-mode-hook nil "Hook to be run when Inferior Octave mode is started." - :type 'hook - :group 'octave) + :type 'hook) (defcustom inferior-octave-error-regexp-alist '(("error:\\s-*\\(.*?\\) at line \\([0-9]+\\), column \\([0-9]+\\)" @@ -663,8 +681,7 @@ mode, include \"-q\" and \"--traditional\"." "Value for `compilation-error-regexp-alist' in inferior octave." :version "24.4" :type '(repeat (choice (symbol :tag "Predefined symbol") - (sexp :tag "Error specification"))) - :group 'octave) + (sexp :tag "Error specification")))) (defvar inferior-octave-compilation-font-lock-keywords '(("\\_" . compilation-info-face) @@ -995,7 +1012,6 @@ directory and makes this the current buffer's default directory." (defcustom inferior-octave-minimal-columns 80 "The minimal column width for the inferior Octave process." :type 'integer - :group 'octave :version "24.4") (defvar inferior-octave-last-column-width nil) @@ -1180,8 +1196,7 @@ q: Don't fix\n" func file)) (defface octave-function-comment-block '((t (:inherit font-lock-doc-face))) - "Face used to highlight function comment block." - :group 'octave) + "Face used to highlight function comment block.") (eval-when-compile (require 'texinfo)) @@ -1602,7 +1617,6 @@ code line." :type '(choice (const :tag "Automatic" auto) (const :tag "One Line" oneline) (const :tag "Multi Line" multiline)) - :group 'octave :version "24.4") ;; (FN SIGNATURE1 SIGNATURE2 ...) @@ -1661,7 +1675,6 @@ code line." (defcustom octave-help-buffer "*Octave Help*" "Buffer name for `octave-help'." :type 'string - :group 'octave :version "24.4") ;; Used in a mode derived from help-mode. @@ -1786,7 +1799,6 @@ sentence." "A list of directories for Octave sources. If the environment variable OCTAVE_SRCDIR is set, it is searched first." :type '(repeat directory) - :group 'octave :version "24.4") (defun octave-source-directories () diff --git a/test/indent/octave.m b/test/indent/octave.m index a704146..4758f99 100644 --- a/test/indent/octave.m +++ b/test/indent/octave.m @@ -1,6 +1,19 @@ ## -*- mode: octave; coding: utf-8 -*- 0; # Don't make this a function file function res = tcomp (fn) + + global x y ... + z1 z2 + persistent x y ... + z1 z2 + global x y = 2 ... + z1 z2 # FIXME + + do + something + until x = ... + y + %% res = tcomp (fn) %% imports components and rearranges them. @@ -10,6 +23,15 @@ function res = tcomp (fn) data = dlmread(fn, 3, 0); + enumeration + first (1) + second (2) + end + + y = enumeration (x); #Beware: "enumeration" can also be a function! + y = foo(enumeration (x), + 2); #Beware: "enumeration" can also be a function! + x = data(:,2:end); y = 'hello'; z = y'; commit 1fea2f3b743da1db666be7ce34904b74319d3f83 Author: Stefan Monnier Date: Tue Sep 29 15:08:55 2015 -0400 * lisp/emacs-lisp/lisp-mode.el (let-when-compile): Work like let* diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index fec9467..9ce0dfd 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -238,17 +238,21 @@ (throw 'found t)))))) (defmacro let-when-compile (bindings &rest body) - "Like `let', but allow for compile time optimization. -Use BINDINGS as in regular `let', but in BODY each usage should + "Like `let*', but allow for compile time optimization. +Use BINDINGS as in regular `let*', but in BODY each usage should be wrapped in `eval-when-compile'. This will generate compile-time constants from BINDINGS." (declare (indent 1) (debug let)) - (cl-progv (mapcar #'car bindings) - (mapcar (lambda (x) (eval (cadr x))) bindings) - (macroexpand-all - (macroexp-progn - body) - macroexpand-all-environment))) + (letrec ((loop + (lambda (bindings) + (if (null bindings) + (macroexpand-all (macroexp-progn body) + macroexpand-all-environment) + (let ((binding (pop bindings))) + (cl-progv (list (car binding)) + (list (eval (nth 1 binding) t)) + (funcall loop bindings))))))) + (funcall loop bindings))) (let-when-compile ((lisp-fdefs '("defmacro" "defun")) commit b425b3ffb82fbcf07985a27ebe90715af3c1eac4 Author: Eli Zaretskii Date: Tue Sep 29 19:34:25 2015 +0300 nt/INSTALL: Remove references to GTK site That site no longer offers Windows downloads. diff --git a/nt/INSTALL b/nt/INSTALL index 446f2f8..759be32 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -239,7 +239,7 @@ build will run on Windows 9X and newer systems). . pkg-config (invoked by the configure script to look for optional packages) - Available from http://www.gtk.org/download/win32.php + Available from http://sourceforge.net/projects/ezwinports/files/. . gzip (needed to compress files during "make install") @@ -621,12 +621,8 @@ build will run on Windows 9X and newer systems). For PNG images, we recommend to use versions 1.4.x and later of libpng, because previous versions had security issues. You can find - precompiled libraries and headers on the GTK download page for - Windows (http://www.gtk.org/download/win32.php for 32-bit builds and - http://www.gtk.org/download/win64.php for 64-bit builds). The - ezwinports site, http://sourceforge.net/projects/ezwinports/files/ - also offers PNG (as well as other image libraries), which are - usually newer. + precompiled libraries and headers on the ezwinports site, + http://sourceforge.net/projects/ezwinports/files/. Versions 1.4.0 and later of libpng are binary incompatible with earlier versions, so Emacs will only look for libpng libraries which @@ -663,70 +659,32 @@ build will run on Windows 9X and newer systems). libtiffN.dll or libtiff-N.dll or libtiff.dll. These can be found on the ezwinports site. - Pre-built versions of librsvg and its dependencies can be found in - one of these places: - - 1. http://sourceforge.net/projects/ezwinports/files/ - - This site includes a minimal (as much as possible for librsvg) - build of the library and its dependencies; it is also more - up-to-date with the latest upstream versions. However, it - currently only offers 32-bit builds. For building Emacs, you - need to download from this site all of the following *-bin.zip - archives: - - librsvg, gdk-pixbuf, cairo, glib - - The 'bin' archives on this site include both header files and the - libraries needed for building with librsvg and for running Emacs. - The librsvg archive includes all the shared libraries needed to - run Emacs with SVG support; the other 3 packages are required - because the compiler needs to see their header files when - building Emacs. - - 2. GTK project download site for Windows (see above for 2 URLs, - either for 32-bit builds or 64-bit builds) - - This is the official Windows download site of the GTK project. - Its builds of librsvg are fatter, but are currently the only - alternative for 64-bit builds. The easiest way to obtain the - dependencies required for building from this site is to download - a pre-bundled GTK+ development environment for Windows. If you - would nevertheless like to download only the packages that are - strictly required, then, as of the time of this writing, here's - the list of GTK+ packages you will need: - - librsvg, pango, freetype-2.4.11, freetype-2.4.2, croco, cairo, - glib, gdk-pixbuf, fontconfig, libpng-1.4.x, libpng-1.5.x, - libffi, libxml2, zlib - - The GTK download page provides 2 separate archives for each - package: a 'bin' (binary) archive with programs and DLLs, and a - 'dev' (development) archive with header files, import libraries, - and pkg-config files; download and install both archives for each - package you need. (Sources of each package are available in a - separate, 3rd archive.) - - As you see, some libraries for using this site's librsvg are - needed in more than one version -- this is because librsvg and - some of its dependencies were linked against different versions - of those libraries, and will look only for those DLLs when you - invoke SVG function. So there's a bit of "DLL hell" involved - here, but at least in theory this should work, as each library - will dynamically link only against its dependencies, even if - another version of the same library is already loaded. In - particular, at least 2 different versions of libpng will have to - be installed on your machine. When you install these libpng - versions, be sure to keep the header files and the pkg-config - files in sync, i.e. install both the 'bin' and 'dev' archives of - the same libpng version together. + Pre-built versions of librsvg and its dependencies can be found + here: + + http://sourceforge.net/projects/ezwinports/files/ + + This site includes a minimal (as much as possible for librsvg) + build of the library and its dependencies; it is also more + up-to-date with the latest upstream versions. However, it + currently only offers 32-bit builds. For building Emacs, you need + to download from this site all of the following *-bin.zip + archives: + + librsvg, gdk-pixbuf, cairo, glib + + The 'bin' archives on this site include both header files and the + libraries needed for building with librsvg and for running Emacs. + The librsvg archive includes all the shared libraries needed to + run Emacs with SVG support; the other 3 packages are required + because the compiler needs to see their header files when building + Emacs. To use librsvg at runtime, ensure that librsvg and its dependencies are on your PATH, or in the same directory as the emacs.exe binary. If you are downloading from the ezwinports site, you only need to install a single archive, librsvg-X.Y.Z-w32-bin.zip, which includes - all the dependency DLLs. For the GTK project site, download the - 'bin' archives for each of the libraries mentioned above. + all the dependency DLLs. If you think you've got all the dependencies and SVG support is still not working, check your PATH for other libraries that shadow commit 2211052bbf0ca2290216bf0f95348a7d71d4a5c7 Author: Glenn Morris Date: Tue Sep 29 12:31:41 2015 -0400 ; ChangeLog fix diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 224e2a6..a40f8f3 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -1,8 +1,3 @@ -2015-09-20 Ken Manheimer - - * python.el (python-pdbtrack-set-tracked-buffer): Repair pdbtrack - so it follows transition from one remote file to another. - 2015-04-06 Alan Mackenzie Fix miscellaneous glitches in cc-mode.el. (Bug#20245)