commit dde09cdbce0239bba0248a8ed5c1f4d85c5e8476 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Sun May 24 22:38:05 2015 -0400 * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstring (pcase-let): Document the behavior in case the pattern doesn't match. diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 5a81bb2..8c4f4bc 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -47,7 +47,7 @@ ;; to be performed anyway, so better do it first so it's shared). ;; - then choose the test that discriminates more (?). ;; - provide Agda's `with' (along with its `...' companion). -;; - implement (not UPAT). This might require a significant redesign. +;; - implement (not PAT). This might require a significant redesign. ;; - ideally we'd want (pcase s ((re RE1) E1) ((re RE2) E2)) to be able to ;; generate a lex-style DFA to decide whether to run E1 or E2. @@ -71,14 +71,14 @@ (defvar pcase--dontwarn-upats '(pcase--dontcare)) (def-edebug-spec - pcase-UPAT + pcase-PAT (&or symbolp - ("or" &rest pcase-UPAT) - ("and" &rest pcase-UPAT) + ("or" &rest pcase-PAT) + ("and" &rest pcase-PAT) ("guard" form) - ("let" pcase-UPAT form) + ("let" pcase-PAT form) ("pred" pcase-FUN) - ("app" pcase-FUN pcase-UPAT) + ("app" pcase-FUN pcase-PAT) pcase-MACRO sexp)) @@ -108,19 +108,19 @@ ;;;###autoload (defmacro pcase (exp &rest cases) "Perform ML-style pattern matching on EXP. -CASES is a list of elements of the form (UPATTERN CODE...). +CASES is a list of elements of the form (PATTERN CODE...). -UPatterns can take the following forms: +Patterns can take the following forms: _ matches anything. SELFQUOTING matches itself. This includes keywords, numbers, and strings. SYMBOL matches anything and binds it to SYMBOL. - (or UPAT...) matches if any of the patterns matches. - (and UPAT...) matches if all the patterns match. + (or PAT...) matches if any of the patterns matches. + (and PAT...) matches if all the patterns match. 'VAL matches if the object is `equal' to VAL (pred FUN) matches if FUN applied to the object returns non-nil. (guard BOOLEXP) matches if BOOLEXP evaluates to non-nil. - (let UPAT EXP) matches if EXP matches UPAT. - (app FUN UPAT) matches if FUN applied to the object matches UPAT. + (let PAT EXP) matches if EXP matches PAT. + (app FUN PAT) matches if FUN applied to the object matches PAT. If a SYMBOL is used twice in the same pattern (i.e. the pattern is \"non-linear\"), then the second occurrence is turned into an `eq'uality test. @@ -138,7 +138,7 @@ like `(,a . ,(pred (< a))) or, with more checks: Additional patterns can be defined via `pcase-defmacro'. Currently, the following patterns are provided this way:" - (declare (indent 1) (debug (form &rest (pcase-UPAT body)))) + (declare (indent 1) (debug (form &rest (pcase-PAT body)))) ;; We want to use a weak hash table as a cache, but the key will unavoidably ;; be based on `exp' and `cases', yet `cases' is a fresh new list each time ;; we're called so it'll be immediately GC'd. So we use (car cases) as key @@ -200,12 +200,12 @@ Currently, the following patterns are provided this way:" ;;;###autoload (defmacro pcase-lambda (lambda-list &rest body) - "Like `lambda' but allow each argument to be a UPattern. + "Like `lambda' but allow each argument to be a pattern. I.e. accepts the usual &optional and &rest keywords, but every formal argument can be any pattern accepted by `pcase' (a mere variable name being but a special case of it)." (declare (doc-string 2) (indent defun) - (debug ((&rest pcase-UPAT) body))) + (debug ((&rest pcase-PAT) body))) (let* ((bindings ()) (parsed-body (macroexp-parse-body body)) (args (mapcar (lambda (pat) @@ -242,9 +242,9 @@ variable name being but a special case of it)." (defmacro pcase-let* (bindings &rest body) "Like `let*' but where you can use `pcase' patterns for bindings. BODY should be an expression, and BINDINGS should be a list of bindings -of the form (UPAT EXP)." +of the form (PAT EXP)." (declare (indent 1) - (debug ((&rest (pcase-UPAT &optional form)) body))) + (debug ((&rest (pcase-PAT &optional form)) body))) (let ((cached (gethash bindings pcase--memoize))) ;; cached = (BODY . EXPANSION) (if (equal (car cached) body) @@ -257,7 +257,10 @@ of the form (UPAT EXP)." (defmacro pcase-let (bindings &rest body) "Like `let' but where you can use `pcase' patterns for bindings. BODY should be a list of expressions, and BINDINGS should be a list of bindings -of the form (UPAT EXP)." +of the form (PAT EXP). +The macro is expanded and optimized under the assumption that those +patterns *will* match, so a mismatch may go undetected or may cause +any kind of error." (declare (indent 1) (debug pcase-let*)) (if (null (cdr bindings)) `(pcase-let* ,bindings ,@body) @@ -275,7 +278,7 @@ of the form (UPAT EXP)." ;;;###autoload (defmacro pcase-dolist (spec &rest body) - (declare (indent 1) (debug ((pcase-UPAT form) body))) + (declare (indent 1) (debug ((pcase-PAT form) body))) (if (pcase--trivial-upat-p (car spec)) `(dolist ,spec ,@body) (let ((tmpvar (make-symbol "x"))) @@ -381,7 +384,9 @@ of the form (UPAT EXP)." ;;;###autoload (defmacro pcase-defmacro (name args &rest body) - "Define a pcase UPattern macro." + "Define a new kind of pcase PATTERN, by macro expansion. +Patterns of the form (NAME ...) will be expanded according +to this macro." (declare (indent 2) (debug defun) (doc-string 3)) ;; Add the function via `fsym', so that an autoload cookie placed ;; on a pcase-defmacro will cause the macro to be loaded on demand. @@ -452,7 +457,7 @@ Each BRANCH has the form (MATCH CODE . VARS) where CODE is the code generator for that branch. VARS is the set of vars already bound by earlier matches. MATCH is the pattern that needs to be matched, of the form: - (match VAR . UPAT) + (match VAR . PAT) (and MATCH ...) (or MATCH ...)" (when (setq branches (delq nil branches)) @@ -797,7 +802,7 @@ Otherwise, it defers to REST which is a list of branches of the form (pcase--u1 (cons (pcase--match sym (nth 1 upat)) matches) code vars rest))) ((eq (car-safe upat) 'app) - ;; A upat of the form (app FUN UPAT) + ;; A upat of the form (app FUN PAT) (pcase--mark-used sym) (let* ((fun (nth 1 upat)) (nsym (make-symbol "x")) @@ -854,7 +859,7 @@ Otherwise, it defers to REST which is a list of branches of the form (def-edebug-spec pcase-QPAT - (&or ("," pcase-UPAT) + (&or ("," pcase-PAT) (pcase-QPAT . pcase-QPAT) (vector &rest pcase-QPAT) sexp)) @@ -865,7 +870,7 @@ QPAT can take the following forms: (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. [QPAT1 QPAT2..QPATn] matches a vector of length n and QPAT1..QPATn match its 0..(n-1)th elements, respectively. - ,UPAT matches if the UPattern UPAT matches. + ,PAT matches if the pattern PAT matches. STRING matches if the object is `equal' to STRING. ATOM matches if the object is `eq' to ATOM." (declare (debug (pcase-QPAT))) commit c205098b6a8bd3b13256803f86f6863558a7a34e Author: Artur Malabarba Date: Sun May 24 23:38:53 2015 +0100 * lisp/emacs-lisp/tabulated-list.el: New optional print method (tabulated-list-print): New optional argument, UPDATE. If non-nil, the list is printed by only adding and deleting the changed entries, instead of erasing the whole buffer. This method is much faster when few or no entries have changed. * doc/lispref/modes.texi (Tabulated List Mode): Document it. * etc/NEWS: Document it. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index c325506..a8b6bb1 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1055,7 +1055,7 @@ the above variables (in particular, only after setting @code{tabulated-list-format}). @end defun -@defun tabulated-list-print &optional remember-pos +@defun tabulated-list-print &optional remember-pos update This function populates the current buffer with entries. It should be called by the listing command. It erases the buffer, sorts the entries specified by @code{tabulated-list-entries} according to @@ -1065,6 +1065,13 @@ specified by @code{tabulated-list-entries} according to If the optional argument @var{remember-pos} is non-@code{nil}, this function looks for the @var{id} element on the current line, if any, and tries to move to that entry after all the entries are (re)inserted. + +If the optional argument @var{update} is non-@code{nil}, this function +will only erase or add entries that have changed since the last print. +This is several times faster if most entries haven't changed since the +last time this function was called. The only difference in outcome is +that tags placed via @code{tabulated-list-put-tag} will not be removed +from entries that haven't changed (normally all tags are removed). @end defun @node Generic Modes diff --git a/etc/NEWS b/etc/NEWS index 7ad85ba..b922a27 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -205,10 +205,16 @@ font, and (iii) the specified window. `message' and related functions from displaying messages the Echo Area. The output is still logged to the *Messages* buffer. ++++ ** It is now safe for a mode that derives `tabulated-list-mode' to not call `tabulated-list-init-header', in which case it will have no header. ++++ +** `tabulated-list-print' takes a second optional argument, update, +which specifies an alternative printing method which is faster when +few or no entries have changed. + * Editing Changes in Emacs 25.1 diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 9d55ab8..58b8fd6 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -298,7 +298,7 @@ column. Negate the predicate that would be returned if (lambda (a b) (not (funcall sorter a b))) sorter)))) -(defun tabulated-list-print (&optional remember-pos) +(defun tabulated-list-print (&optional remember-pos update) "Populate the current Tabulated List mode buffer. This sorts the `tabulated-list-entries' list if sorting is specified by `tabulated-list-sort-key'. It then erases the @@ -306,7 +306,14 @@ buffer and inserts the entries with `tabulated-list-printer'. Optional argument REMEMBER-POS, if non-nil, means to move point to the entry with the same ID element as the current line and -recenter window line accordingly." +recenter window line accordingly. + +Non-nil UPDATE argument means to use an alternative printing +method which is faster if most entries haven't changed since the +last print. The only difference in outcome is that tags will not +be removed from entries that haven't changed (see +`tabulated-list-put-tag'). Don't use this immediately after +changing `tabulated-list-sort-key'." (let ((inhibit-read-only t) (entries (if (functionp tabulated-list-entries) (funcall tabulated-list-entries) @@ -319,18 +326,47 @@ recenter window line accordingly." (count-screen-lines (window-start) (point)))) (setq entry-id (tabulated-list-get-id)) (setq saved-col (current-column))) - (erase-buffer) - (unless tabulated-list-use-header-line - (tabulated-list-print-fake-header)) ;; Sort the entries, if necessary. (setq entries (sort entries sorter)) (unless (functionp tabulated-list-entries) (setq tabulated-list-entries entries)) + ;; Without a sorter, we have no way to just update. + (when (and update (not sorter)) + (setq update nil)) + (if update (goto-char (point-min)) + ;; Redo the buffer, unless we're just updating. + (erase-buffer) + (unless tabulated-list-use-header-line + (tabulated-list-print-fake-header))) + ;; Finally, print the resulting list. (dolist (elt entries) - (and entry-id - (equal entry-id (car elt)) - (setq saved-pt (point))) - (apply tabulated-list-printer elt)) + (let ((id (car elt))) + (and entry-id + (equal entry-id id) + (setq entry-id nil + saved-pt (point))) + ;; If the buffer this empty, simply print each elt. + (if (eobp) + (apply tabulated-list-printer elt) + (while (let ((local-id (tabulated-list-get-id))) + ;; If we find id, then nothing to update. + (cond ((equal id local-id) + (forward-line 1) + nil) + ;; If this entry sorts after id (or it's the + ;; end), then just insert id and move on. + ((funcall sorter elt + ;; FIXME: Might be faster if + ;; don't construct this list. + (list local-id (tabulated-list-get-entry))) + (apply tabulated-list-printer elt) + nil) + ;; We find an entry that sorts before id, + ;; it needs to be deleted. + (t t))) + (let ((old (point))) + (forward-line 1) + (delete-region old (point))))))) (set-buffer-modified-p nil) ;; If REMEMBER-POS was specified, move to the "old" location. (if saved-pt commit d38350984e557aa492139ffecb9c1a910e763145 Author: Artur Malabarba Date: Sun May 24 22:57:24 2015 +0100 * lisp/emacs-lisp/tabulated-list.el: Improve printing (tabulated-list--get-sorter): New function. (tabulated-list-print): Restore window-line when remember-pos is passed and optimize away the `nreverse'. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 5d10b55..9d55ab8 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -277,6 +277,27 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." (or found (error "No column named %s" name)))) +(defun tabulated-list--get-sorter () + "Return a sorting predicate for the current tabulated-list. +Return nil if `tabulated-list-sort-key' specifies an unsortable +column. Negate the predicate that would be returned if +`tabulated-list-sort-key' has a non-nil cdr." + (when (and tabulated-list-sort-key + (car tabulated-list-sort-key)) + (let* ((sort-column (car tabulated-list-sort-key)) + (n (tabulated-list--column-number sort-column)) + (sorter (nth 2 (aref tabulated-list-format n)))) + (when (eq sorter t); Default sorter checks column N: + (setq sorter (lambda (A B) + (let ((a (aref (cadr A) n)) + (b (aref (cadr B) n))) + (string< (if (stringp a) a (car a)) + (if (stringp b) b (car b))))))) + ;; Reversed order. + (if (cdr tabulated-list-sort-key) + (lambda (a b) (not (funcall sorter a b))) + sorter)))) + (defun tabulated-list-print (&optional remember-pos) "Populate the current Tabulated List mode buffer. This sorts the `tabulated-list-entries' list if sorting is @@ -284,39 +305,27 @@ specified by `tabulated-list-sort-key'. It then erases the buffer and inserts the entries with `tabulated-list-printer'. Optional argument REMEMBER-POS, if non-nil, means to move point -to the entry with the same ID element as the current line." +to the entry with the same ID element as the current line and +recenter window line accordingly." (let ((inhibit-read-only t) (entries (if (functionp tabulated-list-entries) (funcall tabulated-list-entries) tabulated-list-entries)) - entry-id saved-pt saved-col) + (sorter (tabulated-list--get-sorter)) + entry-id saved-pt saved-col window-line) (and remember-pos + (when (eq (window-buffer) (current-buffer)) + (setq window-line + (count-screen-lines (window-start) (point)))) (setq entry-id (tabulated-list-get-id)) (setq saved-col (current-column))) (erase-buffer) (unless tabulated-list-use-header-line (tabulated-list-print-fake-header)) ;; Sort the entries, if necessary. - (when (and tabulated-list-sort-key - (car tabulated-list-sort-key)) - (let* ((sort-column (car tabulated-list-sort-key)) - (n (tabulated-list--column-number sort-column)) - (sorter (nth 2 (aref tabulated-list-format n)))) - ;; Is the specified column sortable? - (when sorter - (when (eq sorter t) - (setq sorter ; Default sorter checks column N: - (lambda (A B) - (setq A (aref (cadr A) n)) - (setq B (aref (cadr B) n)) - (string< (if (stringp A) A (car A)) - (if (stringp B) B (car B)))))) - (setq entries (sort entries sorter)) - (if (cdr tabulated-list-sort-key) - (setq entries (nreverse entries))) - (unless (functionp tabulated-list-entries) - (setq tabulated-list-entries entries))))) - ;; Print the resulting list. + (setq entries (sort entries sorter)) + (unless (functionp tabulated-list-entries) + (setq tabulated-list-entries entries)) (dolist (elt entries) (and entry-id (equal entry-id (car elt)) @@ -327,8 +336,8 @@ to the entry with the same ID element as the current line." (if saved-pt (progn (goto-char saved-pt) (move-to-column saved-col) - (when (eq (window-buffer) (current-buffer)) - (recenter))) + (when window-line + (recenter window-line))) (goto-char (point-min))))) (defun tabulated-list-print-entry (id cols) commit 675c90a3b4c469e2e54e513b6f427ba4ec285ef5 Author: Paul Eggert Date: Sun May 24 14:20:10 2015 -0700 Simpilify etags TEX mode scanning * lib-src/etags.c (TEX_mode, TEX_esc, TEX_opgrp, TEX_clgrp): Remove static vars. (TeX_commands): Deduce escapes here instead. (TEX_LESC, TEX_SESC, TEX_mode): Remove; all uses removed. This removes the need for a reset_input call. diff --git a/lib-src/etags.c b/lib-src/etags.c index 48d2299..301dd3d 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4951,13 +4951,8 @@ static const char *TEX_defenv = "\ :part:appendix:entry:index:def\ :newcommand:renewcommand:newenvironment:renewenvironment"; -static void TEX_mode (FILE *); static void TEX_decode_env (const char *, const char *); -static char TEX_esc = '\\'; -static char TEX_opgrp = '{'; -static char TEX_clgrp = '}'; - /* * TeX/LaTeX scanning loop. */ @@ -4967,8 +4962,8 @@ TeX_commands (FILE *inf) char *cp; linebuffer *key; - /* Select either \ or ! as escape character. */ - TEX_mode (inf); + char TEX_esc = '\0'; + char TEX_opgrp, TEX_clgrp; /* Initialize token table once from environment. */ if (TEX_toktab == NULL) @@ -4980,9 +4975,33 @@ TeX_commands (FILE *inf) for (;;) { /* Look for a TEX escape. */ - while (*cp++ != TEX_esc) - if (cp[-1] == '\0' || cp[-1] == '%') - goto tex_next_line; + while (true) + { + char c = *cp++; + if (c == '\0' || c == '%') + goto tex_next_line; + + /* Select either \ or ! as escape character, whichever comes + first outside a comment. */ + if (!TEX_esc) + switch (c) + { + case '\\': + TEX_esc = c; + TEX_opgrp = '{'; + TEX_clgrp = '}'; + break; + + case '!': + TEX_esc = c; + TEX_opgrp = '<'; + TEX_clgrp = '>'; + break; + } + + if (c == TEX_esc) + break; + } for (key = TEX_toktab; key->buffer != NULL; key++) if (strneq (cp, key->buffer, key->len)) @@ -5020,41 +5039,6 @@ TeX_commands (FILE *inf) } } -#define TEX_LESC '\\' -#define TEX_SESC '!' - -/* Figure out whether TeX's escapechar is '\\' or '!' and set grouping - chars accordingly. */ -static void -TEX_mode (FILE *inf) -{ - int c; - - while ((c = getc (inf)) != EOF) - { - /* Skip to next line if we hit the TeX comment char. */ - if (c == '%') - while (c != '\n' && c != EOF) - c = getc (inf); - else if (c == TEX_LESC || c == TEX_SESC ) - break; - } - - if (c == TEX_LESC) - { - TEX_esc = TEX_LESC; - TEX_opgrp = '{'; - TEX_clgrp = '}'; - } - else - { - TEX_esc = TEX_SESC; - TEX_opgrp = '<'; - TEX_clgrp = '>'; - } - reset_input (inf); -} - /* Read environment and prepend it to the default string. Build token table. */ static void commit 379d77dfa3a03083517114e1ce32bb72137aea05 Author: Paul Eggert Date: Sun May 24 14:20:09 2015 -0700 Improve etags I/O error reporting * lib-src/etags.c: Don't include sys/types.h and sys/stat.h; no longer needed. (infilename): New static var. (process_file_name): Don't call 'stat'. Instead, just open the file for reading and report any errors. Don't bother making a copy of the file argument; it's not needed. Be more careful to use the failing errno when reporting an error. Quote the real name better (though no perfectly) when passing it to the shell. (reset_input): New function, which reports I/O errors. All uses of 'rewind' changed to use this function. (perhaps_more_input): New function, which also checks for I/O errors. All uses of 'feof' changed to use this function. (analyze_regex): Report an error if fclose fails. (readline_internal): Report an error if getc fails. (etags_mktmp): Return an error if close fails. diff --git a/lib-src/etags.c b/lib-src/etags.c index ea337d4..48d2299 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -127,8 +127,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #include #include #include -#include -#include #include #include #include @@ -355,7 +353,7 @@ static void just_read_file (FILE *); static language *get_language_from_langname (const char *); static void readline (linebuffer *, FILE *); -static long readline_internal (linebuffer *, FILE *); +static long readline_internal (linebuffer *, FILE *, char const *); static bool nocase_tail (const char *); static void get_tag (char *, char **); @@ -407,6 +405,7 @@ static ptrdiff_t whatlen_max; /* maximum length of any 'what' member */ static fdesc *fdhead; /* head of file description list */ static fdesc *curfdp; /* current file description */ +static char *infilename; /* current input file name */ static int lineno; /* line number of current line */ static long charno; /* current character number */ static long linecharno; /* charno of start of current line */ @@ -1247,7 +1246,7 @@ main (int argc, char **argv) if (parsing_stdin) fatal ("cannot parse standard input AND read file names from it", (char *)NULL); - while (readline_internal (&filename_lb, stdin) > 0) + while (readline_internal (&filename_lb, stdin, "-") > 0) process_file_name (filename_lb.buffer, lang); } else @@ -1470,7 +1469,6 @@ get_language_from_filename (char *file, int case_sensitive) static void process_file_name (char *file, language *lang) { - struct stat stat_buf; FILE *inf; fdesc *fdp; compressor *compr; @@ -1487,13 +1485,13 @@ process_file_name (char *file, language *lang) compr = get_compressor_from_suffix (file, &ext); if (compr) { - real_name = compressed_name = savestr (file); + compressed_name = file; uncompressed_name = savenstr (file, ext - file); } else { compressed_name = NULL; - real_name = uncompressed_name = savestr (file); + uncompressed_name = file; } /* If the canonicalized uncompressed name @@ -1505,83 +1503,91 @@ process_file_name (char *file, language *lang) goto cleanup; } - if (stat (real_name, &stat_buf) != 0) + inf = fopen (file, "r" FOPEN_BINARY); + if (inf) + real_name = file; + else { - /* Reset real_name and try with a different name. */ - real_name = NULL; - if (compressed_name != NULL) /* try with the given suffix */ + int file_errno = errno; + if (compressed_name) { - if (stat (uncompressed_name, &stat_buf) == 0) + /* Try with the given suffix. */ + inf = fopen (uncompressed_name, "r" FOPEN_BINARY); + if (inf) real_name = uncompressed_name; } - else /* try all possible suffixes */ + else { + /* Try all possible suffixes. */ for (compr = compressors; compr->suffix != NULL; compr++) { compressed_name = concat (file, ".", compr->suffix); - if (stat (compressed_name, &stat_buf) != 0) + inf = fopen (compressed_name, "r" FOPEN_BINARY); + if (inf) + { + real_name = compressed_name; + break; + } + if (MSDOS) { - if (MSDOS) + char *suf = compressed_name + strlen (file); + size_t suflen = strlen (compr->suffix) + 1; + for ( ; suf[1]; suf++, suflen--) { - char *suf = compressed_name + strlen (file); - size_t suflen = strlen (compr->suffix) + 1; - for ( ; suf[1]; suf++, suflen--) + memmove (suf, suf + 1, suflen); + inf = fopen (compressed_name, "r" FOPEN_BINARY); + if (inf) { - memmove (suf, suf + 1, suflen); - if (stat (compressed_name, &stat_buf) == 0) - { - real_name = compressed_name; - break; - } + real_name = compressed_name; + break; } - if (real_name != NULL) - break; - } /* MSDOS */ - free (compressed_name); - compressed_name = NULL; - } - else - { - real_name = compressed_name; - break; + } + if (inf) + break; } + free (compressed_name); + compressed_name = NULL; } } - if (real_name == NULL) + if (! inf) { + errno = file_errno; perror (file); goto cleanup; } - } /* try with a different name */ - - if (!S_ISREG (stat_buf.st_mode)) - { - error ("skipping %s: it is not a regular file.", real_name); - goto cleanup; } + if (real_name == compressed_name) { + fclose (inf); tmp_name = etags_mktmp (); if (!tmp_name) inf = NULL; else { - char *cmd1 = concat (compr->command, " ", real_name); - char *cmd = concat (cmd1, " > ", tmp_name); + char *cmd1 = concat (compr->command, " '", real_name); + char *cmd = concat (cmd1, "' > ", tmp_name); free (cmd1); + int tmp_errno; if (system (cmd) == -1) - inf = NULL; + { + inf = NULL; + tmp_errno = EINVAL; + } else - inf = fopen (tmp_name, "r" FOPEN_BINARY); + { + inf = fopen (tmp_name, "r" FOPEN_BINARY); + tmp_errno = errno; + } free (cmd); + errno = tmp_errno; + } + + if (!inf) + { + perror (real_name); + goto cleanup; } - } - else - inf = fopen (real_name, "r" FOPEN_BINARY); - if (inf == NULL) - { - perror (real_name); - goto cleanup; } process_file (inf, uncompressed_name, lang); @@ -1596,8 +1602,10 @@ process_file_name (char *file, language *lang) pfatal (file); cleanup: - free (compressed_name); - free (uncompressed_name); + if (compressed_name != file) + free (compressed_name); + if (uncompressed_name != file) + free (uncompressed_name); last_node = NULL; curfdp = NULL; return; @@ -1609,6 +1617,7 @@ process_file (FILE *fh, char *fn, language *lang) static const fdesc emptyfdesc; fdesc *fdp; + infilename = fn; /* Create a new input file description entry. */ fdp = xnew (1, fdesc); *fdp = emptyfdesc; @@ -1672,6 +1681,13 @@ process_file (FILE *fh, char *fn, language *lang) } } +static void +reset_input (FILE *inf) +{ + if (fseek (inf, 0, SEEK_SET) != 0) + perror (infilename); +} + /* * This routine opens the specified file and calls the function * which finds the function and type definitions. @@ -1702,7 +1718,7 @@ find_entries (FILE *inf) /* Else look for sharp-bang as the first two characters. */ if (parser == NULL - && readline_internal (&lb, inf) > 0 + && readline_internal (&lb, inf, infilename) > 0 && lb.len >= 2 && lb.buffer[0] == '#' && lb.buffer[1] == '!') @@ -1731,7 +1747,7 @@ find_entries (FILE *inf) } } - rewind (inf); + reset_input (inf); /* Else try to guess the language given the case insensitive file name. */ if (parser == NULL) @@ -1755,7 +1771,7 @@ find_entries (FILE *inf) if (old_last_node == last_node) /* No Fortran entries found. Try C. */ { - rewind (inf); + reset_input (inf); curfdp->lang = get_language_from_langname (cplusplus ? "c++" : "c"); find_entries (inf); } @@ -2965,7 +2981,7 @@ do { \ #define CNL() \ do { \ - CNL_SAVE_DEFINEDEF(); \ + CNL_SAVE_DEFINEDEF (); \ if (savetoken.valid) \ { \ token = savetoken; \ @@ -2994,6 +3010,12 @@ make_C_tag (bool isfun) token.valid = false; } +static bool +perhaps_more_input (FILE *inf) +{ + return !feof (inf) && !ferror (inf); +} + /* * C_entries () @@ -3051,7 +3073,7 @@ C_entries (int c_ext, FILE *inf) { qualifier = "::"; qlen = 2; } - while (!feof (inf)) + while (perhaps_more_input (inf)) { c = *lp++; if (c == '\\') @@ -3892,13 +3914,10 @@ Yacc_entries (FILE *inf) /* Useful macros. */ #define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer) \ - for (; /* loop initialization */ \ - !feof (file_pointer) /* loop test */ \ - && /* instructions at start of loop */ \ - (readline (&line_buffer, file_pointer), \ - char_pointer = line_buffer.buffer, \ - true); \ - ) + while (perhaps_more_input (file_pointer) \ + && (readline (&(line_buffer), file_pointer), \ + (char_pointer) = (line_buffer).buffer, \ + true)) \ #define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ ((assert ("" kw), true) /* syntax error if not a literal string */ \ @@ -3919,7 +3938,7 @@ Yacc_entries (FILE *inf) static void just_read_file (FILE *inf) { - while (!feof (inf)) + while (perhaps_more_input (inf)) readline (&lb, inf); } @@ -4074,7 +4093,7 @@ Ada_getit (FILE *inf, const char *name_qualifier) char *name; char c; - while (!feof (inf)) + while (perhaps_more_input (inf)) { dbp = skip_spaces (dbp); if (*dbp == '\0' @@ -4576,7 +4595,7 @@ Pascal_functions (FILE *inf) verify_tag = false; /* check if "extern" is ahead */ - while (!feof (inf)) /* long main loop to get next char */ + while (perhaps_more_input (inf)) /* long main loop to get next char */ { c = *dbp++; if (c == '\0') /* if end of line */ @@ -5033,7 +5052,7 @@ TEX_mode (FILE *inf) TEX_opgrp = '<'; TEX_clgrp = '>'; } - rewind (inf); + reset_input (inf); } /* Read environment and prepend it to the default string. @@ -5279,7 +5298,7 @@ prolog_skip_comment (linebuffer *plb, FILE *inf) return; readline (plb, inf); } - while (!feof (inf)); + while (perhaps_more_input (inf)); } /* @@ -5629,10 +5648,11 @@ analyze_regex (char *regex_arg) if (regexfp == NULL) pfatal (regexfile); linebuffer_init (®exbuf); - while (readline_internal (®exbuf, regexfp) > 0) + while (readline_internal (®exbuf, regexfp, regexfile) > 0) analyze_regex (regexbuf.buffer); free (regexbuf.buffer); - fclose (regexfp); + if (fclose (regexfp) != 0) + pfatal (regexfile); } break; @@ -5972,11 +5992,11 @@ get_tag (register char *bp, char **namepp) * appended to `filebuf'. */ static long -readline_internal (linebuffer *lbp, register FILE *stream) +readline_internal (linebuffer *lbp, FILE *stream, char const *filename) { char *buffer = lbp->buffer; - register char *p = lbp->buffer; - register char *pend; + char *p = lbp->buffer; + char *pend; int chars_deleted; pend = p + lbp->size; /* Separate to avoid 386/IX compiler bug. */ @@ -5995,6 +6015,8 @@ readline_internal (linebuffer *lbp, register FILE *stream) } if (c == EOF) { + if (ferror (stream)) + perror (filename); *p = '\0'; chars_deleted = 0; break; @@ -6055,7 +6077,7 @@ readline (linebuffer *lbp, FILE *stream) long result; linecharno = charno; /* update global char number of line start */ - result = readline_internal (lbp, stream); /* read line */ + result = readline_internal (lbp, stream, infilename); /* read line */ lineno += 1; /* increment global line number */ charno += result; /* increment global char number */ @@ -6386,13 +6408,13 @@ etags_mktmp (void) char *templt = concat (tmpdir, slash, "etXXXXXX"); int fd = mkostemp (templt, O_CLOEXEC); - if (fd < 0) + if (fd < 0 || close (fd) != 0) { + int temp_errno = errno; free (templt); + errno = temp_errno; templt = NULL; } - else - close (fd); #if defined (DOS_NT) /* The file name will be used in shell redirection, so it needs to have @@ -6402,6 +6424,7 @@ etags_mktmp (void) if (*p == '/') *p = '\\'; #endif + return templt; } commit 3441b0cc61d88edb921bbf27462f3f961e794b4d Author: Paul Eggert Date: Sun May 24 14:20:09 2015 -0700 etags.c: avoid side effects in 'if' * lib-src/etags.c (process_file_name, Perl_functions) (TEX_decode_env): Hoist side effects into previous statement. diff --git a/lib-src/etags.c b/lib-src/etags.c index f049f42..ea337d4 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1484,15 +1484,16 @@ process_file_name (char *file, language *lang) error ("skipping inclusion of %s in self.", file); return; } - if ((compr = get_compressor_from_suffix (file, &ext)) == NULL) + compr = get_compressor_from_suffix (file, &ext); + if (compr) { - compressed_name = NULL; - real_name = uncompressed_name = savestr (file); + real_name = compressed_name = savestr (file); + uncompressed_name = savenstr (file, ext - file); } else { - real_name = compressed_name = savestr (file); - uncompressed_name = savenstr (file, ext - file); + compressed_name = NULL; + real_name = uncompressed_name = savestr (file); } /* If the canonicalized uncompressed name @@ -4299,8 +4300,8 @@ Perl_functions (FILE *inf) cp++; if (cp == sp) continue; /* nothing found */ - if ((pos = strchr (sp, ':')) != NULL - && pos < cp && pos[1] == ':') + pos = strchr (sp, ':'); + if (pos && pos < cp && pos[1] == ':') /* The name is already qualified. */ make_tag (sp, cp - sp, true, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); @@ -5051,8 +5052,8 @@ TEX_decode_env (const char *evarname, const char *defenv) env = concat (env, defenv, ""); /* Allocate a token table */ - for (len = 1, p = env; p;) - if ((p = strchr (p, ':')) && *++p != '\0') + for (len = 1, p = env; (p = strchr (p, ':')); ) + if (*++p) len++; TEX_toktab = xnew (len, linebuffer); commit efa6f10a8efe6a917dd6d416a1a6626d12fc7942 Author: Paul Eggert Date: Sun May 24 08:04:03 2015 -0700 .gitignore tweaks * .gitignore: Ignore all *.stamp files. Sort. Ignore [0-9]*.txt (commonly used name for git patches) and /vc-dwim-log-* (vc-dwim temporary). diff --git a/.gitignore b/.gitignore index 2548318..2f47e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -116,8 +116,6 @@ lisp/leim/quail/tsang-b5.el lisp/leim/quail/tsang-cns.el lisp/subdirs.el -etc/charsets/*.map - # Dependencies. .deps/ deps/ @@ -127,6 +125,7 @@ deps/ *.tmp # Time stamps. +*.stamp stamp_BLD src/gl-stamp src/stamp-h.in @@ -191,13 +190,13 @@ src/emacs-[0-9]* src/temacs # Character-set info. -admin/charsets/charsets.stamp admin/charsets/jisx2131-filter admin/unidata/unidata.txt +etc/charsets/*.map lisp/international/charprop.el -lisp/international/uni-*.el lisp/international/cp51932.el lisp/international/eucjp-ms.el +lisp/international/uni-*.el # Documentation. *.aux @@ -252,6 +251,8 @@ gnustmp* \#*\# ChangeLog [0-9]*.patch +[0-9]*.txt +/vc-dwim-log-* # Built by 'make install'. etc/emacs.tmpdesktop commit 319d65c7f95bd3847dae53f02cb11213309e3e23 Author: Glenn Morris Date: Sun May 24 06:25:35 2015 -0400 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index b75a665..b612b52 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,949 @@ +2015-05-24 Eli Zaretskii + + Fix last change in etags.c, which failed the test suite + * lib-src/etags.c (intoken): Add '$' to the set, as it was there + before the last change. + +2015-05-23 Glenn Morris + + Remove charset map files from repository, generate in first bootstrap + * admin/charsets/Makefile.in (${srcdir}/charsets.stamp): New. + (all): Create the stamp file. + (extraclean): Delete the stamp file. + * src/Makefile.in (lispintdir, charsets): New variables. + (${lispintdir}/cp51932.el, ${lispintdir}/eucjp-ms.el, ${charsets}): + New rules. + (emacs$(EXEEXT), temacs$(EXEEXT)): Depend on $charsets. + * lisp/international/cp51932.el, lisp/international/eucjp-ms.el: + * etc/charsets/*.map: Remove from repository. + +2015-05-23 Paul Eggert + + Cleanup etags.c to use locale-independent code + Although this doesn't alter behavior (as etags doesn't use + setlocale), the new version is more clearly locale-independent and + the executable is a bit smaller on my platform. + * lib-src/etags.c: Include , for UCHAR_MAX. + Include instead of . + (CHARS, CHAR, init, _wht, _nin, _itk, _btk, _etk, white, nonam, endtk) + (begtk, midtk): + Remove; no longer needed. + (iswhite, ISALNUM, ISALPHA, ISDIGIT, ISLOWER, lowcase): Remove. + All callers changed to use c_isspace, c_isalnum, c_isalpha, c_isdigit, + c_islower, c_tolower, respectively. + (notinname, begtoken, intoken, endtoken): Rewrite as functions + instead of macros, and initialize the tables at compile-time + rather than at run-time. + + Put default action first in src/Makefile + * src/Makefile.in (all): Put this rule before lisp.mk. + That way, plain 'make' works in the src directory again. + +2015-05-23 Glenn Morris + + * Makefile.in: Fix extraclean rule. + (extraclean_dirs): New. + (extraclean): Use it. + +2015-05-23 Eli Zaretskii + + Avoid compiler warning in image.c on MS-Windows + * src/w32term.h (x_query_color): Add prototype, to avoid compiler + warning in image.c. + +2015-05-23 Glenn Morris + + Fix --without-toolkit-scroll-bars builds. + * src/xterm.c (x_scroll_bar_set_handle) [!USE_TOOLKIT_SCROLL_BARS]: + Add new argument to x_clear_area1. + (XTset_horizontal_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: + Update x_clear_area arguments. + + * admin/charsets/glibc/: New directory, imported from glibc 2.21. + * admin/charsets/Makefile.in (GLIBC_CHARMAPS): + Change to included version. + (LOCAL, local, totalclean): Remove. + (extraclean): Delete all generated files. + +2015-05-23 Stefan Monnier + + * lisp/pcmpl-cvs.el (pcmpl-cvs-entries): Don't assume CVS/Entries exists. + + * lisp/progmodes/xref.el (xref-find-apropos): Use read-string. + + tags-completion-at-point-function: Don't trust the find-tag function + * lisp/progmodes/etags.el (tags-completion-at-point-function): + Don't trust the find-tag function. + +2015-05-23 Paul Eggert + + Pacify --enable-gcc-warnings + * src/frame.h (x_query_color): Remove redundant extern decl. + * src/ftcrfont.c (ftcrfont_glyph_extents, ftcrfont_list) + (ftcrfont_match, ftcrfont_open, ftcrfont_close) + (ftcrfont_text_extents, ftcrfont_draw): + * src/xterm.c (x_set_window_size_1, *x_color_cells, x_update_end) + (XTframe_up_to_date, x_clear_area1, x_clear_frame) + (x_ins_del_lines, frame_highlight, frame_unhighlight) + (x_new_focus_frame, x_focus_changed, XTframe_rehighlight) + (x_draw_hollow_cursor, x_draw_bar_cursor, x_flush, x_update_begin) + (x_update_window_begin, x_connection_closed) + (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle) + (x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window) + (*x_gc_get_ext_data, x_extension_initialize) + (x_cr_accumulate_data): + Remove redundant static decl. Many of these GCC doesn't complain + about, but we might as well clean out the duplication while we're + in the neighborhood. + * src/xterm.c (x_fill_trapezoid_for_relief): + Remove decl of nonexistent function. + +2015-05-23 Stefan Monnier + + Replace gui-method macros with cl-generic with &context + * lisp/frame.el (gui-method--name, gui-method, gui-method-define) + (gui-method-declare, gui-call): Remove. + (frame-creation-function): Use cl-defgeneric. + (make-frame): Adjust callers. + * lisp/menu-bar.el (menu-bar-edit-menu): + Use gui-backend-selection-exists-p. + * lisp/select.el (x-get-clipboard): Use gui-backend-get-selection. + (gui-backend-get-selection): New cl-generic to replace + gui-get-selection method. + (gui-backend-set-selection): New cl-generic to replace + gui-set-selection method. + (gui-selection-owner-p): New cl-generic to replace + gui-selection-owner-p method. + (gui-backend-selection-exists-p): New cl-generic to replace + gui-selection-exists-p method. Adjust all callers. + * lisp/server.el (server-create-window-system-frame): Don't ignore + window-system spec even when unsupported. + * lisp/simple.el (deactivate-mark): Use new gui-backend-* functions. + * lisp/startup.el (handle-args-function, window-system-initialization): + Use cl-defgeneric. + (command-line): Adjust calls accordingly. + * lisp/term/ns-win.el (ns-window-system-initialization): Turn into + a window-system-initialization method. + (handle-args-function, frame-creation-function): Use cl-defmethod. + (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) + (gui-get-selection): Use cl-defmethod on the new functions instead. + * lisp/term/pc-win.el (w16-get-selection-value): Turn into + a gui-backend-get-selection method. + (gui-selection-exists-p, gui-selection-owner-p, gui-set-selection): + Use cl-defmethod on the new functions instead. + (msdos-window-system-initialization): Turn into + a window-system-initialization method. + (frame-creation-function, handle-args-function): Use cl-defmethod. + * lisp/term/w32-win.el (w32-window-system-initialization): Turn into + a window-system-initialization method. + (handle-args-function, frame-creation-function): Use cl-defmethod. + (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) + (gui-get-selection): Use cl-defmethod on the new functions instead. + * lisp/term/x-win.el (x-window-system-initialization): Turn into + a window-system-initialization method. + (handle-args-function, frame-creation-function): Use cl-defmethod. + (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) + (gui-get-selection): Use cl-defmethod on the new functions instead. + * lisp/term/xterm.el (xterm--set-selection): Turn into + a gui-backend-set-selection method. + * src/nsselect.m (Fns_selection_exists_p): Remove unused arg `terminal'. + (Fns_selection_owner_p): Remove unused arg `terminal'. + (Fns_get_selection): Remove unused args `time_stamp' and `terminal'. + +2015-05-23 Eli Zaretskii + + Revert "Fix etags Bug#20629 that broke C++ support." + This reverts commit 13dd9d4f7e75d2c78aa5537cef09de03663e9748. + +2015-05-23 Jan D + + Fix etags Bug#20629 that broke C++ support. + * etags.el (etags-xref-find-definitions-tag-order): Revert commit + from Sun May 10 (Bug#20629). + + Merge branch 'cairo'. + Main work done by YAMAMOTO Mitsuharu . + Small fixes and image work by Jan D. . + + Merge branch 'master' into cairo + + Fixes to compile cairo branch without cairo. + * src/gtkutil.c (xg_update_scrollbar_pos): x_clear_area takes frame as + first argument. + * src/xterm.c (handle_one_xevent): Surround x_cr_destroy_surface with + USE_CAIRO. + +2015-05-23 Artur Malabarba + + * lisp/emacs-lisp/package.el: Always update selected-packages + (package--update-selected-packages): New function. + (package-menu-execute): Use it before starting the transaction, + this way the list of selected packages is updated even when the + transaction fails. + (package-menu--perform-transaction): Don't edit selected-packages. + +2015-05-23 Eli Zaretskii + + Fix etags reading of compressed files + * lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]: Define. + Include fcntl.h, for O_CLOEXEC. + (process_file_name): Don't use 'popen', whose streams cannot be + rewound. Instead, uncompress the file to a temporary file, + created by 'etags_mktmp', and read from that as usual. + (etags_mktmp): New function. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: Update to be consistent with latest + changes in etags.c regarding reading compressed files. + + Improve documentation of 'set-fontset-font' + * doc/lispref/display.texi (Fontsets): Document the value of nil + for the 3rd argument of 'set-fontset-font'. + + Fix documentation of forward-line + * src/cmds.c (Fforward_line): Clarify the return value if the line + at end of accessible portion of the buffer has no newline. + * doc/lispref/positions.texi (Text Lines): Document what happens + if the line at end of accessible portion of buffer has no newline. + (Bug#20587) + +2015-05-22 Glenn Morris + + * admin/charsets/Makefile.in (TRANS_TABLE): Add short aliases. + + * admin/charsets/mapconv (LC_ALL): Set to C. + + * Makefile.in: Add admin/charsets into top-level clean rules. + (clean): Add admin/charsets. + (maybeclean_dirs): New variable. + (distclean, bootstrap-clean, maintainer-clean): Use $maybeclean_dirs. + + * admin/charsets/Makefile.in (LOCAL, local): Fix members. + +2015-05-22 Artur Malabarba + + * lisp/emacs-lisp/package.el (package-selected-packages): Fix doc + +2015-05-22 Glenn Morris + + Generate admin/charsets Makefile via configure, and make more portable. + * configure.ac (SUBDIR_MAKEFILES): Add admin/charsets/Makefile. + (admin/charsets/Makefile): Generate it. + * admin/charsets/Makefile.in: Rename from Makefile. + (AWK, srcdir, top_srcdir, AM_DEFAULT_VERBOSITY): + New variables, set by configure. + (charsetdir, lispintdir, mapfiledir, AM_V_GEN, am__v_GEN_) + (am__v_GEN_0, am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0) + (am__v_at_1, LOCAL, mapconv, run_mapconv, big5, compact, cp51932) + (cp932, eucjp_ms, gb180302, gb180304, kuten): New variables. + (TRANS_TABLE, CHARSETS): Add directory prefix to value. + (all): Declare PHONY. + (local): New PHONY target. + (map_template): New template. Use to define short PHONY aliases. + (*.map): Add directory prefixes to targets and prerequisites. + Respect make verbosity. + (JISC6226.map): Replace non-portable sed append without newline. + (install): Remove rule. + (clean): Only delete temporary sedscript. + (bootstrap-clean, distclean, maintainer-clean, extraclean) + (totalclean): New PHONY rules. + * admin/charsets/mapconv (BASE): Replace basename with expr. + (FILE): Add "mapfiles" subdirectory. + (AWK): New variable. Use throughout in place of "awk". + (main): Use "gunzip -c" in place of "zcat". + Don't leave whitespace before "p", for older sed. + * admin/charsets/mapfiles/PTCP154: Add final newline, + to make older sed versions happy. + +2015-05-22 Stefan Monnier + + * lisp/autorevert.el: Use lexical-binding. Fix hook usage. + (global-auto-revert-ignore-buffer, auto-revert-notify-modified-p) + (auto-revert-notify-watch-descriptor): Use defvar-local. + (find-file-hook, auto-revert-tail-mode, ) + (auto-revert-notify-add-watch): Use setq-local. + (auto-revert-notify-add-watch): Don't call make-local-variable on + kill-buffer-hook (bug#20601). + +2015-05-21 Stefan Monnier + + Change defgeneric so it doesn't completely redefine the function + * lisp/emacs-lisp/cl-generic.el (cl-generic-define): Don't throw away + previously defined methods. + (cl-generic-define-method): Let-bind purify-flag instead of using `fset'. + (cl--generic-prefill-dispatchers): Only define during compilation. + (cl-method-qualifiers): Remove redundant alias. + (help-fns-short-filename): Silence byte-compiler. + * test/automated/cl-generic-tests.el: Adjust to new defgeneric semantics. + +2015-05-21 Artur Malabarba + + (package-menu-execute): Remove reference to remove-dups + +2015-05-21 kwhite + + * lisp/erc/erc.el: Hide network/channel messages + (erc-network-hide-list, etc-channel-hide-list): New lists to define + message types per network/channel. + (erc-add-targets): New function to parse list of targets + (erc-hide-current-message-p): Modified to check for new targets + +2015-05-21 Paul Eggert + + Don't quote nil and t in doc strings + This is as per "Tips for Documentation Strings" in the elisp manual. + For consistency, do the same in diagnostics and comments. + +2015-05-21 Eli Zaretskii + + Fix a minor problem with mouse-face on mode line + * src/xdisp.c (note_mode_line_or_margin_highlight): Reset the + mouse face also if the mouse pointer hovers above mode-line glyphs + that don't come from any Lisp string. (Bug#20620) + +2015-05-21 Artur Malabarba + + * lisp/emacs-lisp/package.el: Fix selected-package logic + (package-menu-execute): Mark as selected all non-upgrade packages + being installed. + (package-menu--perform-transaction): Don't mark anything. + + * lisp/emacs-lisp/package.el: Mode-line progress report + (package-menu--transaction-status): New variable. + (package-menu-mode, package-menu--perform-transaction): Use it. + + * lisp/emacs-lisp/package.el: Better transaction messages + (package-menu--partition-transaction): New function. + (package-menu--prompt-transaction-p, package-menu-execute): Use + it. + (package-menu--perform-transaction): Don't do any messaging. + + * lisp/emacs-lisp/package.el: Revert async package transactions + (package-menu-async): Update doc. + (package-install-from-archive, package-download-transaction) + (package-install, package-menu--perform-transaction) + (package-menu-execute): Remove asynchronous functionality. + +2015-05-21 Paul Eggert + + Revert doc string changes to f90.el + Problem reported by Glenn Morris in: + http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00596.html + * lisp/progmodes/f90.el (f90-mode, f90-abbrev-start): + Revert recent changes to doc strings, as it's intended that they + use grave accent, not quote. + +2015-05-20 Bozhidar Batsov + + Improve parameter name + + Add new inline function `hash-table-empty-p' + +2015-05-20 Paul Eggert + + Don't require help-fns when not needed + * lisp/emacs-lisp/autoload.el, lisp/emacs-lisp/advice.el: + * lisp/emacs-lisp/elint.el: + Don't require help-fns at the top level. + * lisp/emacs-lisp/advice.el (ad-arglist): + * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): + Don't require help-fns. (Bug#17001) + +2015-05-20 Eli Zaretskii + + Fix slash collapsing in etags on MS-Windows + * lib-src/etags.c (canonicalize_filename) [DOS_NT]: Separate the + MS-Windows code from the Posix code, and support collapsing both + forward- and back-slashes on MS-Windows. Fixes a regression found + by the test suite. + + Improve documentation of glyphless-char-display + * doc/lispref/display.texi (Glyphless Chars): Improve + documentation of glyphless character display. + + Fix "acronym" display of glyphless characters on w32 + * src/w32term.c (x_draw_glyphless_glyph_string_foreground): Don't + ignore "acronym" substitutes of 1 character for glyphless characters. + +2015-05-20 Oleh Krehel + + Add an automated test for let-when-compile + * test/automated/subr-tests.el (let-when-compile): New test. + + Add let-when-compile macro instead of using pcase-let + * lisp/subr.el (let-when-compile): New let-like macro that makes its + bindings known to macros like `eval-when-compile' in the body. + * lisp/emacs-lisp/lisp-mode.el: Change the top-level `pcase-let' to a + `let-when-compile'. Also comment out the unused lexical var + `el-kws-re'. + The change greatly improves readability, while providing almost the + same (even shorter) byte code: instead of pre-evaluating 10 variables, + tossing them into a list, and destructuring that list a full screen + page later, the variables are simply bound as they are evaluated, + wrapped individually in `eval-when-compile'. + +2015-05-20 Artur Malabarba + + * lisp/emacs-lisp/package.el: "Delete" button in Help buffer + (package-delete-button-action): New function. + (describe-package-1): Add Delete button. + + * lisp/emacs-lisp/package.el: Better dependency description + (package--used-elsewhere-p): New optional arg, ALL, and return + package-desc objects instead of names. + (package-delete): Update accordingly. + (describe-package-1): Describe which packages require the package. + +2015-05-20 Martin Rudalics + + Fix handling and doc-string of FRAME arg of `other-buffer' (Bug#20533) + * src/buffer.c (Fother_buffer): Argument FRAME must denote a live frame. + Fix doc-string (Bug#20533). + + Improve `switch-to-buffer' in strongly dedicated windows (Bug#20472) + * lisp/window.el (switch-to-buffer-in-dedicated-window): New option. + (switch-to-buffer): If the selected window is strongly dedicated + to its buffer, signal error before prompting for buffer name. Handle + `switch-to-buffer-in-dedicated-window'. (Bug#20472) + * doc/lispref/windows.texi (Switching Buffers): Document + `switch-to-buffer-in-dedicated-window'. + +2015-05-19 Paul Eggert + + Prefer "this" to “this” in doc strings + This mostly just straightens quotes introduced in my previous patch. + Suggested by Dmitry Gutov in: + http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00565.html + * lisp/faces.el, lisp/gnus/gnus-group.el, lisp/ldefs-boot.el: + * lisp/mail/supercite.el, lisp/net/tramp.el, lisp/recentf.el: + * lisp/textmodes/artist.el, lisp/textmodes/rst.el: + * lisp/textmodes/tildify.el, lisp/vc/ediff-util.el: + * lisp/vc/log-edit.el, lisp/xt-mouse.el: + Prefer straight double quotes to curved double quotes in doc strings. + + Fix minor quoting problems in doc strings + These were glitches regardless of how or whether we tackle the + problem of grave accent in doc strings. + * lisp/calc/calc-aent.el (math-restore-placeholders): + * lisp/ido.el (ido-ignore-buffers, ido-ignore-files): + * lisp/leim/quail/cyrillic.el ("bulgarian-alt-phonetic"): + * lisp/leim/quail/hebrew.el ("hebrew-new") + ("hebrew-biblical-sil"): + * lisp/leim/quail/thai.el ("thai-kesmanee"): + * lisp/progmodes/idlw-shell.el (idlwave-shell-file-name-chars): + Used curved quotes to avoid ambiguities like ‘`''’ in doc strings. + * lisp/calendar/calendar.el (calendar-month-abbrev-array): + * lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-cache-flush-fcn): + * lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass): + * lisp/cedet/semantic/tag.el (semantic-tag-copy) + (semantic-tag-components): + * lisp/cedet/srecode/cpp.el (srecode-semantic-handle-:cpp): + * lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring): + * lisp/emacs-lisp/byte-opt.el (byte-optimize-all-constp): + * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): + * lisp/emacs-lisp/generator.el (iter-next): + * lisp/gnus/gnus-art.el (gnus-treat-strip-list-identifiers) + (gnus-article-mode-syntax-table): + * lisp/net/rlogin.el (rlogin-directory-tracking-mode): + * lisp/net/soap-client.el (soap-wsdl-get): + * lisp/net/telnet.el (telnet-mode): + * lisp/org/org-compat.el (org-number-sequence): + * lisp/org/org.el (org-remove-highlights-with-change) + (org-structure-template-alist): + * lisp/org/ox-html.el (org-html-link-org-files-as-html): + * lisp/play/handwrite.el (handwrite-10pt, handwrite-11pt) + (handwrite-12pt, handwrite-13pt): + * lisp/progmodes/f90.el (f90-mode, f90-abbrev-start): + * lisp/progmodes/idlwave.el (idlwave-mode, idlwave-check-abbrev): + * lisp/progmodes/verilog-mode.el (verilog-tool) + (verilog-string-replace-matches, verilog-preprocess) + (verilog-auto-insert-lisp, verilog-auto-insert-last): + * lisp/textmodes/makeinfo.el (makeinfo-options): + * src/font.c (Ffont_spec): + Fix minor quoting problems in doc strings, e.g., missing quote, + ``x'' where `x' was meant, etc. + * lisp/erc/erc-backend.el (erc-process-sentinel-2): + Fix minor quoting problem in other string. + * lisp/leim/quail/ethiopic.el ("ethiopic"): + * lisp/term/tvi970.el (tvi970-set-keypad-mode): + Omit unnecessary quotes. + * lisp/faces.el (set-face-attribute, set-face-underline) + (set-face-inverse-video, x-create-frame-with-faces): + * lisp/gnus/gnus-group.el (gnus-group-nnimap-edit-acl): + * lisp/mail/supercite.el (sc-attribs-%@-addresses) + (sc-attribs-!-addresses, sc-attribs-<>-addresses): + * lisp/net/tramp.el (tramp-methods): + * lisp/recentf.el (recentf-show-file-shortcuts-flag): + * lisp/textmodes/artist.el (artist-ellipse-right-char) + (artist-ellipse-left-char, artist-vaporize-fuzziness) + (artist-spray-chars, artist-mode, artist-replace-string) + (artist-put-pixel, artist-text-see-thru): + * lisp/vc/ediff-util.el (ediff-submit-report): + * lisp/vc/log-edit.el (log-edit-changelog-full-paragraphs): + Use double-quotes rather than TeX markup in doc strings. + * lisp/skeleton.el (skeleton-pair-insert-maybe): + Reword to avoid the need for grave accent and apostrophe. + * lisp/xt-mouse.el (xterm-mouse-tracking-enable-sequence): + Don't use grave and acute accents to quote. + +2015-05-19 Stefan Monnier + + * emacs-lisp/generator.el (cps--gensym, cps--transform-1): Silence compiler + +2015-05-19 Paul Eggert + + Try to port new etags tests to MS-Windows + * test/etags/CTAGS.good, test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2, test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4, test/etags/ETAGS.good_5: + Adjust to test-case changes below. + * test/etags/Makefile (CSRC): Remove dostorture.c. + Whatever it was trying to test, wasn't working portably. + (LC_ALL): Remove. Apparently there wasn't an encoding problem, + just a line-ending problem. + * test/etags/c-src/dostorture.c: Remove. + * test/etags/cp-src/c.C: Remove stray CR. + * test/etags/html-src/algrthms.html: Remove trailing CRs. + State UTF-8 as the encoding. The file is ASCII so it doesn't matter, + but if someone edits it later it should stay UTF-8-compatible. + +2015-05-19 Eli Zaretskii + + Fix display of overlapping window-specific overlays + * src/keyboard.c (adjust_point_for_property): When adjusting point + due to display strings, ignore overlays that are specific to + windows other than the currently selected one. + * src/xdisp.c (handle_single_display_spec): If the display + property comes from an overlay, arrange for buffer iteration to + resume only after the end of that overlay. (Bug#20607) + +2015-05-19 Dmitry Gutov + + New command icomplete-force-complete-and-exit + * lisp/icomplete.el (icomplete-force-complete-and-exit): + New command + (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00461.html) + (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00516.html). + (icomplete-minibuffer-map): Bind C-j to it. + (icomplete-forward-completions, icomplete-backward-completions): + Mention the new command in the docstring. + * lisp/minibuffer.el (minibuffer-force-complete-and-exit): Revert + the previous fix for bug#17545. + +2015-05-19 Martin Rudalics + + Fix last commit + + In Elisp manual explain how to override window manager positioning (Bug#20552) + * doc/lispref/frames.texi (Position Parameters): Give example of + how to override a window manager positioning decision. + + Clarify concept of "surrogate minibuffer frames" (Bug#20538) + * src/frame.c (Fdelete_frame): In doc-string mention that frame + can't be deleted if it has a surrogate minibuffer. + * doc/lispref/frames.texi (Minibuffers and Frames) + (Deleting Frames): Explain "surrogate minibuffer frames". + + In w32heap.c bump DUMPED_HEAP_SIZE to 19/12 MB + * emacs-git/quick/src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 19/12 MB. + +2015-05-18 Glenn Morris + + Add option to ignore commit lines matching a pattern in ChangeLog. + * build-aux/gitlog-to-changelog: Add --ignore-line option. + * build-aux/gitlog-to-emacslog: Ignore lines matching '^; '. + +2015-05-18 Paul Eggert + + Don't skip new etags tests on non-UTF-8 hosts + Problem reported by Eli Zaretskii for MS-Windows. + * test/etags/Makefile (UTF8_LOCALE, UTF8_ENCODING): Remove. + (LC_ALL): Set to C if the current locale isn't UTF-8. + (.PHONY): Remove ediff_1 thru ediff_5. + (check): Always run. + +2015-05-18 Glenn Morris + + * lisp/calculator.el (calculator-funcall): + * lisp/textmodes/artist.el (artist-spray-random-points): + Use standard degree/radian conversion utilities. + + Further lisp-complete-symbol related cleanup. + * lisp/emacs-lisp/lisp.el (lisp-complete-symbol): + Unadvertise non-functional argument. Replace obsolete alias. + +2015-05-18 Dmitry Gutov + + Add a test case for Maven warning ouput + * test/automated/compile-tests.el + (compile-tests--test-regexps-data): Add a case for Maven warning + ouput. + (compile--test-error-line): Check the compilation message type, if + it's specified in the test data. + +2015-05-18 Paul Pogonyshev + + Update Maven compilation-mode entry to distinguish warnings + * lisp/progmodes/compile.el + (compilation-error-regexp-alist-alist): Update Maven entry to + distinguish warnings (bug#20556). + +2015-05-18 Przemysław Wojnowski + + * test/automated/sgml-mode-tests.el: New file. + +2015-05-18 Dmitry Gutov + + Improve handling of the first Git revision + * lisp/vc/log-view.el (log-view-toggle-entry-display): When + there's no next entry, delete until the end of the buffer. + (log-view-end-of-defun-1): Stop at eob. + * lisp/vc/vc-annotate.el + (vc-annotate-show-diff-revision-at-line-internal): Don't give up + when previous-revision is nil. + * lisp/vc/vc-git.el (vc-git-expanded-log-entry): End the arguments + with `--' to avoid ambiguity. + (vc-git-annotate-extract-revision-at-line): Exclude `^' from the + returned revision string. + (vc-git-annotate-time): Expect `^' before the first revision. + * lisp/vc/vc-git.el (vc-git-diff): Diff against an empty tree if + REV1 is nil, and REV2 is not. + * lisp/vc/vc.el: Update the description of the `diff' function. + +2015-05-18 Oleh Krehel + + Allow checkdoc to be called in batch + * lisp/emacs-lisp/checkdoc.el (checkdoc-error): When `noninteractive' + is non-nil, echo the error with `warn'. + How it can be used in -batch: + (with-current-buffer (find-file "checkdoc.el") + (checkdoc-current-buffer t)) + +2015-05-18 Glenn Morris + + * lisp/calendar/solar.el (solar-ecliptic-coordinates): Use float-pi. + +2015-05-17 Paul Eggert + + * admin/notes/unicode: New section "binary files". + + Change new etags test to use UTF-8 encoding + * test/etags/CTAGS.good, test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2, test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4, test/etags/ETAGS.good_5: + * test/etags/html-src/index.shtml, test/etags/html-src/software.html: + * test/etags/html-src/softwarelibero.html: + Switch to UTF-8 encoding. + * test/etags/Makefile (SRCS): Adjust to switch to UTF-8. + Remove Makefile, as it's too incestuous to have the test input + include the build procedure. + (UTF8_LOCALE, UTF_ENCODING): New macros. + (LC_ALL): If possible, set to a UTF-8 encoding if not already UTF-8. + (check): Skip if not UTF-8. + (.PHONY): New rule. + (FRC): Remove, as superseded by .PHONY. All uses removed. + (regexfile): Prefer printf to echo when outputting oddball chars. + (.PRECIOUS): Remove, as these files are not built. + + Rename 'foo-gzipped' to 'foo.gz' + * test/automated/data/decompress/foo.gz: + Rename from test/automated/data/decompress/foo-gzipped, + to make it easier for other tools to tell that it's compressed. + * test/automated/zlib-tests.el (zlib--decompress): + Adjust to renamed file. + +2015-05-17 Dmitry Gutov + + Set up default-directory + * lisp/vc/vc-annotate.el (vc-annotate-mode-map): Remove duplicate + binding for `v'. + (vc-annotate-show-changeset-diff-revision-at-line): Set up an + appropriate value for default-directory. + +2015-05-17 Samer Masterson + + * lisp/eshell/em-term.el (eshell-term-sentinel): + No-op by default, only kills term buffer if + `eshell-destroy-buffer-when-process-dies' is non-nil. (Bug#18108) + (eshell-destroy-buffer-when-process-dies): New custom to preserve + previous behavior. + + eshell: Introduce new buffer syntax + The new buffer syntax '#' is equivalent to '#'. Remove `eshell-buffer-shorthand', as it is no longer + needed (Bug#19319). + * lisp/eshell/esh-io.el (eshell-buffer-shorthand): Remove. + (eshell-get-target): Remove shorthand-specific code. + * lisp/eshell/esh-arg.el (eshell-parse-special-reference): Parse + '#'. + +2015-05-17 Jan D + + Merge branch 'master' into cairo + +2015-04-26 Jan D + + Merge branch 'master' into cairo + + Add PBM support for cairo. + * src/image.c (xcolor_to_argb32): New function. + (get_spec_bg_or_alpha_as_argb): Call xcolor_to_argb32. + (pbm_load, png_load_body, jpeg_load_body, gif_load): Only use + XImagePtr if ! USE_CAIRO. + (pbm_load): Add cairo support. + +2015-04-12 Jan D + + x_free_cr_resources: Renamed from x_prepare_for_xlibdraw. + * src/xterm.c (x_free_cr_resources): Renamed from x_prepare_for_xlibdraw. + (x_cr_draw_frame, x_cr_export_frames, x_shift_glyphs_for_insert) + (x_free_frame_resources): Rename x_prepare_for_xlibdraw to + x_free_cr_resources. + + Handle specified bg in images. Use generic libpng code for PNG:s. + * src/image.c (get_spec_bg_or_alpha_as_argb) + (create_cairo_image_surface): New functions when USE_CAIRO. + (xpm_load): Call the above functions. Handle XPM without mask + when USE_CAIRO. + (png_load_body): Handle USE_CAIRO case. + (png_load): Remove USE_CAIRO specific fuction, modify png_load_body + instead. + (jpeg_load_body): Call create_cairo_image_surface. + (gif_load, svg_load_image): Handle specified background, call + create_cairo_image_surface. + * src/xterm.c (x_draw_image_glyph_string): Added missing USE_CAIRO. + +2015-04-11 Jan D + + Support GIF and Tiff with cairo. + * configure.ac: Allow jpeg with cairo. + Allow tiff and gif with cairo. + * src/image.c (jpeg_load_body): Create cairo image surface if USE_CAIRO. + (tiff_load): Create cairo image surface if USE_CAIRO. + (gif_load): Ditto. + + Support JPEG with USE_CAIRO. + * configure.ac: Allow jpeg with cairo. + * src/image.c (jpeg_load_body): Create cairo image surface if USE_CAIRO. + +2015-04-05 Jan D + + Support RSVG and cairo. + * configure.ac: Allow rsvg with cairo. Move back HAVE_RSVG. + * src/dispextern.h (struct image): add cr_data2 if cairo. + * src/image.c: #undef COLOR_TABLE_SUPPORT when USE_CAIRO. + (x_clear_image): Free cr_data and cr_data2 if set. + (xpm_load): Assign data to cr_data2. + (svg_load_image): Convert from GdkPixbuf to CAIRO_FORMAT_ARGB32. + +2015-04-03 Jan D + + Introduce limited Xpm support (32 bit ZPixmap) for Cairo. + * configure.ac (HAVE_RSVG): Move after cairo. + (USE_CAIRO): Disable rsvg, don't disable Xpm. + * src/image.c (prepare_image_for_display): Don't load if USE_CAIRO. + (x_clear_image): If USE_CAIRO, also free possible img->ximg->obdata and + don't return early. + (ALLOC_XPM_COLORS): Don't define when USE_CAIRO. + (xpm_load): Convert simple Xpms (32 bit ZPixmap) to CAIRO_FORMAT_ARGB32 + and create a surface. + + Tool tips for menus did not show any text. + * src/xterm.c (x_update_begin): Don't create any surface for non-visible + tip frames, the geometry may be wrong. + + Merge branch 'master' into cairo, fixes tooltips not shown. + + Merge branch 'master' into cairo + + Add CAIRO_CFLAGS to lwlib/Makefile.in + * Makefile.in (CAIRO_CFLAGS): Add. + +2015-02-19 YAMAMOTO Mitsuharu + + * ftcrfont.c (ftcrfont_draw): Don't flush when drawing to screen. + +2015-02-16 YAMAMOTO Mitsuharu + + Draw outermost line using black relief and erase corners also for cairo. + * xterm.c [USE_CAIRO]: Include math.h. + (enum corners) [USE_CAIRO]: New enum. + (x_erase_corners_for_relief) [USE_CAIRO]: New function. + (x_draw_relief_rect) [USE_CAIRO]: Use it. If box width is larger + than 1, draw the outermost line using the black relief. + + * xterm.c (x_fill_trapezoid_for_relief): Remove unnecessary cairo_close_path. + +2015-02-15 YAMAMOTO Mitsuharu + + * xterm.c (x_draw_relief_rect) [USE_CAIRO]: Reset clipping. + + * xterm.c (x_draw_stretch_glyph_string): Call x_reset_clip_rectangles instead of XSetClipMask. + + Use int instead of unsigned int for width and height args. + * xterm.c (x_cr_draw_image, x_fill_rectangle, x_draw_rectangle) + (x_fill_trapezoid_for_relief): Use int instead of unsigned int for + width and height args. + + Modernize k&r cairo-related function declarations. + * gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page) + (xg_print_frames_dialog): Modernize k&r declarations. + * xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup) + (Fx_print_frames_dialog): Modernize k&r declarations. + * xterm.c (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip) + (x_end_cr_clip, x_set_cr_source_with_gc_foreground) + (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap) + (x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data) + (x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw) + (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle) + (x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief) + (x_clear_area): Modernize k&r declarations. + + Implement wave-style variant of underlining for cairo. + * xterm.c (x_draw_horizontal_wave) [USE_CAIRO]: New function. + (x_draw_underwave) [USE_CAIRO]: Use it. + + * xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of XFillRectangle. + +2015-02-13 YAMAMOTO Mitsuharu + + Fix fringe bitmap initialization for cairo. + * fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap data for + cairo image surface. + * xterm.c (x_cr_define_fringe_bitmap): Call cairo_surface_mark_dirty. + +2015-02-11 Jan D + + Add cairo drawing. + * configure.ac (with-cairo): New option. + (USE_CAIRO): Default to yes for Gtk+ 3. Add code to test for cairo, + set CAIRO_CFLAGS, CAIRO_LIBS. Add ftcrfonto to FONT_OBJ if cairo. + Output "Does Emacs use cairo?". + * lisp/version.el (emacs-version): Add cairo version. + * src/Makefile.in (CAIRO_CFLAGS, CAIRO_LIBS): New variables. + (FONT_OBJ): Add comment about ftcrfont. + (ALL_CFLAGS): Add CAIRO_CFLAGS. + (LIBES): Add CAIRO_LIBS. + * src/dispextern.h (struct image): Add cr_data for cairo. + (x_cr_init_fringe): Declare. + * src/font.c (syms_of_font): Call syms_of_ftcrfont for cairo. + * src/font.h (ftcrfont_driver, syms_of_ftcrfont): Declare + * src/fringe.c (x_cr_init_fringe): New function name that shares code + with w32_init_fringe. + * src/ftcrfont.c: New font driver for cairo, based on the ftfont driver. + * src/ftfont.c (ftfont_info_size); New global variable. + (ftfont_open2): New extern function almost the same as old ftfont_open, + but takes the font_object as argument. + (ftfont_open): Build font object and call ftfont_open2. + * src/ftfont.h (ftfont_open2, ftfont_info_size): Declare. + * src/gtkutil.c (xg_clear_under_internal_border) + (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only + queue_draw if not cairo. Change args to x_clear_area. + (xg_get_font): Use Qftcr when using cairo, Qxft otherwise. + (xg_page_setup_dialog, xg_get_page_setup, draw_page) + (xg_print_frames_dialog): New functions for printing. + * src/gtkutil.h (xg_page_setup_dialog, xg_get_page_setup) + (xg_print_frames_dialog): Declare. + * src/image.c: Add defined (USE_CAIRO) for PNG. + Add !defined USE_CAIRO for W32 PNG code. + (x_clear_image): If cairo, destroy the surface in cr_data. + (png_load): Add new cairo compatible implementation. + (lookup_image_type): Add defined (USE_CAIRO) for define png_type. + * src/xfns.c: New section Printing. + (x-export-frames, x-page-setup-dialog, x-get-page-setup) + (x-print-frames-dialog): New printing functions. + (Fx_create_frame, x_create_tip_frame): Register ftcrfont if + cairo. + (syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin, + Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape). + (syms_of_xfns): Provide cairo and defvar cairo-version-string. + defsubr Sx_page_setup_dialog, Sx_get_page_setup, Sx_print_frames_dialog. + * src/xterm.c (x_clear_area1, x_prepare_for_xlibdraw) + (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle) + (x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window) + (x_gc_get_ext_data, x_extension_initialize, x_cr_accumulate_data): + Declare. + (FRAME_CR_CONTEXT, FRAME_CR_SURFACE): New macros. + (max_fringe_bmp, fringe_bmp): New variables. + (x_gc_get_ext_data, x_extension_initialize) + (x_cr_destroy_surface, x_begin_cr_clip, x_end_cr_clip) + (x_set_cr_source_with_gc_foreground) + (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap) + (x_cr_destroy_fringe_bitmap, x_cr_draw_image, x_cr_draw_frame) + (x_cr_accumulate_data, x_cr_destroy, x_cr_export_frames) + (x_prepare_for_xlibdraw, x_set_clip_rectangles) + (x_reset_clip_rectangles, x_fill_rectangle, x_draw_rectangle) + (x_clear_window, x_fill_trapezoid_for_relief): New functions. + (x_update_begin): Create cairo surface if needed. + (x_draw_vertical_window_border): Call x_fill_rectangle for cairo. + (x_update_end): Paint cairo drawing surface to xlib surface. + (x_clear_under_internal_border, x_after_update_window_line): Adjust + arguments to x_clear_area. + (x_draw_fringe_bitmap): Call x_fill_rectangle. Get GC values and + call x_cr_draw_image for cairo. Call x_reset_clip_rectangles instead + of XSetClipMask. + (x_set_glyph_string_clipping) + (x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles + instead of XSetClipRectangles. + (x_clear_glyph_string_rect, x_draw_glyph_string_background): Use + x_fill_rectangle instead of XFillRectangle. + (x_draw_glyph_string_foreground) + (x_draw_composite_glyph_string_foreground) + (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead + of XDrawRectangle. + (x_draw_relief_rect): Add code for USE_CAIRO. + Call x_reset_clip_rectangles instead of XSetClipMask. + (x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles, + x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles + instead of XSetClipMask. + (x_draw_image_foreground, x_draw_image_foreground_1): + x_draw_rectangle instead of XDrawRectangle. + (x_draw_glyph_string_bg_rect): x_fill_rectangle instead of + XFillRectangle. + (x_draw_image_glyph_string): If img has cr_data, use it as + a cairo surface. + (x_draw_stretch_glyph_string): x_set_clip_rectangles instead of + XSetClipRectangles, x_fill_rectangle instead of XFillRectangle. + (x_draw_glyph_string): x_fill_rectangle instead of XFillRectangle., + x_reset_clip_rectangles instead of XSetClipMask. + (x_shift_glyphs_for_insert): Call x_prepare_for_xlibdraw. + (x_clear_area1): New function that calls XClearArea. + (x_clear_area): Takes frame as parameter, calls x_clear_area1 for + non-cairo. + (x_clear_frame): x_clear_window instead of XClearWindow. + (x_scroll_run): Set frame garbaged if cairo. + (XTmouse_position): Initialize *part to 0. + (x_scroll_bar_create): Adjust arguments to x_clear_area. + (x_scroll_bar_set_handle): x_clear_area1 instead of x_clear_area, + x_fill_rectangle instead of XFillRectangle. + (XTset_vertical_scroll_bar, XTset_horizontal_scroll_bar): Adjust + arguments to x_clear_area. + (x_scroll_bar_expose): x_draw_rectangle instead of XDrawRectangle. + (handle_one_xevent): Adjust arguments to x_clear_area. + Destroy cairo surface for frame if ConfigureNotify. + (x_clip_to_row): x_set_clip_rectangles instead of XSetClipRectangles. + (x_draw_hollow_cursor): x_draw_rectangle instead of XDrawRectangle, + x_reset_clip_rectangles instead of XSetClipMask. + (x_draw_bar_cursor): x_fill_rectangle instead of XFillRectangle, + x_reset_clip_rectangles instead of XSetClipMask. + (x_clear_frame_area): Adjust arguments to x_clear_area. + (x_free_frame_resources): Call x_prepare_for_xlibdraw. + (x_term_init): Call x_extension_initialize if cairo. + (x_redisplay_interface): Add x_cr_define_fringe_bitmap, + x_cr_destroy_fringe_bitmap for cairo. + (x_initialize): Call x_cr_init_fringe for cairo. + * src/xterm.h: Add include of cairo header files. + (x_bitmap_record): Add img if cairo. + (x_gc_ext_data): New struct for cairo. + (x_display_info): Add ext_codes for cairo. + (x_output): Add cr_context and cr_surface for cairo. + (x_clear_area): Change arguments from Display*/Window to frame pointer. + (x_query_color, x_begin_cr_clip, x_end_cr_clip) + (x_set_cr_source_with_gc_foreground, x_set_cr_source_with_gc_background) + (x_cr_draw_frame, x_cr_export_frames): Declare. + 2015-05-17 Johan Bockgård Fix integer-valued `mouse-highlight' (Bug#20590) diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index d1b1af9..c833721 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -23,7 +23,7 @@ LC_ALL=C export LC_ALL # The newest revision that should not appear in the generated ChangeLog. -gen_origin=f89080d18dd64e0c92c5f3d206182d65f23eafeb +gen_origin=b98a2ef74758f78831d7c6dd4ae13f3433d77869 force= output=ChangeLog nmax=2