------------------------------------------------------------ revno: 114740 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-22 16:07:51 +0800 message: Mention the optional ‘display’ argument in doc strings. * frame.el (display-screens, display-pixel-height) (display-pixel-width, display-mm-width, display-backing-store) (display-save-under, display-planes, display-color-cells) (display-visual-class, display-monitor-attributes-list): Mention the optional ‘display’ argument in doc strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-22 00:47:32 +0000 +++ lisp/ChangeLog 2013-10-22 08:07:51 +0000 @@ -1,3 +1,11 @@ +2013-10-22 Xue Fuqiao + + * frame.el (display-screens, display-pixel-height) + (display-pixel-width, display-mm-width, display-backing-store) + (display-save-under, display-planes, display-color-cells) + (display-visual-class, display-monitor-attributes-list): Mention + the optional ‘display’ argument in doc strings. + 2013-10-22 Michael Gauland * progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some === modified file 'lisp/frame.el' --- lisp/frame.el 2013-10-02 18:44:40 +0000 +++ lisp/frame.el 2013-10-22 08:07:51 +0000 @@ -1358,7 +1358,8 @@ (declare-function x-display-screens "xfns.c" (&optional terminal)) (defun display-screens (&optional display) - "Return the number of screens associated with DISPLAY." + "Return the number of screens associated with DISPLAY. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1374,7 +1375,8 @@ For graphical terminals, note that on \"multi-monitor\" setups this refers to the pixel height for all physical monitors associated with DISPLAY. To get information for each physical monitor, use -`display-monitor-attributes-list'." +`display-monitor-attributes-list'. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1390,7 +1392,8 @@ For graphical terminals, note that on \"multi-monitor\" setups this refers to the pixel width for all physical monitors associated with DISPLAY. To get information for each physical monitor, use -`display-monitor-attributes-list'." +`display-monitor-attributes-list'. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1425,7 +1428,8 @@ For graphical terminals, note that on \"multi-monitor\" setups this refers to the height in millimeters for all physical monitors associated with DISPLAY. To get information for each physical -monitor, use `display-monitor-attributes-list'." +monitor, use `display-monitor-attributes-list'. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (and (memq (framep-on-display display) '(x w32 ns)) (or (cddr (assoc (or display (frame-parameter nil 'display)) display-mm-dimensions-alist)) @@ -1441,7 +1445,8 @@ For graphical terminals, note that on \"multi-monitor\" setups this refers to the width in millimeters for all physical monitors associated with DISPLAY. To get information for each physical -monitor, use `display-monitor-attributes-list'." +monitor, use `display-monitor-attributes-list'. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (and (memq (framep-on-display display) '(x w32 ns)) (or (cadr (assoc (or display (frame-parameter nil 'display)) display-mm-dimensions-alist)) @@ -1455,7 +1460,8 @@ (defun display-backing-store (&optional display) "Return the backing store capability of DISPLAY's screen. The value may be `always', `when-mapped', `not-useful', or nil if -the question is inapplicable to a certain kind of display." +the question is inapplicable to a certain kind of display. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1466,7 +1472,8 @@ (declare-function x-display-save-under "xfns.c" (&optional terminal)) (defun display-save-under (&optional display) - "Return non-nil if DISPLAY's screen supports the SaveUnder feature." + "Return non-nil if DISPLAY's screen supports the SaveUnder feature. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1477,7 +1484,8 @@ (declare-function x-display-planes "xfns.c" (&optional terminal)) (defun display-planes (&optional display) - "Return the number of planes supported by DISPLAY." + "Return the number of planes supported by DISPLAY. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1490,7 +1498,8 @@ (declare-function x-display-color-cells "xfns.c" (&optional terminal)) (defun display-color-cells (&optional display) - "Return the number of color cells supported by DISPLAY." + "Return the number of color cells supported by DISPLAY. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1505,7 +1514,8 @@ (defun display-visual-class (&optional display) "Return the visual class of DISPLAY. The value is one of the symbols `static-gray', `gray-scale', -`static-color', `pseudo-color', `true-color', or `direct-color'." +`static-color', `pseudo-color', `true-color', or `direct-color'. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1550,7 +1560,8 @@ physical monitors. Every non-tip frame (including invisible one) in a graphical display is dominated by exactly one physical monitor at a time, though it can span multiple (or no) physical -monitors." +monitors. +If DISPLAY is omitted or nil, it defaults to the selected frame's display." (let ((frame-type (framep-on-display display))) (cond ((eq frame-type 'x) ------------------------------------------------------------ revno: 114739 fixes bug: http://debbugs.gnu.org/15625 author: Michael Gauland committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-10-21 20:47:32 -0400 message: * lisp/progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some viewers such as evince when ebnf-production-name-p is nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-21 22:25:59 +0000 +++ lisp/ChangeLog 2013-10-22 00:47:32 +0000 @@ -1,3 +1,8 @@ +2013-10-22 Michael Gauland + + * progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some + viewers such as evince when ebnf-production-name-p is nil. (Bug#15625) + 2013-10-21 Dmitry Gutov * progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated === modified file 'lisp/progmodes/ebnf2ps.el' --- lisp/progmodes/ebnf2ps.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/ebnf2ps.el 2013-10-22 00:47:32 +0000 @@ -3912,7 +3912,7 @@ {/Effect EffectP def /fP F ForegroundP SetRGB BackgroundP aload pop true BG S /Effect 0 def - ( :) S false BG}if + ( :) S false BG}{pop}ifelse xw yw moveto hT EL RA xp yw moveto ------------------------------------------------------------ revno: 114738 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-10-22 02:25:59 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated TODO. Add "." after " @ ". (ruby-smie--at-dot-call): New function. Checks if point at method call with explicit target. (ruby-smie--forward-token, ruby-smie--backward-token): Prepend "." to the method name tokens when it precedes them. (ruby-smie--backward-id, ruby-smie--forward-id): Remove. (ruby-smie-rules): Add rule for indentation before and after "." token. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-21 14:15:13 +0000 +++ lisp/ChangeLog 2013-10-21 22:25:59 +0000 @@ -1,3 +1,15 @@ +2013-10-21 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated + TODO. Add "." after " @ ". + (ruby-smie--at-dot-call): New function. Checks if point at method + call with explicit target. + (ruby-smie--forward-token, ruby-smie--backward-token): Prepend "." + to the method name tokens when it precedes them. + (ruby-smie--backward-id, ruby-smie--forward-id): Remove. + (ruby-smie-rules): Add rule for indentation before and after "." + token. + 2013-10-21 Stefan Monnier * textmodes/remember.el (remember-diary-extract-entries): === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-10-21 13:34:13 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-21 22:25:59 +0000 @@ -251,7 +251,6 @@ ;; Here's a simplified BNF grammar, for reference: ;; http://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf (defconst ruby-smie-grammar - ;; FIXME: Add support for Cucumber. (smie-prec2->grammar (smie-merge-prec2s (smie-bnf->prec2 @@ -259,7 +258,8 @@ (insts (inst) (insts ";" insts)) (inst (exp) (inst "iuwu-mod" exp)) (exp (exp1) (exp "," exp) (exp "=" exp) - (id " @ " exp)) + (id " @ " exp) + (exp "." exp)) (exp1 (exp2) (exp2 "?" exp1 ":" exp1)) (exp2 ("def" insts "end") ("begin" insts-rescue-insts "end") @@ -288,7 +288,7 @@ (ielsei (itheni) (itheni "else" insts)) (if-body (ielsei) (if-body "elsif" if-body))) '((nonassoc "in") (assoc ";") (right " @ ") - (assoc ",") (right "=")) + (assoc ",") (right "=") (assoc ".")) '((assoc "when")) '((assoc "elsif")) '((assoc "rescue" "ensure")) @@ -354,14 +354,10 @@ (eq (char-syntax (char-before (1- (point)))) '?w))) (memq (char-syntax (char-after pos)) '(?w ?\")))) -(defun ruby-smie--forward-id () - (when (and (not (eobp)) - (eq ?w (char-syntax (char-after)))) - (let ((tok (smie-default-forward-token))) - (when (eq ?. (char-after)) - (forward-char 1) - (setq tok (concat tok "." (ruby-smie--forward-id)))) - tok))) +(defun ruby-smie--at-dot-call () + (and (eq ?w (char-syntax (char-after))) + (eq (char-before) ?.) + (not (eq (char-before (1- (point))) ?.)))) (defun ruby-smie--forward-token () (let ((pos (point))) @@ -382,7 +378,10 @@ (ruby-smie--args-separator-p (prog1 (point) (goto-char pos))))) " @ ") (t - (let ((tok (smie-default-forward-token))) + (let ((dot (ruby-smie--at-dot-call)) + (tok (smie-default-forward-token))) + (when dot + (setq tok (concat "." tok))) (cond ((member tok '("unless" "if" "while" "until")) (if (save-excursion (forward-word -1) (ruby-smie--bosp)) @@ -398,18 +397,8 @@ (line-end-position)) (ruby-smie--forward-token)) ;Fully redundant. (t ";"))) - ((equal tok ".") (concat tok (ruby-smie--forward-id))) (t tok))))))))) -(defun ruby-smie--backward-id () - (when (and (not (bobp)) - (eq ?w (char-syntax (char-before)))) - (let ((tok (smie-default-backward-token))) - (when (eq ?. (char-before)) - (forward-char -1) - (setq tok (concat (ruby-smie--backward-id) "." tok))) - tok))) - (defun ruby-smie--backward-token () (let ((pos (point))) (forward-comment (- (point))) @@ -424,9 +413,9 @@ ;; In some textbooks, "e1 @ e2" is used to mean "call e1 with arg e2". " @ ") (t - (let ((tok (smie-default-backward-token))) - (when (eq ?. (char-before)) - (forward-char -1) + (let ((tok (smie-default-backward-token)) + (dot (ruby-smie--at-dot-call))) + (when dot (setq tok (concat "." tok))) (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok)) (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208. @@ -446,11 +435,6 @@ (line-end-position)) (ruby-smie--backward-token)) ;Fully redundant. (t ";"))) - ;; FIXME: We shouldn't merge the dot with preceding token here - ;; either, but not doing that breaks indentation of hanging - ;; method calls with dot on the first line. - ((equal tok ".") - (concat (ruby-smie--backward-id) tok)) (t tok))))))) (defun ruby-smie-rules (kind token) @@ -495,6 +479,9 @@ (`(:after . ,(or "=" "iuwu-mod")) 2) (`(:after . " @ ") (smie-rule-parent)) (`(:before . "do") (smie-rule-parent)) + (`(,(or :before :after) . ".") + (unless (smie-rule-parent-p ".") + (smie-rule-parent ruby-indent-level))) (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) 0) (`(:before . ,(or `"when")) (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-10-21 13:34:13 +0000 +++ test/indent/ruby.rb 2013-10-21 22:25:59 +0000 @@ -189,15 +189,16 @@ foo + bar +foo_bar_tee(1, 2, 3) + .qux + .bar + # Examples below still fail with `ruby-use-smie' on: foo = [1, 2, 3].map do |i| i + 1 end -foo_bar_tee(1, 2, 3) - .qux - method !arg1, arg2 @@ -209,3 +210,13 @@ method (a + b), c + +foo do + bar + .tee +end + +def bar + foo + .baz +end ------------------------------------------------------------ revno: 114737 [merge] committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-22 06:10:55 +0800 message: Remove unnecessary @refill. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-10-13 23:01:20 +0000 +++ doc/emacs/ChangeLog 2013-10-20 22:33:05 +0000 @@ -1,3 +1,7 @@ +2013-10-20 Xue Fuqiao + + * custom.texi (Init Syntax, Terminal Init, Terminal Init): Remove @refill. + 2013-10-13 Glenn Morris * ack.texi (Acknowledgments): Comment out old alpha stuff. === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2013-07-31 12:59:10 +0000 +++ doc/emacs/custom.texi 2013-10-20 22:33:05 +0000 @@ -2188,7 +2188,7 @@ @samp{\C-} can be used as a prefix for a control character, as in @samp{\C-s} for @acronym{ASCII} control-S, and @samp{\M-} can be used as a prefix for a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for -@kbd{Control-Meta-A}.@refill +@kbd{Control-Meta-A}. @xref{Init Non-ASCII}, for information about including non-@acronym{ASCII} in your init file. @@ -2451,7 +2451,7 @@ found by searching the directories @code{load-path} as usual and trying the suffixes @samp{.elc} and @samp{.el}. Normally it appears in the subdirectory @file{term} of the directory where most Emacs libraries are -kept.@refill +kept. The usual purpose of the terminal-specific library is to map the escape sequences used by the terminal's function keys onto more @@ -2466,7 +2466,7 @@ before the first hyphen is significant in choosing the library name. Thus, terminal types @samp{aaa-48} and @samp{aaa-30-rv} both use the library @file{term/aaa}. The code in the library can use -@code{(getenv "TERM")} to find the full terminal type name.@refill +@code{(getenv "TERM")} to find the full terminal type name. @vindex term-file-prefix The library's name is constructed by concatenating the value of the ------------------------------------------------------------ revno: 114736 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-10-21 10:15:13 -0400 message: * lisp/textmodes/remember.el (remember-diary-extract-entries): Avoid add-to-list. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-21 13:34:13 +0000 +++ lisp/ChangeLog 2013-10-21 14:15:13 +0000 @@ -1,5 +1,8 @@ 2013-10-21 Stefan Monnier + * textmodes/remember.el (remember-diary-extract-entries): + Avoid add-to-list. + * progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as an instruction. === modified file 'lisp/textmodes/remember.el' --- lisp/textmodes/remember.el 2013-10-18 02:26:28 +0000 +++ lisp/textmodes/remember.el 2013-10-21 14:15:13 +0000 @@ -535,7 +535,7 @@ (goto-char (point-min)) (let (list) (while (re-search-forward "^DIARY:\\s-*\\(.+\\)" nil t) - (add-to-list 'list (remember-diary-convert-entry (match-string 1)))) + (push (remember-diary-convert-entry (match-string 1)) list)) (when list (diary-make-entry (mapconcat 'identity list "\n") nil remember-diary-file)) ------------------------------------------------------------ revno: 114735 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-10-21 18:11:25 +0400 message: Do not allow font caches to grow too large. * alloc.c (compact_font_cache_entry, compact_font_caches): New functions or stub if not HAVE_WINDOW_SYSTEM. (compact_undo_list): Factor out from Fgarbage_collect. Add comment. (mark_face_cache): Mark face font. Move down to avoid extra prototypes. (mark_terminals): Do not mark font cache here. (Fgarbage_collect): Call compaction functions described above. Adjust comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-20 16:47:42 +0000 +++ src/ChangeLog 2013-10-21 14:11:25 +0000 @@ -1,3 +1,16 @@ +2013-10-21 Dmitry Antipov + + Do not allow font caches to grow too large. + * alloc.c (compact_font_cache_entry, compact_font_caches): + New functions or stub if not HAVE_WINDOW_SYSTEM. + (compact_undo_list): Factor out from Fgarbage_collect. + Add comment. + (mark_face_cache): Mark face font. Move down to avoid + extra prototypes. + (mark_terminals): Do not mark font cache here. + (Fgarbage_collect): Call compaction functions described + above. Adjust comment. + 2013-10-20 Jan Djärv * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty, === modified file 'src/alloc.c' --- src/alloc.c 2013-10-18 12:57:44 +0000 +++ src/alloc.c 2013-10-21 14:11:25 +0000 @@ -5254,6 +5254,95 @@ return tot; } +#ifdef HAVE_WINDOW_SYSTEM + +/* Remove unmarked font-spec and font-entity objects from ENTRY, which is + (DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...), and return changed entry. */ + +static Lisp_Object +compact_font_cache_entry (Lisp_Object entry) +{ + Lisp_Object tail, *prev = &entry; + + for (tail = entry; CONSP (tail); tail = XCDR (tail)) + { + bool drop = 0; + Lisp_Object obj = XCAR (tail); + + /* Consider OBJ if it is (font-spec . [font-entity font-entity ...]). */ + if (CONSP (obj) && FONT_SPEC_P (XCAR (obj)) + && !VECTOR_MARKED_P (XFONT_SPEC (XCAR (obj))) + && VECTORP (XCDR (obj))) + { + ptrdiff_t i, size = ASIZE (XCDR (obj)) & ~ARRAY_MARK_FLAG; + + /* If font-spec is not marked, most likely all font-entities + are not marked too. But we must be sure that nothing is + marked within OBJ before we really drop it. */ + for (i = 0; i < size; i++) + if (VECTOR_MARKED_P (XFONT_ENTITY (AREF (XCDR (obj), i)))) + break; + + if (i == size) + drop = 1; + } + if (drop) + *prev = XCDR (tail); + else + prev = xcdr_addr (tail); + } + return entry; +} + +/* Compact font caches on all terminals and mark + everything which is still here after compaction. */ + +static void +compact_font_caches (void) +{ + struct terminal *t; + + for (t = terminal_list; t; t = t->next_terminal) + { + Lisp_Object cache = TERMINAL_FONT_CACHE (t); + + if (CONSP (cache)) + { + Lisp_Object entry; + + for (entry = XCDR (cache); CONSP (entry); entry = XCDR (entry)) + XSETCAR (entry, compact_font_cache_entry (XCAR (entry))); + } + mark_object (cache); + } +} + +#else /* not HAVE_WINDOW_SYSTEM */ + +#define compact_font_caches() (void)(0) + +#endif /* HAVE_WINDOW_SYSTEM */ + +/* Remove (MARKER . DATA) entries with unmarked MARKER + from buffer undo LIST and return changed list. */ + +static Lisp_Object +compact_undo_list (Lisp_Object list) +{ + Lisp_Object tail, *prev = &list; + + for (tail = list; CONSP (tail); tail = XCDR (tail)) + { + if (CONSP (XCAR (tail)) + && MARKERP (XCAR (XCAR (tail))) + && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) + *prev = XCDR (tail); + else + prev = xcdr_addr (tail); + } + return list; +} + DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", doc: /* Reclaim storage for Lisp objects no longer needed. Garbage collection happens automatically if you cons more than @@ -5392,46 +5481,19 @@ mark_stack (); #endif - /* Everything is now marked, except for the things that require special - finalization, i.e. the undo_list. - Look thru every buffer's undo list - for elements that update markers that were not marked, - and delete them. */ + /* Everything is now marked, except for the data in font caches + and undo lists. They're compacted by removing an items which + aren't reachable otherwise. */ + + compact_font_caches (); + FOR_EACH_BUFFER (nextb) { - /* If a buffer's undo list is Qt, that means that undo is - turned off in that buffer. Calling truncate_undo_list on - Qt tends to return NULL, which effectively turns undo back on. - So don't call truncate_undo_list if undo_list is Qt. */ - if (! EQ (nextb->INTERNAL_FIELD (undo_list), Qt)) - { - Lisp_Object tail, prev; - tail = nextb->INTERNAL_FIELD (undo_list); - prev = Qnil; - while (CONSP (tail)) - { - if (CONSP (XCAR (tail)) - && MARKERP (XCAR (XCAR (tail))) - && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) - { - if (NILP (prev)) - nextb->INTERNAL_FIELD (undo_list) = tail = XCDR (tail); - else - { - tail = XCDR (tail); - XSETCDR (prev, tail); - } - } - else - { - prev = tail; - tail = XCDR (tail); - } - } - } - /* Now that we have stripped the elements that need not be in the - undo_list any more, we can finally mark the list. */ - mark_object (nextb->INTERNAL_FIELD (undo_list)); + if (!EQ (BVAR (nextb, undo_list), Qt)) + bset_undo_list (nextb, compact_undo_list (BVAR (nextb, undo_list))); + /* Now that we have stripped the elements that need not be + in the undo_list any more, we can finally mark the list. */ + mark_object (BVAR (nextb, undo_list)); } gc_sweep (); @@ -5603,30 +5665,6 @@ } } - -/* Mark Lisp faces in the face cache C. */ - -static void -mark_face_cache (struct face_cache *c) -{ - if (c) - { - int i, j; - for (i = 0; i < c->used; ++i) - { - struct face *face = FACE_FROM_ID (c->f, i); - - if (face) - { - for (j = 0; j < LFACE_VECTOR_SIZE; ++j) - mark_object (face->lface[j]); - } - } - } -} - - - /* Mark reference to a Lisp_Object. If the object referred to has not been seen yet, recursively mark all the references contained in it. */ @@ -5726,6 +5764,30 @@ mark_buffer (buffer->base_buffer); } +/* Mark Lisp faces in the face cache C. */ + +static void +mark_face_cache (struct face_cache *c) +{ + if (c) + { + int i, j; + for (i = 0; i < c->used; ++i) + { + struct face *face = FACE_FROM_ID (c->f, i); + + if (face) + { + if (face->font && !VECTOR_MARKED_P (face->font)) + mark_vectorlike ((struct Lisp_Vector *) face->font); + + for (j = 0; j < LFACE_VECTOR_SIZE; ++j) + mark_object (face->lface[j]); + } + } + } +} + /* Remove killed buffers or items whose car is a killed buffer from LIST, and mark other items. Return changed LIST, which is marked. */ @@ -6118,9 +6180,6 @@ it might have been marked already. Make sure the image cache gets marked. */ mark_image_cache (t->image_cache); - /* FIXME: currently font cache may grow too large - and probably needs special finalization. */ - mark_object (TERMINAL_FONT_CACHE (t)); #endif /* HAVE_WINDOW_SYSTEM */ if (!VECTOR_MARKED_P (t)) mark_vectorlike ((struct Lisp_Vector *)t); ------------------------------------------------------------ revno: 114734 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-10-21 09:34:13 -0400 message: * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as an instruction. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-21 05:54:18 +0000 +++ lisp/ChangeLog 2013-10-21 13:34:13 +0000 @@ -1,3 +1,8 @@ +2013-10-21 Stefan Monnier + + * progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as + an instruction. + 2013-10-21 Dmitry Gutov * progmodes/ruby-mode.el (ruby-smie-grammar): Add (almost) all infix operators. @@ -12,15 +17,14 @@ Allow comma separated lists after Java "implements". - * progmodes/cc-engine.el (c-backward-over-enum-header): parse - commas. + * progmodes/cc-engine.el (c-backward-over-enum-header): + Parse commas. * progmodes/cc-fonts.el (c-basic-matchers-after): Remove comma from a "disallowed" list in enum fontification. 2013-10-20 Johan Bockgård - * startup.el (default-frame-background-mode): Remove unused - defvar. + * startup.el (default-frame-background-mode): Remove unused defvar. * progmodes/verilog-mode.el (verilog-mode): Don't set comment-indent-function globally. @@ -168,8 +172,8 @@ * ielm.el (ielm-map): Bind M-RET to ielm-return-for-effect. (ielm-return-for-effect): New command. (ielm-send-input): Accept optional `for-effect' parameter. - (ielm-eval-input): Accept optional `for-effect' parameter. Bind - `standard-output' to stream we create using + (ielm-eval-input): Accept optional `for-effect' parameter. + Bind `standard-output' to stream we create using `ielm-standard-output-impl'. Suppress printing result when `for-effect'. (ielm-standard-output-impl): New function. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-10-21 05:54:18 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-21 13:34:13 +0000 @@ -498,6 +498,8 @@ (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) 0) (`(:before . ,(or `"when")) (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level + (`(:after . "+") ;FIXME: Probably applicable to most infix operators. + (if (smie-rule-parent-p ";") ruby-indent-level)) )) (defun ruby-imenu-create-index-in-block (prefix beg end) === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-10-21 06:15:47 +0000 +++ test/indent/ruby.rb 2013-10-21 13:34:13 +0000 @@ -186,11 +186,11 @@ bar end +foo + + bar + # Examples below still fail with `ruby-use-smie' on: -foo + - bar - foo = [1, 2, 3].map do |i| i + 1 end ------------------------------------------------------------ revno: 114733 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-10-21 10:15:47 +0400 message: * indent/ruby.rb: Fix a typo diff: === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-10-21 05:54:18 +0000 +++ test/indent/ruby.rb 2013-10-21 06:15:47 +0000 @@ -182,7 +182,7 @@ tee } -if foo + +if foo && bar end ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.