Now on revision 111581. ------------------------------------------------------------ revno: 111581 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-01-21 23:48:59 -0800 message: * emacs.c (Qkill_emacs_hook): Now static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-22 06:10:20 +0000 +++ src/ChangeLog 2013-01-22 07:48:59 +0000 @@ -1,5 +1,7 @@ 2013-01-22 Paul Eggert + * emacs.c (Qkill_emacs_hook): Now static. + * fileio.c (Finsert_file_contents): Simplify. Remove unnecessary assignments and tests. === modified file 'src/emacs.c' --- src/emacs.c 2013-01-19 08:49:17 +0000 +++ src/emacs.c 2013-01-22 07:48:59 +0000 @@ -133,7 +133,8 @@ Lisp_Object Qrisky_local_variable; -Lisp_Object Qkill_emacs, Qkill_emacs_hook; +Lisp_Object Qkill_emacs; +static Lisp_Object Qkill_emacs_hook; /* If true, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ ------------------------------------------------------------ revno: 111580 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-01-21 22:10:20 -0800 message: * fileio.c (Finsert_file_contents): Simplify. Remove unnecessary assignments and tests. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-21 18:00:19 +0000 +++ src/ChangeLog 2013-01-22 06:10:20 +0000 @@ -1,3 +1,8 @@ +2013-01-22 Paul Eggert + + * fileio.c (Finsert_file_contents): Simplify. + Remove unnecessary assignments and tests. + 2013-01-21 Eli Zaretskii * w32.c (acl_set_file): Don't test for errors unless === modified file 'src/fileio.c' --- src/fileio.c 2013-01-21 17:01:09 +0000 +++ src/fileio.c 2013-01-22 06:10:20 +0000 @@ -3573,7 +3573,6 @@ report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); mtime = time_error_value (save_errno); st.st_size = -1; - how_much = 0; if (!NILP (Vcoding_system_for_read)) Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); goto notfound; @@ -4008,30 +4007,25 @@ report_file_error ("Setting file position", Fcons (orig_filename, Qnil)); - total = st.st_size; /* Total bytes in the file. */ - how_much = 0; /* Bytes read from file so far. */ inserted = 0; /* Bytes put into CONVERSION_BUFFER so far. */ unprocessed = 0; /* Bytes not processed in previous loop. */ GCPRO1 (conversion_buffer); - while (how_much < total) + while (1) { - /* We read one bunch by one (READ_BUF_SIZE bytes) to allow - quitting while reading a huge while. */ - /* `try'' is reserved in some compilers (Microsoft C). */ - int trytry = min (total - how_much, READ_BUF_SIZE - unprocessed); + /* Read at most READ_BUF_SIZE bytes at a time, to allow + quitting while reading a huge file. */ /* Allow quitting out of the actual I/O. */ immediate_quit = 1; QUIT; - this = emacs_read (fd, read_buf + unprocessed, trytry); + this = emacs_read (fd, read_buf + unprocessed, + READ_BUF_SIZE - unprocessed); immediate_quit = 0; if (this <= 0) break; - how_much += this; - BUF_TEMP_SET_PT (XBUFFER (conversion_buffer), BUF_Z (XBUFFER (conversion_buffer))); decode_coding_c_string (&coding, (unsigned char *) read_buf, @@ -4048,9 +4042,6 @@ so defer the removal till we reach the `handled' label. */ deferred_remove_unwind_protect = 1; - /* At this point, HOW_MUCH should equal TOTAL, or should be <= 0 - if we couldn't read the file. */ - if (this < 0) error ("IO error reading %s: %s", SDATA (orig_filename), emacs_strerror (errno)); ------------------------------------------------------------ revno: 111579 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-01-21 22:07:34 +0000 message: gnus-sum.el (gnus-summary-read-group-1): Debbugs group entry fixups diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-01-16 02:46:25 +0000 +++ lisp/gnus/ChangeLog 2013-01-21 22:07:34 +0000 @@ -1,3 +1,9 @@ +2013-01-21 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-read-group-1): Protect against not being + able to find the article, which can happen in debbugs groups, + apparently. + 2013-01-16 Glenn Morris * smiley.el (smiley-style): Make the file loadable in batch mode. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-01-14 22:09:16 +0000 +++ lisp/gnus/gnus-sum.el 2013-01-21 22:07:34 +0000 @@ -4058,9 +4058,10 @@ gnus-auto-select-first) (progn (let ((art (gnus-summary-article-number))) - (unless (and (not gnus-plugged) - (or (memq art gnus-newsgroup-undownloaded) - (memq art gnus-newsgroup-downloadable))) + (when (and art + gnus-plugged + (not (memq art gnus-newsgroup-undownloaded)) + (not (memq art gnus-newsgroup-downloadable))) (gnus-summary-goto-article art)))) ;; Don't select any articles. (gnus-summary-position-point) ------------------------------------------------------------ revno: 111578 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-01-21 20:00:19 +0200 message: Another minor fix in acl_set_file on Windows. src/w32.c (acl_set_file): Don't test for errors unless set_file_security returns FALSE. Avoids spurious errors when saving files. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-21 17:01:09 +0000 +++ src/ChangeLog 2013-01-21 18:00:19 +0000 @@ -1,3 +1,9 @@ +2013-01-21 Eli Zaretskii + + * w32.c (acl_set_file): Don't test for errors unless + set_file_security returns FALSE. Avoids spurious errors when + saving files. + 2013-01-21 Dmitry Antipov * fileio.c (Finsert_file_contents): Revert code introduced at === modified file 'src/w32.c' --- src/w32.c 2013-01-19 07:32:36 +0000 +++ src/w32.c 2013-01-21 18:00:19 +0000 @@ -4868,8 +4868,50 @@ e = errno; errno = 0; - set_file_security ((char *)fname, flags, (PSECURITY_DESCRIPTOR)acl); - err = GetLastError (); + if (!set_file_security ((char *)fname, flags, (PSECURITY_DESCRIPTOR)acl)) + { + err = GetLastError (); + + if (errno == ENOTSUP) + ; + else if (err == ERROR_INVALID_OWNER + || err == ERROR_NOT_ALL_ASSIGNED + || err == ERROR_ACCESS_DENIED) + { + /* Maybe the requested ACL and the one the file already has + are identical, in which case we can silently ignore the + failure. (And no, Windows doesn't.) */ + acl_t current_acl = acl_get_file (fname, ACL_TYPE_ACCESS); + + errno = EPERM; + if (current_acl) + { + char *acl_from = acl_to_text (current_acl, NULL); + char *acl_to = acl_to_text (acl, NULL); + + if (acl_from && acl_to && xstrcasecmp (acl_from, acl_to) == 0) + { + retval = 0; + errno = e; + } + if (acl_from) + acl_free (acl_from); + if (acl_to) + acl_free (acl_to); + acl_free (current_acl); + } + } + else if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND) + errno = ENOENT; + else + errno = EACCES; + } + else + { + retval = 0; + errno = e; + } + if (st) { if (st >= 2) @@ -4878,42 +4920,6 @@ revert_to_self (); } - if (errno == ENOTSUP) - ; - else if (err == ERROR_SUCCESS) - { - retval = 0; - errno = e; - } - else if (err == ERROR_INVALID_OWNER || err == ERROR_NOT_ALL_ASSIGNED - || err == ERROR_ACCESS_DENIED) - { - /* Maybe the requested ACL and the one the file already has are - identical, in which case we can silently ignore the - failure. (And no, Windows doesn't.) */ - acl_t current_acl = acl_get_file (fname, ACL_TYPE_ACCESS); - - errno = EPERM; - if (current_acl) - { - char *acl_from = acl_to_text (current_acl, NULL); - char *acl_to = acl_to_text (acl, NULL); - - if (acl_from && acl_to && xstrcasecmp (acl_from, acl_to) == 0) - { - retval = 0; - errno = e; - } - if (acl_from) - acl_free (acl_from); - if (acl_to) - acl_free (acl_to); - acl_free (current_acl); - } - } - else if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND) - errno = ENOENT; - return retval; } ------------------------------------------------------------ revno: 111577 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-01-21 21:01:09 +0400 message: * fileio.c (Finsert_file_contents): Revert code introduced at 2013-01-18 in favor of the simpler and generally better fix. Save stack space by removing 'buffer' and reusing 'read_buf' where appropriate. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-19 22:33:29 +0000 +++ src/ChangeLog 2013-01-21 17:01:09 +0000 @@ -1,3 +1,10 @@ +2013-01-21 Dmitry Antipov + + * fileio.c (Finsert_file_contents): Revert code introduced at + 2013-01-18 in favor of the simpler and generally better fix. + Save stack space by removing 'buffer' and reusing 'read_buf' + where appropriate. + 2013-01-19 Paul Eggert * lisp.h (eabs): Define unconditionally (Bug#13419). === modified file 'src/fileio.c' --- src/fileio.c 2013-01-19 18:58:40 +0000 +++ src/fileio.c 2013-01-21 17:01:09 +0000 @@ -3413,13 +3413,13 @@ return Qnil; } -/* Check quit and read from the file. STATE is a Lisp_Save_Value +/* Read from a non-regular file. STATE is a Lisp_Save_Value object where slot 0 is the file descriptor, slot 1 specifies an offset to put the read bytes, and slot 2 is the maximum amount of bytes to read. Value is the number of bytes read. */ static Lisp_Object -read_contents (Lisp_Object state) +read_non_regular (Lisp_Object state) { int nbytes; @@ -3435,10 +3435,12 @@ return make_number (nbytes); } -/* Condition-case handler used when reading files in insert-file-contents. */ + +/* Condition-case handler used when reading from non-regular files + in insert-file-contents. */ static Lisp_Object -read_contents_quit (Lisp_Object ignore) +read_non_regular_quit (Lisp_Object ignore) { return Qnil; } @@ -3516,10 +3518,9 @@ Lisp_Object p; ptrdiff_t total = 0; bool not_regular = 0; - int save_errno = 0, read_errno = 0; + int save_errno = 0; char read_buf[READ_BUF_SIZE]; struct coding_system coding; - char buffer[1 << 14]; bool replace_handled = 0; bool set_coding_system = 0; Lisp_Object coding_system; @@ -3822,7 +3823,7 @@ { int nread, bufpos; - nread = emacs_read (fd, buffer, sizeof buffer); + nread = emacs_read (fd, read_buf, sizeof read_buf); if (nread < 0) error ("IO error reading %s: %s", SSDATA (orig_filename), emacs_strerror (errno)); @@ -3831,7 +3832,7 @@ if (CODING_REQUIRE_DETECTION (&coding)) { - coding_system = detect_coding_system ((unsigned char *) buffer, + coding_system = detect_coding_system ((unsigned char *) read_buf, nread, nread, 1, 0, coding_system); setup_coding_system (coding_system, &coding); @@ -3847,7 +3848,7 @@ bufpos = 0; while (bufpos < nread && same_at_start < ZV_BYTE - && FETCH_BYTE (same_at_start) == buffer[bufpos]) + && FETCH_BYTE (same_at_start) == read_buf[bufpos]) same_at_start++, bufpos++; /* If we found a discrepancy, stop the scan. Otherwise loop around and scan the next bufferful. */ @@ -3881,7 +3882,7 @@ if (curpos == 0) break; /* How much can we scan in the next step? */ - trial = min (curpos, sizeof buffer); + trial = min (curpos, sizeof read_buf); if (lseek (fd, curpos - trial, SEEK_SET) < 0) report_file_error ("Setting file position", Fcons (orig_filename, Qnil)); @@ -3889,7 +3890,7 @@ total_read = nread = 0; while (total_read < trial) { - nread = emacs_read (fd, buffer + total_read, trial - total_read); + nread = emacs_read (fd, read_buf + total_read, trial - total_read); if (nread < 0) error ("IO error reading %s: %s", SDATA (orig_filename), emacs_strerror (errno)); @@ -3905,7 +3906,7 @@ /* Compare with same_at_start to avoid counting some buffer text as matching both at the file's beginning and at the end. */ while (bufpos > 0 && same_at_end > same_at_start - && FETCH_BYTE (same_at_end - 1) == buffer[bufpos - 1]) + && FETCH_BYTE (same_at_end - 1) == read_buf[bufpos - 1]) same_at_end--, bufpos--; /* If we found a discrepancy, stop the scan. @@ -4197,68 +4198,85 @@ Fcons (orig_filename, Qnil)); } - /* In the following loop, HOW_MUCH contains the total bytes read - so far for a regular file, and not changed for a special file. */ + /* In the following loop, HOW_MUCH contains the total bytes read so + far for a regular file, and not changed for a special file. But, + before exiting the loop, it is set to a negative value if I/O + error occurs. */ how_much = 0; /* Total bytes inserted. */ inserted = 0; - /* Here we don't do code conversion in the loop. It is done by - decode_coding_gap after all data are read into the buffer, or - reading loop is interrupted with quit or due to I/O error. */ - - while (how_much < total) - { - ptrdiff_t nread, maxread = min (total - how_much, READ_BUF_SIZE); - Lisp_Object result; - - /* For a special file, gap is enlarged as we read, - so GAP_SIZE should be checked every time. */ - if (not_regular && (GAP_SIZE < maxread)) - make_gap (maxread - GAP_SIZE); - - /* Read from the file, capturing `quit'. */ - result = internal_condition_case_1 - (read_contents, - make_save_value ("iii", (ptrdiff_t) fd, inserted, maxread), - Qerror, read_contents_quit); - if (NILP (result)) - { - /* Quit is signaled. End the loop and arrange - real quit after decoding the text we read. */ - read_quit = 1; - break; - } - nread = XINT (result); - if (nread <= 0) - { - /* End of file or I/O error. End the loop and - save error code in case of I/O error. */ - if (nread < 0) - read_errno = errno; - break; - } - - /* Adjust gap and end positions. */ - GAP_SIZE -= nread; - GPT += nread; - ZV += nread; - Z += nread; - GPT_BYTE += nread; - ZV_BYTE += nread; - Z_BYTE += nread; - if (GAP_SIZE > 0) - *(GPT_ADDR) = 0; - - /* For a regular file, where TOTAL is the real size, count HOW_MUCH to - compare with it. For a special file, where TOTAL is just a buffer - size, don't bother counting in HOW_MUCH, but always accumulate the - number of bytes read in INSERTED. */ - if (!not_regular) - how_much += nread; - inserted += nread; - } + /* Here, we don't do code conversion in the loop. It is done by + decode_coding_gap after all data are read into the buffer. */ + { + ptrdiff_t gap_size = GAP_SIZE; + + while (how_much < total) + { + /* try is reserved in some compilers (Microsoft C) */ + ptrdiff_t trytry = min (total - how_much, READ_BUF_SIZE); + ptrdiff_t this; + + if (not_regular) + { + Lisp_Object nbytes; + + /* Maybe make more room. */ + if (gap_size < trytry) + { + make_gap (trytry - gap_size); + gap_size = GAP_SIZE - inserted; + } + + /* Read from the file, capturing `quit'. When an + error occurs, end the loop, and arrange for a quit + to be signaled after decoding the text we read. */ + nbytes = internal_condition_case_1 + (read_non_regular, + make_save_value ("iii", (ptrdiff_t) fd, inserted, trytry), + Qerror, read_non_regular_quit); + + if (NILP (nbytes)) + { + read_quit = 1; + break; + } + + this = XINT (nbytes); + } + else + { + /* Allow quitting out of the actual I/O. We don't make text + part of the buffer until all the reading is done, so a C-g + here doesn't do any harm. */ + immediate_quit = 1; + QUIT; + this = emacs_read (fd, + ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE + + inserted), + trytry); + immediate_quit = 0; + } + + if (this <= 0) + { + how_much = this; + break; + } + + gap_size -= this; + + /* For a regular file, where TOTAL is the real size, + count HOW_MUCH to compare with it. + For a special file, where TOTAL is just a buffer size, + so don't bother counting in HOW_MUCH. + (INSERTED is where we count the number of characters inserted.) */ + if (! not_regular) + how_much += this; + inserted += this; + } + } /* Now we have either read all the file data into the gap, or stop reading on I/O error or quit. If nothing was @@ -4280,6 +4298,23 @@ /* Discard the unwind protect for closing the file. */ specpdl_ptr--; + if (how_much < 0) + error ("IO error reading %s: %s", + SDATA (orig_filename), emacs_strerror (errno)); + + /* Make the text read part of the buffer. */ + GAP_SIZE -= inserted; + GPT += inserted; + GPT_BYTE += inserted; + ZV += inserted; + ZV_BYTE += inserted; + Z += inserted; + Z_BYTE += inserted; + + if (GAP_SIZE > 0) + /* Put an anchor to ensure multi-byte form ends at gap. */ + *GPT_ADDR = 0; + notfound: if (NILP (coding_system)) @@ -4568,15 +4603,10 @@ report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); } - /* There was an error reading file. */ - if (read_errno) - error ("IO error reading %s: %s", - SDATA (orig_filename), emacs_strerror (read_errno)); - - /* Quit was signaled. */ if (read_quit) Fsignal (Qquit, Qnil); + /* Retval needs to be dealt with in all cases consistently. */ if (NILP (val)) val = list2 (orig_filename, make_number (inserted)); ------------------------------------------------------------ revno: 111576 fixes bug: http://debbugs.gnu.org/13460 committer: Agustin Martin branch nick: trunk timestamp: Mon 2013-01-21 17:05:30 +0100 message: ispell.el: Make sure hunspell specific dict names are used for standard dicts when using hunspell. (ispell-hunspell-dictionary-equivs-alist): New variable to map standard dict names to hunspell ones. (ispell-set-spellchecker-params): Make sure specific dict names are used for standard dicts with hunspell. If a mapping is missing, skip that dictionary. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-21 12:14:56 +0000 +++ lisp/ChangeLog 2013-01-21 16:05:30 +0000 @@ -1,3 +1,10 @@ +2013-01-21 Agustín Martín Domingo + + * textmodes/ispell.el (ispell-hunspell-dictionary-equivs-alist): + New variable to map standard dict names to hunspell ones. + (ispell-set-spellchecker-params): Make sure specific dict names + are used for standard dicts with hunspell. + 2013-01-21 Tassilo Horn * textmodes/reftex-cite.el (reftex-format-citation): Add format === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2013-01-11 23:08:55 +0000 +++ lisp/textmodes/ispell.el 2013-01-21 16:05:30 +0000 @@ -773,6 +773,41 @@ (make-obsolete-variable 'ispell-aspell-supports-utf8 'ispell-encoding8-command "23.1") +(defvar ispell-hunspell-dictionary-equivs-alist + '(("american" "en_US") + ("brasileiro" "pt_BR") + ("british" "en_GB") + ("castellano" "es_ES") + ("castellano8" "es_ES") + ("czech" "cs_CZ") + ("dansk" "da_DK") + ("deutsch" "de_DE") + ("deutsch8" "de_DE") + ("english" "en_US") + ("esperanto" "eo") + ("esperanto-tex" "eo") + ("finnish" "fi_FI") + ("francais7" "fr_FR") + ("francais" "fr_FR") + ("francais-tex" "fr_FR") + ("german" "de_DE") + ("german8" "de_DE") + ("italiano" "it_IT") + ("nederlands" "nl_NL") + ("nederlands8" "nl_NL") + ("norsk" "nn_NO") + ("norsk7-tex" "nn_NO") + ("polish" "pl_PL") + ("portugues" "pt_PT") + ("russian" "ru_RU") + ("russianw" "ru_RU") + ("slovak" "sk_SK") + ("slovenian" "sl_SI") + ("svenska" "sv_SE") + ("hebrew" "he_IL")) + "Alist with matching hunspell dict names for standard dict names in + `ispell-dictionary-base-alist'.") + (defvar ispell-emacs-alpha-regexp (if (string-match "^[[:alpha:]]+$" "abcde") "[[:alpha:]]" @@ -1134,9 +1169,57 @@ ispell-encoding8-command) ispell-aspell-dictionary-alist nil)) + (ispell-dictionary-base-alist ispell-dictionary-base-alist) ispell-base-dicts-override-alist ; Override only base-dicts-alist all-dicts-alist) + ;; While ispell and aspell (through aliases) use the traditional + ;; dict naming originally expected by ispell.el, hunspell + ;; uses locale based names with no alias. We need to map + ;; standard names to locale based names to make default dict + ;; definitions available for hunspell. + (if ispell-really-hunspell + (let (tmp-dicts-alist) + (dolist (adict ispell-dictionary-base-alist) + (let* ((dict-name (nth 0 adict)) + (dict-equiv + (cadr (assoc dict-name + ispell-hunspell-dictionary-equivs-alist))) + (ispell-args (nth 5 adict)) + (ispell-args-has-d (member "-d" ispell-args)) + skip-dict) + ;; Remove "-d" option from `ispell-args' if present + (if ispell-args-has-d + (let ((ispell-args-after-d + (cdr (cdr ispell-args-has-d))) + (ispell-args-before-d + (butlast ispell-args (length ispell-args-has-d)))) + (setq ispell-args + (nconc ispell-args-before-d + ispell-args-after-d)))) + ;; Unless default dict, re-add "-d" option with the mapped value + (if dict-name + (if dict-equiv + (nconc ispell-args (list "-d" dict-equiv)) + (message + "ispell-set-spellchecker-params: Missing hunspell equiv for \"%s\". Skipping." + dict-name) + (setq skip-dict t))) + + (unless skip-dict + (add-to-list 'tmp-dicts-alist + (list + dict-name ; dict name + (nth 1 adict) ; casechars + (nth 2 adict) ; not-casechars + (nth 3 adict) ; otherchars + (nth 4 adict) ; many-otherchars-p + ispell-args ; ispell-args + (nth 6 adict) ; extended-character-mode + (nth 7 adict) ; dict encoding + )))) + (setq ispell-dictionary-base-alist tmp-dicts-alist)))) + (run-hooks 'ispell-initialize-spellchecker-hook) ;; Add dicts to ``ispell-dictionary-alist'' unless already present. ------------------------------------------------------------ revno: 111575 committer: Tassilo Horn branch nick: trunk timestamp: Mon 2013-01-21 13:14:56 +0100 message: * textmodes/reftex-cite.el (reftex-format-citation): Add format chars for note (%N) and url (%U). * textmodes/reftex-vars.el (reftex-cite-format): Document them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-21 10:45:20 +0000 +++ lisp/ChangeLog 2013-01-21 12:14:56 +0000 @@ -1,3 +1,9 @@ +2013-01-21 Tassilo Horn + + * textmodes/reftex-cite.el (reftex-format-citation): Add format + chars for note (%N) and url (%U). + * textmodes/reftex-vars.el (reftex-cite-format): Document them. + 2013-01-21 Juri Linkov * frame.el: Bind `f10' in `esc-map' to `toggle-frame-maximized' === modified file 'lisp/textmodes/reftex-cite.el' --- lisp/textmodes/reftex-cite.el 2013-01-01 09:11:05 +0000 +++ lisp/textmodes/reftex-cite.el 2013-01-21 12:14:56 +0000 @@ -1043,6 +1043,7 @@ ((= l ?k) (reftex-get-bib-field "key" entry)) ((= l ?m) (reftex-get-bib-field "month" entry)) ((= l ?n) (reftex-get-bib-field "number" entry)) + ((= l ?N) (reftex-get-bib-field "note" entry)) ((= l ?o) (reftex-get-bib-field "organization" entry)) ((= l ?p) (reftex-get-bib-field "pages" entry)) ((= l ?P) (car (split-string @@ -1050,6 +1051,7 @@ "[- .]+"))) ((= l ?s) (reftex-get-bib-field "school" entry)) ((= l ?u) (reftex-get-bib-field "publisher" entry)) + ((= l ?U) (reftex-get-bib-field "url" entry)) ((= l ?r) (reftex-get-bib-field "address" entry)) ((= l ?t) (reftex-get-bib-field "title" entry)) ((= l ?T) (reftex-abbreviate-title === modified file 'lisp/textmodes/reftex-vars.el' --- lisp/textmodes/reftex-vars.el 2013-01-01 09:11:05 +0000 +++ lisp/textmodes/reftex-vars.el 2013-01-21 12:14:56 +0000 @@ -1125,12 +1125,12 @@ %e Works like %a, but on list of editor names. (%2e and %E work a well) It is also possible to access all other BibTeX database fields: -%b booktitle %c chapter %d edition %h howpublished -%i institution %j journal %k key %m month -%n number %o organization %p pages %P first page -%r address %s school %u publisher %t title -%v volume %y year -%B booktitle, abbreviated %T title, abbreviated +%b booktitle %c chapter %d edition %h howpublished +%i institution %j journal %k key %m month +%n number %N note %o organization %p pages +%P first page %r address %s school %u publisher +%U url %t title %v volume %y year +%B booktitle, abbreviated %T title, abbreviated Usually, only %l is needed. The other stuff is mainly for the echo area display, and for (setq reftex-comment-citations t). ------------------------------------------------------------ revno: 111574 fixes bug: http://debbugs.gnu.org/13484 committer: Juri Linkov branch nick: trunk timestamp: Mon 2013-01-21 12:45:20 +0200 message: * lisp/frame.el: Bind `f10' in `esc-map' to `toggle-frame-maximized' in addition to existing separate binding `meta f10' in `global-map'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-21 09:49:43 +0000 +++ lisp/ChangeLog 2013-01-21 10:45:20 +0000 @@ -1,3 +1,9 @@ +2013-01-21 Juri Linkov + + * frame.el: Bind `f10' in `esc-map' to `toggle-frame-maximized' + in addition to existing separate binding `meta f10' in `global-map'. + (Bug#13484) + 2013-01-21 Michael Albinus Improve XEmacs compatibility. === modified file 'lisp/frame.el' --- lisp/frame.el 2013-01-02 16:13:04 +0000 +++ lisp/frame.el 2013-01-21 10:45:20 +0000 @@ -1707,6 +1707,7 @@ (define-key ctl-x-5-map "o" 'other-frame) (define-key global-map [f11] 'toggle-frame-fullscreen) (define-key global-map [(meta f10)] 'toggle-frame-maximized) +(define-key esc-map [f10] 'toggle-frame-maximized) ;; Misc. ------------------------------------------------------------ revno: 111573 committer: Michael Albinus + + Improve XEmacs compatibility. + + * net/tramp.el (tramp-replace-environment-variables): Make it a defun. + + * net/tramp-adb.el (top): Require `time-date'. + (tramp-adb-ls-output-time-less-p): Use `tramp-time-less-p'. + (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use + `tramp-file-name-handler'. + (tramp-adb-maybe-open-connection): Use + `tramp-compat-set-process-query-on-exit-flag'. + + * net/tramp-sh.el (tramp-sh-handle-file-acl): Use + `tramp-compat-funcall'. + + * net/tramp-smb.el (tramp-smb-handle-file-acl): Use `looking-at' and + `tramp-compat-funcall'. + 2013-01-21 Jürgen Hötzel * net/tramp-adb.el (tramp-adb-handle-start-file-process): Complete === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-21 09:40:51 +0000 +++ lisp/net/tramp-adb.el 2013-01-21 09:49:43 +0000 @@ -33,6 +33,7 @@ ;;; Code: (require 'tramp) +(require 'time-date) (defvar dired-move-to-filename-regexp) @@ -465,7 +466,7 @@ (setq time-a (apply 'encode-time (parse-time-string (match-string 0 a)))) (string-match tramp-adb-ls-date-regexp b) (setq time-b (apply 'encode-time (parse-time-string (match-string 0 b)))) - (time-less-p time-b time-a))) + (tramp-time-less-p time-b time-a))) (defun tramp-adb-ls-output-name-less-p (a b) "Sort \"ls\" output by name, ascending." @@ -638,7 +639,7 @@ newname (expand-file-name newname)) (if (file-directory-p filename) - (copy-directory filename newname keep-date t) + (tramp-file-name-handler 'copy-directory filename newname keep-date t) (with-tramp-progress-reporter (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 0 (format "Copying %s to %s" filename newname) @@ -698,7 +699,10 @@ (tramp-flush-file-property v localname) ;; Short track. (tramp-adb-barf-unless-okay - v (format "mv %s %s" (file-remote-p filename 'localname) localname) + v (format + "mv %s %s" + (tramp-file-name-handler 'file-remote-p filename 'localname) + localname) "Error renaming %s to %s" filename newname)) ;; Rename by copy. @@ -1071,7 +1075,7 @@ (tramp-adb-wait-for-output p) (unless (eq 'run (process-status p)) (tramp-error vec 'file-error "Terminated!")) - (set-process-query-on-exit-flag p nil) + (tramp-compat-set-process-query-on-exit-flag p nil) ;; Check whether the properties have been changed. If ;; yes, this is a strong indication that we must expire all === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-01-07 09:25:34 +0000 +++ lisp/net/tramp-sh.el 2013-01-21 09:49:43 +0000 @@ -1555,7 +1555,8 @@ (goto-char (point-max)) (delete-blank-lines) (when (> (point-max) (point-min)) - (substring-no-properties (buffer-string)))))))) + (tramp-compat-funcall + 'substring-no-properties (buffer-string)))))))) (defun tramp-sh-handle-set-file-acl (filename acl-string) "Like `set-file-acl' for Tramp files." === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-01-02 16:13:04 +0000 +++ lisp/net/tramp-smb.el 2013-01-21 09:49:43 +0000 @@ -649,13 +649,14 @@ v (format "getfacl \"%s\"" (tramp-smb-get-localname v))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-min)) - (while (looking-at-p "^#") + (while (looking-at "^#") (forward-line) (delete-region (point-min) (point))) (goto-char (point-max)) (delete-blank-lines) (when (> (point-max) (point-min)) - (substring-no-properties (buffer-string)))))))) + (tramp-compat-funcall + 'substring-no-properties (buffer-string)))))))) (defun tramp-smb-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files." === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-01-09 09:49:27 +0000 +++ lisp/net/tramp.el 2013-01-21 09:49:43 +0000 @@ -1779,28 +1779,23 @@ (or (file-modes filename) (logand (default-file-modes) (tramp-compat-octal-to-decimal "0666")))) -(defalias 'tramp-replace-environment-variables - (if (ignore-errors - (equal "${ tramp?}" - (tramp-compat-funcall - 'substitute-env-vars "${ tramp?}" 'only-defined))) - (lambda (filename) - "Like `substitute-env-vars' with `only-defined' non-nil." - (tramp-compat-funcall 'substitute-env-vars filename 'only-defined)) - (lambda (filename) - "Replace environment variables in FILENAME. +(defun tramp-replace-environment-variables (filename) + "Replace environment variables in FILENAME. Return the string with the replaced variables." - (save-match-data - (let ((idx (string-match "$\\(\\w+\\)" filename))) - ;; `$' is coded as `$$'. - (when (and idx - (or (zerop idx) (not (eq ?$ (aref filename (1- idx))))) - (getenv (match-string 1 filename))) - (setq filename - (replace-match - (substitute-in-file-name (match-string 0 filename)) - t nil filename))) - filename))))) + (or (ignore-errors + (tramp-compat-funcall 'substitute-env-vars filename 'only-defined)) + ;; We need an own implementation. + (save-match-data + (let ((idx (string-match "$\\(\\w+\\)" filename))) + ;; `$' is coded as `$$'. + (when (and idx + (or (zerop idx) (not (eq ?$ (aref filename (1- idx))))) + (getenv (match-string 1 filename))) + (setq filename + (replace-match + (substitute-in-file-name (match-string 0 filename)) + t nil filename))) + filename)))) ;; In XEmacs, electricity is implemented via a key map for ?/ and ?~, ;; which calls corresponding functions (see minibuf.el). ------------------------------------------------------------ revno: 111572 author: Jürgen Hötzel committer: Michael Albinus + + * net/tramp-adb.el (tramp-adb-handle-start-file-process): Complete + reimplementation using "adb shell command ..." instead of running + remote shell interactively. + 2013-01-20 Glenn Morris * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-09 08:17:47 +0000 +++ lisp/net/tramp-adb.el 2013-01-21 09:40:51 +0000 @@ -907,15 +907,11 @@ (cons program args) " ")))) (tramp-process-connection-type (or (null program) tramp-process-connection-type)) - (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) (name1 name) (i 0)) (unwind-protect (save-excursion (save-restriction - (unless buffer - ;; BUFFER can be nil. We use a temporary buffer. - (setq buffer (generate-new-buffer tramp-temp-buffer-name))) (while (get-process name1) ;; NAME must be unique as process name. (setq i (1+ i) @@ -923,35 +919,21 @@ (setq name name1) ;; Set the new process properties. (tramp-set-connection-property v "process-name" name) - (tramp-set-connection-property v "process-buffer" buffer) - ;; Activate narrowing in order to save BUFFER contents. - ;; Clear also the modification time; otherwise we might - ;; be interrupted by `verify-visited-file-modtime'. - (with-current-buffer (tramp-get-connection-buffer v) - (let ((buffer-undo-list t)) - (clear-visited-file-modtime) - (narrow-to-region (point-max) (point-max)) - (if command - ;; Send the command. - (tramp-adb-send-command v command) - ;; Open the connection. - (tramp-adb-maybe-open-connection v)))) - (let ((p (tramp-get-connection-process v))) - ;; Set sentinel and query flag for this process. - (tramp-set-connection-property p "vector" v) - (set-process-sentinel p 'tramp-process-sentinel) - (tramp-compat-set-process-query-on-exit-flag p t) - ;; Return process. - p))) - ;; Save exit. - (with-current-buffer (tramp-get-connection-buffer v) - (if (string-match tramp-temp-buffer-name (buffer-name)) - (progn - (set-process-buffer (tramp-get-connection-process v) nil) - (kill-buffer (current-buffer))) - (set-buffer-modified-p bmp))) - (tramp-set-connection-property v "process-name" nil) - (tramp-set-connection-property v "process-buffer" nil))))) + (when command + (let* ((host (tramp-file-name-host v)) + (devices (mapcar 'cadr (tramp-adb-parse-device-names nil))) + (args (if (> (length host) 0) + (list "-s" host "shell" command) + (list "shell" command))) + (p (apply 'start-process (tramp-get-connection-name v) buffer + (tramp-adb-program) args))) + ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) + (set-process-sentinel p 'tramp-process-sentinel) + (tramp-compat-set-process-query-on-exit-flag p t) + ;; Return process. + p)))) + (tramp-set-connection-property v "process-name" nil))))) ;; Helper functions. ------------------------------------------------------------ revno: 111571 fixes bug: http://debbugs.gnu.org/13503 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2013-01-20 20:06:54 +0200 message: Mention in NEWS that scroll-bar-adjust-thumb-portion is for X only. Bug#13503. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-01-19 20:38:13 +0000 +++ etc/NEWS 2013-01-20 18:06:54 +0000 @@ -59,6 +59,9 @@ POSIX ACL interfaces. ** New option `scroll-bar-adjust-thumb-portion'. +Available only on X, this option allows to control over-scrolling +using the scroll bar (i.e. dragging the thumb down even when the end +of the buffer is visible). * Editing Changes in Emacs 24.4