Now on revision 112232. ------------------------------------------------------------ revno: 112232 committer: Dmitry Gutov branch nick: trunk timestamp: Sat 2013-04-06 02:22:12 +0400 message: * lisp/whitespace.el (whitespace-color-on, whitespace-color-off): Only call `font-lock-fontify-buffer' when `font-lock-mode' is on. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 18:46:59 +0000 +++ lisp/ChangeLog 2013-04-05 22:22:12 +0000 @@ -3,6 +3,11 @@ * emacs-lisp/package.el (package-compute-transaction): Fix last fix. Suggested by Donald Curtis (bug#14082). +2013-04-05 Dmitry Gutov + + * whitespace.el (whitespace-color-on, whitespace-color-off): Only + call `font-lock-fontify-buffer' when `font-lock-mode' is on. + 2013-04-05 Jacek Chrząszcz (tiny change) * ispell.el (ispell-set-spellchecker-params): === modified file 'lisp/whitespace.el' --- lisp/whitespace.el 2013-03-19 15:12:40 +0000 +++ lisp/whitespace.el 2013-04-05 22:22:12 +0000 @@ -2243,7 +2243,8 @@ (whitespace-space-after-tab-regexp 'space))) 1 whitespace-space-after-tab t))))) (font-lock-add-keywords nil whitespace-font-lock-keywords t) - (font-lock-fontify-buffer))) + (when font-lock-mode + (font-lock-fontify-buffer)))) (defun whitespace-color-off () @@ -2253,7 +2254,8 @@ (remove-hook 'post-command-hook #'whitespace-post-command-hook t) (remove-hook 'before-change-functions #'whitespace-buffer-changed t) (font-lock-remove-keywords nil whitespace-font-lock-keywords) - (font-lock-fontify-buffer))) + (when font-lock-mode + (font-lock-fontify-buffer)))) (defun whitespace-trailing-regexp (limit) ------------------------------------------------------------ revno: 112231 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14082 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-04-05 14:46:59 -0400 message: * lisp/emacs-lisp/package.el (package-compute-transaction): Fix last fix. Suggested by Donald Curtis . diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 15:43:07 +0000 +++ lisp/ChangeLog 2013-04-05 18:46:59 +0000 @@ -1,3 +1,8 @@ +2013-04-05 Stefan Monnier + + * emacs-lisp/package.el (package-compute-transaction): Fix last fix. + Suggested by Donald Curtis (bug#14082). + 2013-04-05 Jacek Chrząszcz (tiny change) * ispell.el (ispell-set-spellchecker-params): === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-04-04 02:46:38 +0000 +++ lisp/emacs-lisp/package.el 2013-04-05 18:46:59 +0000 @@ -809,12 +809,8 @@ "Need package `%s-%s', but only %s is available" (symbol-name next-pkg) (package-version-join next-version) (package-version-join (package-desc-vers (cdr pkg-desc))))) - ;; Only add to the transaction if we don't already have it. - (unless (memq next-pkg package-list) - (setq package-list - ;; Move to front, so it gets installed early enough - ;; (bug#14082). - (cons next-pkg (delq next-pkg package-list)))) + ;; Move to front, so it gets installed early enough (bug#14082). + (setq package-list (cons next-pkg (delq next-pkg package-list))) (setq package-list (package-compute-transaction package-list (package-desc-reqs ------------------------------------------------------------ revno: 112230 committer: Agustin Martin branch nick: trunk timestamp: Fri 2013-04-05 17:43:07 +0200 message: ispell.el (ispell-set-spellchecker-params): Really set `ispell-args' for all equivs. Was not actually modifying ispell-args for dicts where it was nil before. Thanks Jacek Chrzaszcz. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 14:00:08 +0000 +++ lisp/ChangeLog 2013-04-05 15:43:07 +0000 @@ -1,3 +1,8 @@ +2013-04-05 Jacek Chrząszcz (tiny change) + + * ispell.el (ispell-set-spellchecker-params): + Really set `ispell-args' for all equivs. + 2013-04-05 Stefan Monnier * ido.el (ido-completions): Use extra elements of ido-decorations === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2013-03-03 06:40:21 +0000 +++ lisp/textmodes/ispell.el 2013-04-05 15:43:07 +0000 @@ -1383,7 +1383,8 @@ ;; Unless default dict, re-add "-d" option with the mapped value (if dict-name (if dict-equiv - (nconc ispell-args (list "-d" dict-equiv)) + (setq ispell-args + (nconc ispell-args (list "-d" dict-equiv))) (message "ispell-set-spellchecker-params: Missing hunspell equiv for \"%s\". Skipping." dict-name) ------------------------------------------------------------ revno: 112229 [merge] committer: K. Handa branch nick: trunk timestamp: Fri 2013-04-05 23:19:51 +0900 message: Optimize the code for reading UTF-8 files. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-05 14:07:02 +0000 +++ src/ChangeLog 2013-04-05 14:17:55 +0000 @@ -1,3 +1,23 @@ +2013-04-03 Kenichi Handa + + The following changes is to optimize the code for reading UTF-8 + files. + + * coding.c (check_ascii): Renamed from detect_ascii. Return value + changed. Check EOL format. Do not call adjust_coding_eol_type + here. + (check_utf_8): New function. + (adjust_coding_eol_type): Do nothing if already adjusted. + (detect_coding): Compare the return value of check_ascii with + coding->src_bytes. Call adjust_coding_eol_type if necessary. + (decode_coding_gap): Optimize for valid UTF-8. + +2013-03-21 Kenichi Handa + + * coding.c (syms_of_coding): Cancel previous change. + + * insdel.c (insert_from_gap): Fix previous change. + 2013-04-05 Dmitry Antipov Consistently use platform-specific function to detect window system. @@ -484,7 +504,7 @@ * coding.c (decode_coding_gap): Fix typo caught by static checking. -2013-03-15 handa +2013-03-15 Kenichi Handa * insdel.c (insert_from_gap): New arg text_at_gap_tail. (adjust_after_replace): Make it back to static. Delete the third === modified file 'src/coding.c' --- src/coding.c 2013-03-20 08:08:34 +0000 +++ src/coding.c 2013-04-05 14:08:56 +0000 @@ -6072,17 +6072,18 @@ #define EOL_SEEN_CRLF 4 -static Lisp_Object adjust_coding_eol_type (struct coding_system *coding, int eol_seen); - - -/* Return true iff all the source bytes are ASCII. +static Lisp_Object adjust_coding_eol_type (struct coding_system *coding, + int eol_seen); + + +/* Return the number of ASCII characters at the head of the source. By side effects, set coding->head_ascii and coding->eol_seen. The value of coding->eol_seen is "logical or" of EOL_SEEN_LF, EOL_SEEN_CR, and EOL_SEEN_CRLF, but the value is reliable only when all the source bytes are ASCII. */ -static bool -detect_ascii (struct coding_system *coding) +static int +check_ascii (struct coding_system *coding) { const unsigned char *src, *end; Lisp_Object eol_type = CODING_ID_EOL_TYPE (coding->id); @@ -6096,21 +6097,20 @@ src = coding->source; end = src + coding->src_bytes; - if (inhibit_eol_conversion) + if (inhibit_eol_conversion + || eol_seen != EOL_SEEN_NONE) { /* We don't have to check EOL format. */ while (src < end && !( *src & 0x80)) src++; - eol_seen = EOL_SEEN_LF; - adjust_coding_eol_type (coding, eol_seen); - } - else if (eol_seen != EOL_SEEN_NONE) - { - /* We don't have to check EOL format either. */ - while (src < end && !(*src & 0x80)) src++; + if (inhibit_eol_conversion) + { + eol_seen = EOL_SEEN_LF; + adjust_coding_eol_type (coding, eol_seen); + } } else { - end--; /* We look ahead one byte. */ + end--; /* We look ahead one byte for "CR LF". */ while (src < end) { int c = *src; @@ -6118,6 +6118,69 @@ if (c & 0x80) break; src++; + if (c == '\r') + { + if (*src == '\n') + { + eol_seen |= EOL_SEEN_CRLF; + src++; + } + else + eol_seen |= EOL_SEEN_CR; + } + else if (c == '\n') + eol_seen |= EOL_SEEN_LF; + } + if (src == end) + { + int c = *src; + + /* All bytes but the last one C are ASCII. */ + if (! (c & 0x80)) + { + if (c == '\r') + eol_seen |= EOL_SEEN_CR; + else if (c == '\n') + eol_seen |= EOL_SEEN_LF; + src++; + } + } + } + coding->head_ascii = src - coding->source; + coding->eol_seen = eol_seen; + return (coding->head_ascii); +} + + +/* Return the number of charcters at the source if all the bytes are + valid UTF-8 (of Unicode range). Otherwise, return -1. By side + effects, update coding->eol_seen. The value of coding->eol_seen is + "logical or" of EOL_SEEN_LF, EOL_SEEN_CR, and EOL_SEEN_CRLF, but + the value is reliable only when all the source bytes are valid + UTF-8. */ + +static int +check_utf_8 (struct coding_system *coding) +{ + const unsigned char *src, *end; + int eol_seen = coding->eol_seen; + int nchars = coding->head_ascii; + + if (coding->head_ascii < 0) + check_ascii (coding); + else + coding_set_source (coding); + src = coding->source + coding->head_ascii; + /* We look ahead one byte for CR LF. */ + end = coding->source + coding->src_bytes - 1; + + while (src < end) + { + int c = *src; + + if (UTF_8_1_OCTET_P (*src)) + { + src++; if (c < 0x20) { if (c == '\r') @@ -6126,6 +6189,7 @@ { eol_seen |= EOL_SEEN_CRLF; src++; + nchars++; } else eol_seen |= EOL_SEEN_CR; @@ -6134,27 +6198,58 @@ eol_seen |= EOL_SEEN_LF; } } - if (src > end) - /* The last two bytes are CR LF, which means that we have - scanned all bytes. */ - end++; - else if (src == end) - { - end++; - if (! (*src & 0x80)) - { - if (*src == '\r') - eol_seen |= EOL_SEEN_CR; - else if (*src == '\n') - eol_seen |= EOL_SEEN_LF; - src++; - } - } - adjust_coding_eol_type (coding, eol_seen); - } - coding->head_ascii = src - coding->source; + else if (UTF_8_2_OCTET_LEADING_P (c)) + { + if (c < 0xC2 /* overlong sequence */ + || src + 1 >= end + || ! UTF_8_EXTRA_OCTET_P (src[1])) + return -1; + src += 2; + } + else if (UTF_8_3_OCTET_LEADING_P (c)) + { + if (src + 2 >= end + || ! (UTF_8_EXTRA_OCTET_P (src[1]) + && UTF_8_EXTRA_OCTET_P (src[2]))) + return -1; + c = (((c & 0xF) << 12) + | ((src[1] & 0x3F) << 6) | (src[2] & 0x3F)); + if (c < 0x800 /* overlong sequence */ + || (c >= 0xd800 && c < 0xe000)) /* surrogates (invalid) */ + return -1; + src += 3; + } + else if (UTF_8_4_OCTET_LEADING_P (c)) + { + if (src + 3 >= end + || ! (UTF_8_EXTRA_OCTET_P (src[1]) + && UTF_8_EXTRA_OCTET_P (src[2]) + && UTF_8_EXTRA_OCTET_P (src[3]))) + return -1; + c = (((c & 0x7) << 18) | ((src[1] & 0x3F) << 12) + | ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)); + if (c < 0x10000 /* overlong sequence */ + || c >= 0x110000) /* non-Unicode character */ + return -1; + src += 4; + } + else + return -1; + nchars++; + } + + if (src == end) + { + if (! UTF_8_1_OCTET_P (*src)) + return -1; + nchars++; + if (*src == '\r') + eol_seen |= EOL_SEEN_CR; + else if (*src == '\n') + eol_seen |= EOL_SEEN_LF; + } coding->eol_seen = eol_seen; - return (src == end); + return nchars; } @@ -6269,6 +6364,9 @@ Lisp_Object eol_type; eol_type = CODING_ID_EOL_TYPE (coding->id); + if (! VECTORP (eol_type)) + /* Already adjusted. */ + return eol_type; if (eol_seen & EOL_SEEN_LF) { coding->id = CODING_SYSTEM_ID (AREF (eol_type, 0)); @@ -6360,7 +6458,8 @@ { coding->eol_seen |= EOL_SEEN_CRLF; src++; - coding->head_ascii++; + if (! eight_bit_found) + coding->head_ascii++; } else coding->eol_seen |= EOL_SEEN_CR; @@ -6461,9 +6560,14 @@ coding_systems = AREF (CODING_ID_ATTRS (coding->id), coding_attr_utf_bom); detect_info.found = detect_info.rejected = 0; - if (detect_ascii (coding)) + if (check_ascii (coding) == coding->src_bytes) { + int head_ascii = coding->head_ascii; + + if (coding->eol_seen != EOL_SEEN_NONE) + adjust_coding_eol_type (coding, coding->eol_seen); setup_coding_system (XCDR (coding_systems), coding); + coding->head_ascii = head_ascii; } else { @@ -7620,15 +7724,27 @@ if (CODING_REQUIRE_DETECTION (coding)) detect_coding (coding); attrs = CODING_ID_ATTRS (coding->id); - if (! disable_ascii_optimization) + if (! disable_ascii_optimization + && ! coding->src_multibyte + && ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)) + && NILP (CODING_ATTR_POST_READ (attrs)) + && NILP (get_translation_table (attrs, 0, NULL))) { - if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)) - && NILP (CODING_ATTR_POST_READ (attrs)) - && NILP (get_translation_table (attrs, 0, NULL)) - && (coding->head_ascii >= 0 /* We've already called detect_coding */ - ? coding->head_ascii == bytes - : detect_ascii (coding))) - { + chars = coding->head_ascii; + if (chars < 0) + chars = check_ascii (coding); + if (chars != bytes) + { + if (EQ (CODING_ATTR_TYPE (attrs), Qutf_8)) + chars = check_utf_8 (coding); + else + chars = -1; + } + if (chars >= 0) + { + if (coding->eol_seen != EOL_SEEN_NONE) + adjust_coding_eol_type (coding, coding->eol_seen); + if (coding->eol_seen == EOL_SEEN_CR) { unsigned char *src_end = GAP_END_ADDR; @@ -7645,6 +7761,7 @@ unsigned char *src = GAP_END_ADDR; unsigned char *src_beg = src - coding->src_bytes; unsigned char *dst = src; + ptrdiff_t diff; while (src_beg < src) { @@ -7652,10 +7769,13 @@ if (*src == '\n') src--; } - bytes -= dst - src; + diff = dst - src; + bytes -= diff; + chars -= diff; } - coding->produced_char = coding->produced = bytes; - insert_from_gap (bytes, bytes, 1); + coding->produced = bytes; + coding->produced_char = chars; + insert_from_gap (chars, bytes, 1); return; } } @@ -10877,7 +10997,7 @@ DEFVAR_BOOL ("disable-ascii-optimization", disable_ascii_optimization, doc: /* If non-nil, Emacs does not optimize code decoder for ASCII files. Internal use only. Removed after the experimental optimizer gets stable. */); - disable_ascii_optimization = 1; + disable_ascii_optimization = 0; DEFVAR_LISP ("translation-table-for-input", Vtranslation_table_for_input, doc: /* Char table for translating self-inserting characters. === modified file 'src/insdel.c' --- src/insdel.c 2013-03-28 14:04:49 +0000 +++ src/insdel.c 2013-04-05 14:17:55 +0000 @@ -983,6 +983,9 @@ void insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) { + int ins_charpos = GPT; + int ins_bytepos = GPT_BYTE; + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) nchars = nbytes; @@ -1003,18 +1006,18 @@ eassert (GPT <= GPT_BYTE); - adjust_overlays_for_insert (GPT - nchars, nchars); - adjust_markers_for_insert (GPT - nchars, GPT_BYTE - nbytes, - GPT, GPT_BYTE, 0); + adjust_overlays_for_insert (ins_charpos, nchars); + adjust_markers_for_insert (ins_charpos, ins_bytepos, + ins_charpos + nchars, ins_bytepos + nbytes, 0); if (buffer_intervals (current_buffer)) { - offset_intervals (current_buffer, GPT - nchars, nchars); - graft_intervals_into_buffer (NULL, GPT - nchars, nchars, + offset_intervals (current_buffer, ins_charpos, nchars); + graft_intervals_into_buffer (NULL, ins_charpos, nchars, current_buffer, 0); } - if (! text_at_gap_tail && GPT - nchars < PT) + if (ins_charpos < PT) adjust_point (nchars, nbytes); check_markers (); ------------------------------------------------------------ revno: 112228 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-04-05 18:07:02 +0400 message: Consistently use platform-specific function to detect window system. * lisp.h (check_window_system): New prototype. This function is going to replace check_x, check_w32 and check_ns. (have_menus_p): Mention msdos.c in comment. * fontset.c (check_window_system_func): Remove. Adjust all users. * fontset.h (check_window_system_func): Remove prototype. * nsterm.h (check_ns): * xterm.h (check_x): * w32term.h (check_w32): Likewise. * menu.c (Fx_popup_menu): Use check_window_system. * msdos.c (check_window_system): Define for MS-DOS. * nsfns.m (check_window_system): Define for NS. Adjust all users. * w32fns.c (check_window_system): Likewise for MS-Windows. * xfns.c (check_window_system): Likewise for X. * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c: * xfaces.c, xmenu.c: Use check_window_system where appropriate. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-02 01:54:56 +0000 +++ src/ChangeLog 2013-04-05 14:07:02 +0000 @@ -1,3 +1,22 @@ +2013-04-05 Dmitry Antipov + + Consistently use platform-specific function to detect window system. + * lisp.h (check_window_system): New prototype. This function is + going to replace check_x, check_w32 and check_ns. + (have_menus_p): Mention msdos.c in comment. + * fontset.c (check_window_system_func): Remove. Adjust all users. + * fontset.h (check_window_system_func): Remove prototype. + * nsterm.h (check_ns): + * xterm.h (check_x): + * w32term.h (check_w32): Likewise. + * menu.c (Fx_popup_menu): Use check_window_system. + * msdos.c (check_window_system): Define for MS-DOS. + * nsfns.m (check_window_system): Define for NS. Adjust all users. + * w32fns.c (check_window_system): Likewise for MS-Windows. + * xfns.c (check_window_system): Likewise for X. + * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c: + * xfaces.c, xmenu.c: Use check_window_system where appropriate. + 2013-04-02 Paul Eggert Prefer < to > in range checks such as 0 <= i && i < N. === modified file 'src/font.c' --- src/font.c 2013-04-02 01:54:56 +0000 +++ src/font.c 2013-04-05 14:07:02 +0000 @@ -4844,7 +4844,7 @@ Lisp_Object info; Lisp_Object font_object; - (*check_window_system_func) (); + check_window_system (); if (! FONTP (name)) CHECK_STRING (name); === modified file 'src/fontset.c' --- src/fontset.c 2013-02-08 05:28:52 +0000 +++ src/fontset.c 2013-04-05 14:07:02 +0000 @@ -179,10 +179,6 @@ font for each character. */ static Lisp_Object Vdefault_fontset; -/* Check if any window system is used now. */ -void (*check_window_system_func) (void); - - /* Prototype declarations for static functions. */ static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object); @@ -1213,7 +1209,7 @@ Lisp_Object fontset; int id; - (*check_window_system_func) (); + check_window_system (); CHECK_STRING (pattern); @@ -1919,7 +1915,7 @@ Lisp_Object val, elt; int c, i, j, k; - (*check_window_system_func) (); + check_window_system (); fontset = check_fontset_name (fontset, &frame); === modified file 'src/fontset.h' --- src/fontset.h 2013-01-01 09:11:05 +0000 +++ src/fontset.h 2013-04-05 14:07:02 +0000 @@ -26,9 +26,6 @@ #ifndef EMACS_FONTSET_H #define EMACS_FONTSET_H -/* Check if any window system is used now. */ -extern void (*check_window_system_func) (void); - struct face; extern void free_face_fontset (FRAME_PTR, struct face *); === modified file 'src/frame.c' --- src/frame.c 2013-04-02 01:54:56 +0000 +++ src/frame.c 2013-04-05 14:07:02 +0000 @@ -3493,9 +3493,7 @@ (Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass) { -#ifdef HAVE_X_WINDOWS - check_x (); -#endif + check_window_system (); return xrdb_get_resource (check_x_display_info (Qnil)->xrdb, attribute, class, component, subclass); === modified file 'src/lisp.h' --- src/lisp.h 2013-04-02 01:54:56 +0000 +++ src/lisp.h 2013-04-05 14:07:02 +0000 @@ -3765,6 +3765,11 @@ extern char *x_get_keysym_name (int); #endif /* HAVE_WINDOW_SYSTEM */ +#if defined(HAVE_WINDOW_SYSTEM) || defined (MSDOS) +/* Defined in (x|w32)fns.c, nsfns.m, msdos.c. */ +extern void check_window_system (void); +#endif + #ifdef HAVE_LIBXML2 /* Defined in xml.c. */ extern void syms_of_xml (void); @@ -3772,7 +3777,7 @@ #endif #ifdef HAVE_MENUS -/* Defined in (x|w32)fns.c, nsfns.m... */ +/* Defined in (x|w32)fns.c, nsfns.m, msdos.c. */ extern int have_menus_p (void); #endif === modified file 'src/menu.c' --- src/menu.c 2013-03-24 12:59:45 +0000 +++ src/menu.c 2013-04-05 14:07:02 +0000 @@ -1085,7 +1085,8 @@ #ifdef HAVE_MENUS { bool get_current_pos_p = 0; - /* FIXME!! check_w32 (); or check_x (); or check_ns (); */ + + check_window_system (); /* Decode the first argument: find the window and the coordinates. */ if (EQ (position, Qt) === modified file 'src/msdos.c' --- src/msdos.c 2013-03-28 14:04:49 +0000 +++ src/msdos.c 2013-04-05 14:07:02 +0000 @@ -1920,7 +1920,7 @@ /* We are not X, but we can emulate it well enough for our needs... */ void -check_x (void) +check_window_system (void) { if (! FRAME_MSDOS_P (SELECTED_FRAME ())) error ("Not running under a window system"); === modified file 'src/nsfns.m' --- src/nsfns.m 2013-03-28 14:04:49 +0000 +++ src/nsfns.m 2013-04-05 14:07:02 +0000 @@ -109,7 +109,7 @@ void -check_ns (void) +check_window_system (void) { if (NSApp == nil) error ("OpenStep is not in use or not initialized"); @@ -1145,7 +1145,7 @@ Lisp_Object tfont, tfontsize; static int desc_ctr = 1; - check_ns (); + check_window_system (); /* x_get_arg modifies parms. */ parms = Fcopy_alist (parms); @@ -1442,7 +1442,7 @@ id fm; struct frame *f; - check_ns (); + check_window_system (); fm = [NSFontManager sharedFontManager]; if (NILP (frame)) f = SELECTED_FRAME (); @@ -1466,7 +1466,7 @@ { struct frame *f; - check_ns (); + check_window_system (); if (NILP (frame)) f = SELECTED_FRAME (); else @@ -1503,7 +1503,7 @@ NSString *initS = NILP (init) || !STRINGP (init) ? nil : [NSString stringWithUTF8String: SSDATA (init)]; - check_ns (); + check_window_system (); if (fileDelegate == nil) fileDelegate = [EmacsFileDelegate new]; @@ -1594,7 +1594,7 @@ { const char *value; - check_ns (); + check_window_system (); if (NILP (owner)) owner = build_string([ns_app_name UTF8String]); CHECK_STRING (name); @@ -1614,7 +1614,7 @@ If VALUE is nil, the default is removed. */) (Lisp_Object owner, Lisp_Object name, Lisp_Object value) { - check_ns (); + check_window_system (); if (NILP (owner)) owner = build_string ([ns_app_name UTF8String]); CHECK_STRING (name); @@ -1642,7 +1642,7 @@ doc: /* This function is a no-op. It is only present for completeness. */) (Lisp_Object display) { - check_ns (); + check_window_system (); /* This function has no real equivalent under NeXTstep. Return nil to indicate this. */ return Qnil; @@ -1692,7 +1692,7 @@ { int num; - check_ns (); + check_window_system (); num = [[NSScreen screens] count]; return (num != 0) ? make_number (num) : Qnil; @@ -1706,7 +1706,7 @@ If omitted or nil, the selected frame's display is used. */) (Lisp_Object display) { - check_ns (); + check_window_system (); return make_number ((int) ([ns_get_screen (display) frame].size.height/(92.0/25.4))); } @@ -1719,7 +1719,7 @@ If omitted or nil, the selected frame's display is used. */) (Lisp_Object display) { - check_ns (); + check_window_system (); return make_number ((int) ([ns_get_screen (display) frame].size.width/(92.0/25.4))); } @@ -1733,7 +1733,7 @@ If omitted or nil, the selected frame's display is used. */) (Lisp_Object display) { - check_ns (); + check_window_system (); switch ([ns_get_window (display) backingType]) { case NSBackingStoreBuffered: @@ -1759,7 +1759,7 @@ (Lisp_Object display) { NSWindowDepth depth; - check_ns (); + check_window_system (); depth = [ns_get_screen (display) depth]; if ( depth == NSBestDepth (NSCalibratedWhiteColorSpace, 2, 2, YES, NULL)) @@ -1786,7 +1786,7 @@ If omitted or nil, the selected frame's display is used. */) (Lisp_Object display) { - check_ns (); + check_window_system (); switch ([ns_get_window (display) backingType]) { case NSBackingStoreBuffered: @@ -1839,7 +1839,7 @@ The argument DISPLAY is currently ignored. */) (Lisp_Object display) { - check_ns (); + check_window_system (); /*ns_delete_terminal (dpyinfo->terminal); */ [NSApp terminate: NSApp]; return Qnil; @@ -1865,7 +1865,7 @@ doc: /* Hides all applications other than Emacs. */) (void) { - check_ns (); + check_window_system (); [NSApp hideOtherApplications: NSApp]; return Qnil; } @@ -1878,7 +1878,7 @@ the active application. */) (Lisp_Object on) { - check_ns (); + check_window_system (); if (EQ (on, intern ("activate"))) { [NSApp unhide: NSApp]; @@ -1897,7 +1897,7 @@ doc: /* Shows the 'Info' or 'About' panel for Emacs. */) (void) { - check_ns (); + check_window_system (); [NSApp orderFrontStandardAboutPanel: nil]; return Qnil; } @@ -1975,7 +1975,7 @@ NSMenu *svcs; id delegate; - check_ns (); + check_window_system (); svcs = [[NSMenu alloc] initWithTitle: @"Services"]; [NSApp setServicesMenu: svcs]; [NSApp registerServicesMenuSendTypes: ns_send_types @@ -2028,7 +2028,7 @@ char *utfStr; CHECK_STRING (service); - check_ns (); + check_window_system (); utfStr = SSDATA (service); svcName = [NSString stringWithUTF8String: utfStr]; @@ -2152,7 +2152,7 @@ NSEvent *nxev; CHECK_STRING (script); - check_ns (); + check_window_system (); block_input (); @@ -2235,7 +2235,7 @@ /* remove appname prefix; TODO: allow for !="Emacs" */ char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0); const char *res; - check_ns (); + check_window_system (); if (inhibit_x_resources) /* --quick was passed, so this is a no-op. */ @@ -2305,7 +2305,7 @@ (Lisp_Object color, Lisp_Object frame) { NSColor * col; - check_ns (); + check_window_system (); return ns_lisp_to_color (color, &col) ? Qnil : Qt; } @@ -2317,7 +2317,7 @@ NSColor * col; CGFloat red, green, blue, alpha; - check_ns (); + check_window_system (); CHECK_STRING (color); if (ns_lisp_to_color (color, &col)) @@ -2336,7 +2336,7 @@ { NSWindowDepth depth; NSString *colorSpace; - check_ns (); + check_window_system (); depth = [ns_get_screen (display) depth]; colorSpace = NSColorSpaceFromDepth (depth); @@ -2356,7 +2356,7 @@ (Lisp_Object display) { NSWindowDepth depth; - check_ns (); + check_window_system (); depth = [ns_get_screen (display) depth]; return NSBitsPerPixelFromDepth (depth) > 1 ? Qt : Qnil; @@ -2371,7 +2371,7 @@ If omitted or nil, that stands for the selected frame's display. */) (Lisp_Object display) { - check_ns (); + check_window_system (); return make_number ((int) [ns_get_screen (display) frame].size.width); } @@ -2384,7 +2384,7 @@ If omitted or nil, that stands for the selected frame's display. */) (Lisp_Object display) { - check_ns (); + check_window_system (); return make_number ((int) [ns_get_screen (display) frame].size.height); } @@ -2404,7 +2404,7 @@ NSScreen *screen; NSRect vScreen; - check_ns (); + check_window_system (); screen = ns_get_screen (display); if (!screen) return Qnil; @@ -2428,7 +2428,7 @@ If omitted or nil, that stands for the selected frame's display. */) (Lisp_Object display) { - check_ns (); + check_window_system (); return make_number (NSBitsPerPixelFromDepth ([ns_get_screen (display) depth])); } @@ -2443,7 +2443,7 @@ (Lisp_Object display) { struct ns_display_info *dpyinfo; - check_ns (); + check_window_system (); dpyinfo = check_ns_display_info (display); /* We force 24+ bit depths to 24-bit to prevent an overflow. */ @@ -2787,9 +2787,6 @@ defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); - /* used only in fontset.c */ - check_window_system_func = check_ns; - as_status = 0; as_script = Qnil; as_result = 0; === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-04-01 07:58:04 +0000 +++ src/nsmenu.m 2013-04-05 14:07:02 +0000 @@ -1409,7 +1409,7 @@ NSTRACE (x-popup-dialog); - check_ns (); + check_window_system (); isQ = NILP (header); === modified file 'src/nsselect.m' --- src/nsselect.m 2013-02-08 05:28:52 +0000 +++ src/nsselect.m 2013-04-05 14:07:02 +0000 @@ -355,7 +355,7 @@ Lisp_Object target_symbol, data; - check_ns (); + check_window_system (); CHECK_SYMBOL (selection); if (NILP (value)) error ("selection value may not be nil."); @@ -409,7 +409,7 @@ (Lisp_Object selection, Lisp_Object time_object, Lisp_Object terminal) { id pb; - check_ns (); + check_window_system (); CHECK_SYMBOL (selection); if (NILP (assq_no_quit (selection, Vselection_alist))) return Qnil; @@ -436,7 +436,7 @@ id pb; NSArray *types; - check_ns (); + check_window_system (); CHECK_SYMBOL (selection); if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; @@ -464,7 +464,7 @@ On Nextstep, TERMINAL is unused. */) (Lisp_Object selection, Lisp_Object terminal) { - check_ns (); + check_window_system (); CHECK_SYMBOL (selection); if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; @@ -492,7 +492,7 @@ { Lisp_Object val; - check_ns (); + check_window_system (); CHECK_SYMBOL (selection_name); CHECK_SYMBOL (target_type); val = ns_get_local_selection (selection_name, target_type); @@ -516,7 +516,7 @@ (Lisp_Object selection) { id pb; - check_ns (); + check_window_system (); pb = ns_symbol_to_pb (selection); return pb != nil ? ns_string_from_pasteboard (pb) : Qnil; } @@ -529,7 +529,7 @@ (Lisp_Object selection, Lisp_Object string) { id pb; - check_ns (); + check_window_system (); pb = ns_symbol_to_pb (selection); if (pb != nil) ns_string_to_pasteboard (pb, string); return Qnil; === modified file 'src/nsterm.h' --- src/nsterm.h 2013-03-30 09:57:27 +0000 +++ src/nsterm.h 2013-04-05 14:07:02 +0000 @@ -764,7 +764,6 @@ extern const char *ns_xlfd_to_fontname (const char *xlfd); -extern void check_ns (void); extern Lisp_Object ns_map_event_to_object (void); #ifdef __OBJC__ extern Lisp_Object ns_string_from_pasteboard (id pb); === modified file 'src/nsterm.m' --- src/nsterm.m 2013-03-30 09:57:27 +0000 +++ src/nsterm.m 2013-04-05 14:07:02 +0000 @@ -1013,7 +1013,7 @@ -------------------------------------------------------------------------- */ { NSView *view = FRAME_NS_VIEW (f); - check_ns (); + check_window_system (); block_input (); if (FRAME_VISIBLE_P (f)) [[view window] makeKeyAndOrderFront: NSApp]; @@ -1028,7 +1028,7 @@ -------------------------------------------------------------------------- */ { NSView *view = FRAME_NS_VIEW (f); - check_ns (); + check_window_system (); block_input (); [[view window] orderBack: NSApp]; unblock_input (); @@ -1133,7 +1133,7 @@ { NSView * view = FRAME_NS_VIEW (f); NSTRACE (x_make_frame_invisible); - check_ns (); + check_window_system (); [[view window] orderOut: NSApp]; SET_FRAME_VISIBLE (f, 0); SET_FRAME_ICONIFIED (f, 0); @@ -1149,7 +1149,7 @@ NSView * view = FRAME_NS_VIEW (f); struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f); NSTRACE (x_iconify_frame); - check_ns (); + check_window_system (); if (dpyinfo->x_highlight_frame == f) dpyinfo->x_highlight_frame = 0; @@ -1178,7 +1178,7 @@ struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); NSTRACE (x_free_frame_resources); - check_ns (); + check_window_system (); [(EmacsView *)view setWindowClosing: YES]; /* may not have been informed */ @@ -1219,7 +1219,7 @@ -------------------------------------------------------------------------- */ { NSTRACE (x_destroy_window); - check_ns (); + check_window_system (); x_free_frame_resources (f); ns_window_num--; } === modified file 'src/w32fns.c' --- src/w32fns.c 2013-03-28 14:04:49 +0000 +++ src/w32fns.c 2013-04-05 14:07:02 +0000 @@ -242,7 +242,7 @@ /* Error if we are not connected to MS-Windows. */ void -check_w32 (void) +check_window_system (void) { if (! w32_in_use) error ("MS-Windows not in use or not initialized"); @@ -5358,7 +5358,7 @@ Lisp_Object buffer; struct buffer *old_buffer; - check_w32 (); + check_window_system (); /* Use this general default value to start with until we know if this frame has a specified name. */ @@ -7635,8 +7635,6 @@ defsubr (&Sdefault_printer_name); defsubr (&Sset_message_beep); - check_window_system_func = check_w32; - hourglass_hwnd = NULL; defsubr (&Sx_show_tip); === modified file 'src/w32menu.c' --- src/w32menu.c 2013-03-28 14:04:49 +0000 +++ src/w32menu.c 2013-04-05 14:07:02 +0000 @@ -140,7 +140,7 @@ FRAME_PTR f = NULL; Lisp_Object window; - check_w32 (); + check_window_system (); /* Decode the first argument: find the window or frame to use. */ if (EQ (position, Qt) === modified file 'src/w32term.h' --- src/w32term.h 2013-03-23 19:40:43 +0000 +++ src/w32term.h 2013-04-05 14:07:02 +0000 @@ -203,7 +203,6 @@ extern struct w32_display_info *w32_term_init (Lisp_Object, char *, char *); -extern void check_w32 (void); extern int w32_defined_color (FRAME_PTR f, const char *color, XColor *color_def, int alloc); extern void x_set_window_size (struct frame *f, int change_grav, === modified file 'src/xfaces.c' --- src/xfaces.c 2013-03-28 14:04:49 +0000 +++ src/xfaces.c 2013-04-05 14:07:02 +0000 @@ -231,7 +231,6 @@ #undef FRAME_X_DISPLAY_INFO #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO #define x_display_info w32_display_info -#define check_x check_w32 #define GCGraphicsExposures 0 #endif /* HAVE_NTGUI */ @@ -239,7 +238,6 @@ #undef FRAME_X_DISPLAY_INFO #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO #define x_display_info ns_display_info -#define check_x check_ns #define GCGraphicsExposures 0 #endif /* HAVE_NS */ #endif /* HAVE_WINDOW_SYSTEM */ @@ -1636,7 +1634,7 @@ struct frame *f; int size, avgwidth IF_LINT (= 0); - check_x (); + check_window_system (); CHECK_STRING (pattern); if (! NILP (maximum)) === modified file 'src/xfns.c' --- src/xfns.c 2013-03-28 14:04:49 +0000 +++ src/xfns.c 2013-04-05 14:07:02 +0000 @@ -143,7 +143,7 @@ /* Error if we are not connected to X. */ void -check_x (void) +check_window_system (void) { if (! x_in_use) error ("X windows are not in use or not initialized"); @@ -4525,7 +4525,7 @@ Lisp_Object buffer; struct buffer *old_buffer; - check_x (); + check_window_system (); if (!dpyinfo->terminal->name) error ("Terminal is not live, can't create new frames on it"); @@ -5316,7 +5316,7 @@ ptrdiff_t count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; - check_x (); + check_window_system (); GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); @@ -5486,7 +5486,7 @@ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; char *cdef_file; - check_x (); + check_window_system (); GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); @@ -5548,7 +5548,7 @@ struct gcpro gcpro1, gcpro2; ptrdiff_t count = SPECPDL_INDEX (); - check_x (); + check_window_system (); if (popup_activated ()) error ("Trying to use a menu from within a menu-entry"); @@ -5919,9 +5919,6 @@ defsubr (&Sx_focus_frame); defsubr (&Sx_backspace_delete_keys_p); - /* Setting callback functions for fontset handler. */ - check_window_system_func = check_x; - defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); tip_timer = Qnil; === modified file 'src/xmenu.c' --- src/xmenu.c 2013-03-28 14:04:49 +0000 +++ src/xmenu.c 2013-04-05 14:07:02 +0000 @@ -223,7 +223,7 @@ FRAME_PTR f = NULL; Lisp_Object window; - check_x (); + check_window_system (); /* Decode the first argument: find the window or frame to use. */ if (EQ (position, Qt) === modified file 'src/xterm.h' --- src/xterm.h 2013-01-02 16:13:04 +0000 +++ src/xterm.h 2013-04-05 14:07:02 +0000 @@ -366,10 +366,6 @@ extern int use_xim; #endif -/* This checks to make sure we have a display. */ - -extern void check_x (void); - extern struct frame *x_window_to_frame (struct x_display_info *, int); extern struct frame *x_any_window_to_frame (struct x_display_info *, int); extern struct frame *x_menubar_window_to_frame (struct x_display_info *, ------------------------------------------------------------ revno: 112227 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14143 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-04-05 10:00:08 -0400 message: * lisp/ido.el (ido-completions): Use extra elements of ido-decorations. (ido-decorations): Update docstring. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-03-30 13:49:00 +0000 +++ etc/NEWS 2013-04-05 14:00:08 +0000 @@ -87,6 +87,8 @@ * Changes in Specialized Modes and Packages in Emacs 24.4 +** `ido-decorations' has been slightly extended to give a bit more control. + ** More packages look for ~/.emacs.d/ additionally to ~/.. Affected files: ~/.emacs.d/timelog replaces ~/.timelog === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 10:18:43 +0000 +++ lisp/ChangeLog 2013-04-05 14:00:08 +0000 @@ -1,3 +1,9 @@ +2013-04-05 Stefan Monnier + + * ido.el (ido-completions): Use extra elements of ido-decorations + (bug#14143). + (ido-decorations): Update docstring. + 2013-04-05 Michael Albinus * autorevert.el (auto-revert-mode, auto-revert-tail-mode) === modified file 'lisp/ido.el' --- lisp/ido.el 2013-03-20 03:05:34 +0000 +++ lisp/ido.el 2013-04-05 14:00:08 +0000 @@ -765,7 +765,7 @@ (defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]") "List of strings used by ido to display the alternatives in the minibuffer. -There are 11 elements in this list: +There are between 11 and 13 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, 3rd element is the separator between prospects (ignored if `ido-separator' is set), 4th element is the string inserted at the end of a truncated list of prospects, @@ -775,7 +775,9 @@ 8th element is displayed if there is a single match (and faces are not used), 9th element is displayed when the current directory is non-readable, 10th element is displayed when directory exceeds `ido-max-directory-size', -11th element is displayed to confirm creating new file or buffer." +11th element is displayed to confirm creating new file or buffer. +12th and 13th elements (if present) are used as brackets around the sole +remaining completion. If absent, elements 5 and 6 are used instead." :type '(repeat string) :group 'ido) @@ -4581,10 +4583,12 @@ (string-equal (match-string 0 (ido-name (car comps))) (ido-name (car comps)))) "" - ;; when there is one match, show the matching file name in full - (concat (nth 4 ido-decorations) ;; [ ... ] - (ido-name (car comps)) - (nth 5 ido-decorations))) + ;; When there is only one match, show the matching file + ;; name in full, wrapped in [ ... ]. + (concat + (or (nth 11 ido-decorations) (nth 4 ido-decorations)) + (ido-name (car comps)) + (or (nth 12 ido-decorations) (nth 5 ido-decorations)))) (if (not ido-use-faces) (nth 7 ido-decorations)))) ;; [Matched] (t ;multiple matches (let* ((items (if (> ido-max-prospects 0) (1+ ido-max-prospects) 999)) ------------------------------------------------------------ revno: 112226 committer: Michael Albinus + + * autorevert.el (auto-revert-mode, auto-revert-tail-mode) + (global-auto-revert-mode): Let-bind `auto-revert-use-notify' to + nil during initialization, in order not to miss changes since the + file was opened. (Bug#14140) + 2013-04-05 Leo Liu * kmacro.el (kmacro-call-macro): Fix bug#14135. === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-02-16 09:13:40 +0000 +++ lisp/autorevert.el 2013-04-05 10:18:43 +0000 @@ -367,8 +367,9 @@ (delq (current-buffer) auto-revert-buffer-list))) (auto-revert-set-timer) (when auto-revert-mode - (auto-revert-buffers) - (setq auto-revert-tail-mode nil))) + (let (auto-revert-use-notify) + (auto-revert-buffers) + (setq auto-revert-tail-mode nil)))) ;;;###autoload @@ -422,7 +423,8 @@ (y-or-n-p "File changed on disk, content may be missing. \ Perform a full revert? ") ;; Use this (not just revert-buffer) for point-preservation. - (auto-revert-handler)) + (let (auto-revert-use-notify) + (auto-revert-handler))) ;; else we might reappend our own end when we save (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position @@ -467,7 +469,8 @@ :global t :group 'auto-revert :lighter global-auto-revert-mode-text (auto-revert-set-timer) (if global-auto-revert-mode - (auto-revert-buffers) + (let (auto-revert-use-notify) + (auto-revert-buffers)) (dolist (buf (buffer-list)) (with-current-buffer buf (when auto-revert-use-notify ------------------------------------------------------------ revno: 112225 fixes bug: http://debbugs.gnu.org/14135 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-04-05 16:38:06 +0800 message: * kmacro.el (kmacro-call-macro): Fix bug#14135. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 02:20:35 +0000 +++ lisp/ChangeLog 2013-04-05 08:38:06 +0000 @@ -1,3 +1,7 @@ +2013-04-05 Leo Liu + + * kmacro.el (kmacro-call-macro): Fix bug#14135. + 2013-04-05 Jay Belanger * calc/calc-units.el (calc-convert-units): Rewrite conditional. === modified file 'lisp/kmacro.el' --- lisp/kmacro.el 2013-03-30 13:49:00 +0000 +++ lisp/kmacro.el 2013-04-05 08:38:06 +0000 @@ -631,11 +631,11 @@ (> (length (this-single-command-keys)) 1)) ;; Used when we're in the process of repeating. (eq no-repeat 'repeating)) - last-input-event)) - (last-kbd-macro (or macro last-kbd-macro))) + last-input-event))) (if end-macro - (kmacro-end-macro arg) - (call-last-kbd-macro arg #'kmacro-loop-setup-function)) + (kmacro-end-macro arg) ; modifies last-kbd-macro + (let ((last-kbd-macro (or macro last-kbd-macro))) + (call-last-kbd-macro arg #'kmacro-loop-setup-function))) (when (consp arg) (setq arg (car arg))) (when (and (or (null arg) (> arg 0)) @@ -658,7 +658,9 @@ (define-key map (vector repeat-key) `(lambda () (interactive) (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg) - 'repeating nil ,last-kbd-macro))) + 'repeating nil ,(if end-macro + last-kbd-macro + (or macro last-kbd-macro))))) map))))) ------------------------------------------------------------ revno: 112224 committer: Jay Belanger branch nick: trunk timestamp: Thu 2013-04-04 21:20:35 -0500 message: * lisp/calc/calc.el (calc-allow-units-as-numbers): Move declaration. * lisp/calc/calc-units.el (calc-convert-units): Redo conditional. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-04 03:46:25 +0000 +++ lisp/ChangeLog 2013-04-05 02:20:35 +0000 @@ -1,3 +1,7 @@ +2013-04-05 Jay Belanger + + * calc/calc-units.el (calc-convert-units): Rewrite conditional. + 2013-04-04 Glenn Morris * electric.el (electric-pair-inhibit-predicate): Add :version. === modified file 'lisp/calc/calc-units.el' --- lisp/calc/calc-units.el 2013-03-08 02:11:25 +0000 +++ lisp/calc/calc-units.el 2013-04-05 02:20:35 +0000 @@ -437,7 +437,7 @@ (list new-units (car default-units)) math-default-units-table)))))) -(defvar calc-allow-units-as-numbers) +(defvar calc-allow-units-as-numbers t) (defun calc-convert-units (&optional old-units new-units) (interactive) @@ -451,7 +451,9 @@ defunits) (if (or (not (math-units-in-expr-p expr t)) (setq unitscancel (and - calc-allow-units-as-numbers + (if (get 'calc-allow-units-as-numbers 'saved-value) + (car (get 'calc-allow-units-as-numbers 'saved-value)) + calc-allow-units-as-numbers) (eq (math-get-standard-units expr) 1)))) (let ((uold (or old-units (progn === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2013-02-09 23:17:05 +0000 +++ lisp/calc/calc.el 2013-04-05 02:20:35 +0000 @@ -426,14 +426,6 @@ :version "24.3" :type 'boolean) -(defcustom calc-allow-units-as-numbers - t - "If non-nil, allow unit expressions to be treated like numbers -when converting units, if the expression can be simplified to be unitless." - :group 'calc - :version "24.4" - :type 'boolean) - (defcustom calc-undo-length 100 "The number of undo steps that will be preserved when Calc is quit." ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.