------------------------------------------------------------ revno: 116188 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-01-28 11:43:24 +0400 message: * xfaces.c (free_frame_faces): Adjust comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-28 05:55:06 +0000 +++ src/ChangeLog 2014-01-28 07:43:24 +0000 @@ -4,6 +4,7 @@ (init_initial_terminal): Install new hook to free face cache on initial frame and avoid memory leak. For details, see . + * xfaces.c (free_frame_faces): Adjust comment. 2014-01-26 Paul Eggert === modified file 'src/xfaces.c' --- src/xfaces.c 2014-01-01 07:43:34 +0000 +++ src/xfaces.c 2014-01-28 07:43:24 +0000 @@ -694,7 +694,8 @@ } -/* Free face cache of frame F. Called from delete_frame. */ +/* Free face cache of frame F. Called from frame-dependent + resource freeing function, e.g. (x|tty)_free_frame_resources. */ void free_frame_faces (struct frame *f) ------------------------------------------------------------ revno: 116187 committer: Luke Lee branch nick: trunk timestamp: Tue 2014-01-28 15:02:34 +0800 message: Aggregate hideif parser enhancements for a complete supporting of C/C++ expressions and operator precedence. Also apply code review changes. * lisp/progmodes/hideif.el : Related enhancements. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-28 02:50:16 +0000 +++ lisp/ChangeLog 2014-01-28 07:02:34 +0000 @@ -1,3 +1,17 @@ +2014-01-28 Luke Lee + + * progmodes/hideif.el: Extend to full CPP expression syntax. + (hif-token-alist): Add missing tokens. + (hif-token-regexp): Add support for float/octal/hex immediates. + (hif-string-literal-regexp): New const. + (hif-tokenize): Recognize strings and float/octal/hex immediates. + (hif-exprlist): New function. + (hif-parse-if-exp): Use it. + (hif-logior-expr, hif-logxor-expr, hif-logand-expr, hif-comp-expr) + (hif-logshift-expr, hif-muldiv-expr, hif-lognot, hif-shiftleft) + (hif-shiftright, hif-multiply, hif-divide, hif-modulo, hif-equal) + (hif-logxor, hif-comma): New functions. + 2014-01-28 Glenn Morris * textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak. === modified file 'lisp/progmodes/hideif.el' --- lisp/progmodes/hideif.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/hideif.el 2014-01-28 07:02:34 +0000 @@ -35,9 +35,7 @@ ;; M-x hide-ifdefs or C-c @ h ;; ;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't -;; pass through. The support of constant expressions in #if lines is -;; limited to identifiers, parens, and the operators: &&, ||, !, and -;; "defined". Please extend this. +;; pass through. Support complete C/C++ expression and precedence. ;; ;; The hidden code is marked by ellipses (...). Be ;; cautious when editing near ellipses, since the hidden text is @@ -97,6 +95,9 @@ ;; ;; Written by Brian Marick, at Gould, Computer Systems Division, Urbana IL. ;; Extensively modified by Daniel LaLiberte (while at Gould). +;; +;; Extensively modified by Luke Lee in 2013 to support complete C expression +;; evaluation. ;;; Code: @@ -368,26 +369,44 @@ (defvar hif-token-list) (defconst hif-token-alist - '(("||" . or) - ("&&" . and) + '(("||" . hif-or) + ("&&" . hif-and) ("|" . hif-logior) + ("^" . hif-logxor) ("&" . hif-logand) - ("==" . equal) + ("<<" . hif-shiftleft) + (">>" . hif-shiftright) + ("==" . hif-equal) + ;; Note: we include tokens like `=' which aren't supported by CPP's + ;; expression syntax, because they are still relevant for the tokenizer, + ;; especially in conjunction with ##. + ("=" . hif-assign) ("!=" . hif-notequal) - ("!" . not) - ("(" . lparen) - (")" . rparen) + ("##" . hif-token-concat) + ("!" . hif-not) + ("~" . hif-lognot) + ("(" . hif-lparen) + (")" . hif-rparen) (">" . hif-greater) ("<" . hif-less) (">=" . hif-greater-equal) ("<=" . hif-less-equal) ("+" . hif-plus) ("-" . hif-minus) + ("*" . hif-multiply) + ("/" . hif-divide) + ("%" . hif-modulo) ("?" . hif-conditional) (":" . hif-colon))) (defconst hif-token-regexp - (concat (regexp-opt (mapcar 'car hif-token-alist)) "\\|\\w+")) + (concat (regexp-opt (mapcar 'car hif-token-alist)) + "\\|0x[0-9a-fA-F]+\\.?[0-9a-fA-F]*" + "\\|[0-9]+\\.?[0-9]*" ;; decimal/octal + "\\|\\w+")) + +(defconst hif-string-literal-regexp "\\(\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\)") + (defun hif-tokenize (start end) "Separate string between START and END into a list of tokens." @@ -401,23 +420,63 @@ ((looking-at "\\\\\n") (forward-char 2)) + ((looking-at hif-string-literal-regexp) + (push (substring-no-properties (match-string 1)) token-list) + (goto-char (match-end 0))) ((looking-at hif-token-regexp) (let ((token (buffer-substring (point) (match-end 0)))) (goto-char (match-end 0)) ;; (message "token: %s" token) (sit-for 1) - (push (or (cdr (assoc token hif-token-alist)) - (if (string-equal token "defined") 'hif-defined) - (if (string-match "\\`[0-9]*\\'" token) - (string-to-number token)) - (intern token)) - token-list))) + (push + (or (cdr (assoc token hif-token-alist)) + (if (string-equal token "defined") 'hif-defined) + ;; TODO: + ;; 1. postfix 'l', 'll', 'ul' and 'ull' + ;; 2. floating number formats + ;; 3. hexadecimal/octal floats + ;; 4. 098 is interpreted as octal conversion error + ;; FIXME: string-to-number does not convert hex floats + (if (string-match "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)" + token) + (string-to-number (match-string 1 token) 16)) ;; hex + ;; FIXME: string-to-number does not convert octal floats + (if (string-match "\\`0[0-9]+\\(\\.[0-9]+\\)?\\'" token) + (string-to-number token 8)) ;; octal + (if (string-match "\\`[1-9][0-9]*\\(\\.[0-9]+\\)?\\'" + token) + (string-to-number token)) ;; decimal + (intern token)) + token-list))) (t (error "Bad #if expression: %s" (buffer-string))))))) (nreverse token-list))) -;;;----------------------------------------------------------------- -;;; Translate C preprocessor #if expressions using recursive descent. -;;; This parser is limited to the operators &&, ||, !, and "defined". -;;; Added ==, !=, +, and -. Gary Oberbrunner, garyo@avs.com, 8/9/94 +;;------------------------------------------------------------------------ +;; Translate C preprocessor #if expressions using recursive descent. +;; This parser was limited to the operators &&, ||, !, and "defined". +;; Added ==, !=, +, and -. Gary Oberbrunner, garyo@avs.com, 8/9/94 +;; +;; Implement the C language operator precedence table. Add all those +;; missing operators that could be used in macros. Luke Lee 2013-09-04 + +;; | Operator Type | Operator | Associativity | +;; +----------------------+-----------------------------+---------------+ +;; | Primary Expression | () [] . -> expr++ expr-- | left-to-right | +;; | Unary Operators | * & + - ! ~ ++expr --expr | right-to-left | +;; | | (typecast) sizeof | | +;; | Binary Operators | * / % | left-to-right | +;; | | + - | | +;; | | >> << | | +;; | | < > <= >= | | +;; | | == != | | +;; | | & | | +;; | | ^ | | +;; | | | | | +;; | | && | | +;; | | || | | +;; | Ternary Operator | ?: | right-to-left | +;; x| Assignment Operators | = += -= *= /= %= >>= <<= &= | right-to-left | +;; | | ^= = | | +;; | Comma | , | left-to-right | (defsubst hif-nexttoken () "Pop the next token from token-list into the let variable \"hif-token\"." @@ -428,10 +487,24 @@ (let ((hif-token-list token-list)) (hif-nexttoken) (prog1 - (hif-expr) + (and hif-token + (hif-exprlist)) (if hif-token ; is there still a token? (error "Error: unexpected token: %s" hif-token))))) +(defun hif-exprlist () + "Parse an exprlist: expr { ',' expr}" + (let ((result (hif-expr))) + (if (eq hif-token 'hif-comma) + (let ((temp (list result))) + (while + (progn + (hif-nexttoken) + (push (hif-expr) temp) + (eq hif-token 'hif-comma))) + (cons 'hif-comma (nreverse temp))) + result))) + (defun hif-expr () "Parse an expression as found in #if. expr : or-expr | or-expr '?' expr ':' expr." @@ -448,67 +521,125 @@ result)) (defun hif-or-expr () - "Parse n or-expr : and-expr | or-expr '||' and-expr." + "Parse an or-expr : and-expr | or-expr '||' and-expr." (let ((result (hif-and-expr))) - (while (eq hif-token 'or) + (while (eq hif-token 'hif-or) (hif-nexttoken) (setq result (list 'hif-or result (hif-and-expr)))) result)) (defun hif-and-expr () - "Parse an and-expr : eq-expr | and-expr '&&' eq-expr." + "Parse an and-expr : logior-expr | and-expr '&&' logior-expr." + (let ((result (hif-logior-expr))) + (while (eq hif-token 'hif-and) + (hif-nexttoken) + (setq result (list 'hif-and result (hif-logior-expr)))) + result)) + +(defun hif-logior-expr () + "Parse a logor-expr : logxor-expr | logor-expr '|' logxor-expr." + (let ((result (hif-logxor-expr))) + (while (eq hif-token 'hif-logior) + (hif-nexttoken) + (setq result (list 'hif-logior result (hif-logxor-expr)))) + result)) + +(defun hif-logxor-expr () + "Parse a logxor-expr : logand-expr | logxor-expr '^' logand-expr." + (let ((result (hif-logand-expr))) + (while (eq hif-token 'hif-logxor) + (hif-nexttoken) + (setq result (list 'hif-logxor result (hif-logand-expr)))) + result)) + +(defun hif-logand-expr () + "Parse a logand-expr : eq-expr | logand-expr '&' eq-expr." (let ((result (hif-eq-expr))) - (while (eq hif-token 'and) + (while (eq hif-token 'hif-logand) (hif-nexttoken) - (setq result (list 'hif-and result (hif-eq-expr)))) + (setq result (list 'hif-logand result (hif-eq-expr)))) result)) (defun hif-eq-expr () - "Parse an eq-expr : math | eq-expr `=='|`!='|`<'|`>'|`>='|`<=' math." - (let ((result (hif-math)) + "Parse an eq-expr : comp | eq-expr `=='|`!=' comp." + (let ((result (hif-comp-expr)) (eq-token nil)) - (while (memq hif-token '(equal hif-notequal hif-greater hif-less - hif-greater-equal hif-less-equal)) + (while (memq hif-token '(hif-equal hif-notequal)) (setq eq-token hif-token) (hif-nexttoken) - (setq result (list eq-token result (hif-math)))) + (setq result (list eq-token result (hif-comp-expr)))) + result)) + +(defun hif-comp-expr () + "Parse a comp-expr : logshift | comp-expr `<'|`>'|`>='|`<=' logshift." + (let ((result (hif-logshift-expr)) + (comp-token nil)) + (while (memq hif-token '(hif-greater hif-less hif-greater-equal hif-less-equal)) + (setq comp-token hif-token) + (hif-nexttoken) + (setq result (list comp-token result (hif-logshift-expr)))) + result)) + +(defun hif-logshift-expr () + "Parse a logshift : math | logshift `<<'|`>>' math." + (let ((result (hif-math)) + (shift-token nil)) + (while (memq hif-token '(hif-shiftleft hif-shiftright)) + (setq shift-token hif-token) + (hif-nexttoken) + (setq result (list shift-token result (hif-math)))) result)) (defun hif-math () - "Parse an expression with + or - and simpler things. - math : factor | math '+|-' factor." + "Parse an expression with + or -. + math : muldiv | math '+|-' muldiv." + (let ((result (hif-muldiv-expr)) + (math-op nil)) + (while (memq hif-token '(hif-plus hif-minus)) + (setq math-op hif-token) + (hif-nexttoken) + (setq result (list math-op result (hif-muldiv-expr)))) + result)) + +(defun hif-muldiv-expr () + "Parse an expression with *,/,%. + muldiv : factor | muldiv '*|/|%' factor." (let ((result (hif-factor)) (math-op nil)) - (while (memq hif-token '(hif-plus hif-minus hif-logior hif-logand)) + (while (memq hif-token '(hif-multiply hif-divide hif-modulo)) (setq math-op hif-token) (hif-nexttoken) (setq result (list math-op result (hif-factor)))) result)) (defun hif-factor () - "Parse a factor: '!' factor | '(' expr ')' | 'defined(' id ')' | id." + "Parse a factor: '!' factor | '~' factor | '(' expr ')' | 'defined(' id ')' | 'id(parmlist)' | strings | id." (cond - ((eq hif-token 'not) + ((eq hif-token 'hif-not) (hif-nexttoken) (list 'hif-not (hif-factor))) - ((eq hif-token 'lparen) - (hif-nexttoken) - (let ((result (hif-expr))) - (if (not (eq hif-token 'rparen)) + ((eq hif-token 'hif-lognot) + (hif-nexttoken) + (list 'hif-lognot (hif-factor))) + + ((eq hif-token 'hif-lparen) + (hif-nexttoken) + (let ((result (hif-exprlist))) + (if (not (eq hif-token 'hif-rparen)) (error "Bad token in parenthesized expression: %s" hif-token) (hif-nexttoken) result))) ((eq hif-token 'hif-defined) (hif-nexttoken) - (let ((paren (when (eq hif-token 'lparen) (hif-nexttoken) t)) + (let ((paren (when (eq hif-token 'hif-lparen) (hif-nexttoken) t)) (ident hif-token)) - (if (memq hif-token '(or and not hif-defined lparen rparen)) + (if (memq hif-token '(or and not hif-defined hif-lparen hif-rparen)) (error "Error: unexpected token: %s" hif-token)) (when paren (hif-nexttoken) - (unless (eq hif-token 'rparen) + (unless (eq hif-token 'hif-rparen) (error "Error: expected \")\" after identifier"))) (hif-nexttoken) `(hif-defined (quote ,ident)))) @@ -541,22 +672,54 @@ (or (not (zerop (hif-mathify a))) (not (zerop (hif-mathify b))))) (defun hif-not (a) (zerop (hif-mathify a))) +(defun hif-lognot (a) + (lognot (hif-mathify a))) (defmacro hif-mathify-binop (fun) `(lambda (a b) ,(format "Like `%s' but treat t and nil as 1 and 0." fun) (,fun (hif-mathify a) (hif-mathify b)))) +(defun hif-shiftleft (a b) + (setq a (hif-mathify a)) + (setq b (hif-mathify b)) + (if (< a 0) + (ash a b) + (lsh a b))) + +(defun hif-shiftright (a b) + (setq a (hif-mathify a)) + (setq b (hif-mathify b)) + (if (< a 0) + (ash a (- b)) + (lsh a (- b)))) + + +(defalias 'hif-multiply (hif-mathify-binop *)) +(defalias 'hif-divide (hif-mathify-binop /)) +(defalias 'hif-modulo (hif-mathify-binop %)) (defalias 'hif-plus (hif-mathify-binop +)) (defalias 'hif-minus (hif-mathify-binop -)) +(defalias 'hif-equal (hif-mathify-binop =)) (defalias 'hif-notequal (hif-mathify-binop /=)) (defalias 'hif-greater (hif-mathify-binop >)) (defalias 'hif-less (hif-mathify-binop <)) (defalias 'hif-greater-equal (hif-mathify-binop >=)) (defalias 'hif-less-equal (hif-mathify-binop <=)) (defalias 'hif-logior (hif-mathify-binop logior)) +(defalias 'hif-logxor (hif-mathify-binop logxor)) (defalias 'hif-logand (hif-mathify-binop logand)) + +(defun hif-comma (&rest expr) + "Evaluate a list of expr, return the result of the last item" + (let ((result nil)) + (dolist (e expr) + (ignore-errors + (setq result (funcall hide-ifdef-evaluator e)))) + result)) + + ;;;----------- end of parser ----------------------- ------------------------------------------------------------ revno: 116186 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-01-28 09:55:06 +0400 message: * terminal.c (initial_free_frame_resources): New function. (init_initial_terminal): Install new hook to free face cache on initial frame and avoid memory leak. For details, see . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-26 19:44:23 +0000 +++ src/ChangeLog 2014-01-28 05:55:06 +0000 @@ -1,3 +1,10 @@ +2014-01-28 Dmitry Antipov + + * terminal.c (initial_free_frame_resources): New function. + (init_initial_terminal): Install new hook to free face cache + on initial frame and avoid memory leak. For details, see + . + 2014-01-26 Paul Eggert * data.c (Fstring_to_number): Document results if unparsable === modified file 'src/terminal.c' --- src/terminal.c 2014-01-01 07:43:34 +0000 +++ src/terminal.c 2014-01-28 05:55:06 +0000 @@ -500,7 +500,15 @@ return store_terminal_param (t, parameter, value); } - +/* Initial frame has no device-dependent output data, but has + face cache which should be freed when the frame is deleted. */ + +static void +initial_free_frame_resources (struct frame *f) +{ + eassert (FRAME_INITIAL_P (f)); + free_frame_faces (f); +} /* Create the bootstrap display terminal for the initial frame. Returns a terminal of type output_initial. */ @@ -516,6 +524,7 @@ initial_terminal->name = xstrdup ("initial_terminal"); initial_terminal->kboard = initial_kboard; initial_terminal->delete_terminal_hook = &delete_initial_terminal; + initial_terminal->delete_frame_hook = &initial_free_frame_resources; /* All other hooks are NULL. */ return initial_terminal; ------------------------------------------------------------ revno: 116185 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 22:00:20 -0500 message: Tweak previous fill-single-char-nobreak-p doc change diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-28 02:50:16 +0000 +++ etc/NEWS 2014-01-28 03:00:20 +0000 @@ -282,8 +282,8 @@ +++ *** `fill-single-char-nobreak-p' prevents fill from breaking a line after -a one-letter word, which is an error according to some rules of typography. -To use it, add it to the `fill-nobreak-predicate' hook. +a one-letter word, which is an error according to some typographical +conventions. To use it, add it to the `fill-nobreak-predicate' hook. +++ ** Uniquify is enabled by default, with `post-forward-angle-brackets' style. === modified file 'lisp/textmodes/fill.el' --- lisp/textmodes/fill.el 2014-01-28 02:50:16 +0000 +++ lisp/textmodes/fill.el 2014-01-28 03:00:20 +0000 @@ -333,7 +333,7 @@ "Return non-nil if a one-letter word is before point. This function is suitable for adding to the hook `fill-nobreak-predicate', to prevent the breaking of a line just after a one-letter word, -which is an error according to some rules of typography." +which is an error according to some typographical conventions." (save-excursion (skip-chars-backward " \t") (backward-char 2) ------------------------------------------------------------ revno: 116184 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 21:50:16 -0500 message: Doc for fill-single-char-nobreak-p * doc/emacs/text.texi (Fill Commands): Mention fill-single-char-nobreak-p. * lisp/textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak. * etc/NEWS: Related edit. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-01-28 02:16:13 +0000 +++ doc/emacs/ChangeLog 2014-01-28 02:50:16 +0000 @@ -1,5 +1,7 @@ 2014-01-28 Glenn Morris + * text.texi (Fill Commands): Mention fill-single-char-nobreak-p. + * indent.texi (Tab Stops): Updates for new tab-stop behavior. 2014-01-27 Glenn Morris === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2014-01-01 23:13:59 +0000 +++ doc/emacs/text.texi 2014-01-28 02:50:16 +0000 @@ -562,10 +562,11 @@ (@pxref{Hooks}). Each function in this hook is called with no arguments, with point positioned where Emacs is considering breaking a line. If a function returns a non-@code{nil} value, Emacs will not -break the line there. Two functions you can use are +break the line there. Functions you can use there include: @code{fill-single-word-nobreak-p} (don't break after the first word of -a sentence or before the last) and @code{fill-french-nobreak-p} (don't -break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). +a sentence or before the last); @code{fill-single-char-nobreak-p} +(don't break after a one-letter word); and @code{fill-french-nobreak-p} +(don't break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). @node Fill Prefix @subsection The Fill Prefix === modified file 'etc/NEWS' --- etc/NEWS 2014-01-28 02:16:13 +0000 +++ etc/NEWS 2014-01-28 02:50:16 +0000 @@ -280,11 +280,10 @@ spacing. Like `just-one-space', it can handle or ignore newlines and leave different number of spaces. ++++ *** `fill-single-char-nobreak-p' prevents fill from breaking a line after -a 1-letter word, which is an error according to Polish and -Czech typography rules. To globally enable this feature, evaluate: - - (add-hook 'fill-nobreak-predicate 'fill-single-char-nobreak-p) +a one-letter word, which is an error according to some rules of typography. +To use it, add it to the `fill-nobreak-predicate' hook. +++ ** Uniquify is enabled by default, with `post-forward-angle-brackets' style. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-28 01:49:02 +0000 +++ lisp/ChangeLog 2014-01-28 02:50:16 +0000 @@ -1,5 +1,7 @@ 2014-01-28 Glenn Morris + * textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak. + * indent.el (tab-stop-list): Doc fix. Add :version. * vc/pcvs.el (vc-editable-p, vc-checkout): Remove unused declarations. === modified file 'lisp/textmodes/fill.el' --- lisp/textmodes/fill.el 2014-01-01 07:43:34 +0000 +++ lisp/textmodes/fill.el 2014-01-28 02:50:16 +0000 @@ -330,10 +330,10 @@ (eq (char-syntax (following-char)) ?w))))))) (defun fill-single-char-nobreak-p () - "Return t if point is placed just after a 1-letter word. -This is used in `fill-nobreak-predicate' to prevent breaking line just -after a 1-letter word (usually conjunction or preposition) which is -considered composition error in Polish and Czech typography." + "Return non-nil if a one-letter word is before point. +This function is suitable for adding to the hook `fill-nobreak-predicate', +to prevent the breaking of a line just after a one-letter word, +which is an error according to some rules of typography." (save-excursion (skip-chars-backward " \t") (backward-char 2) ------------------------------------------------------------ revno: 116183 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 21:17:51 -0500 message: * doc/emacs/indent.texi: Fix typo in previous diff: === modified file 'doc/emacs/indent.texi' --- doc/emacs/indent.texi 2014-01-28 02:16:13 +0000 +++ doc/emacs/indent.texi 2014-01-28 02:17:51 +0000 @@ -181,7 +181,7 @@ @noindent The first line contains a colon at each tab stop. The numbers on the next two lines are present just to indicate where the colons are. -If the value @code{tab-stop-list} is @code{nil}, as it is by default, +If the value of @code{tab-stop-list} is @code{nil}, as it is by default, no colons are displayed initially. You can edit this buffer to specify different tab stops by placing ------------------------------------------------------------ revno: 116182 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 21:16:13 -0500 message: * doc/emacs/indent.texi (Tab Stops): Updates for new tab-stop behavior. * etc/NEWS: Related markup. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-01-27 21:26:48 +0000 +++ doc/emacs/ChangeLog 2014-01-28 02:16:13 +0000 @@ -1,3 +1,7 @@ +2014-01-28 Glenn Morris + + * indent.texi (Tab Stops): Updates for new tab-stop behavior. + 2014-01-27 Glenn Morris * dired.texi (Misc Dired Features): Copyedits for hide-details. === modified file 'doc/emacs/indent.texi' --- doc/emacs/indent.texi 2014-01-01 07:43:34 +0000 +++ doc/emacs/indent.texi 2014-01-28 02:16:13 +0000 @@ -157,10 +157,12 @@ Emacs defines certain column numbers to be @dfn{tab stops}. These are used as stopping points by @key{TAB} when inserting whitespace in Text mode and related modes (@pxref{Indentation}), and by commands -like @kbd{M-i} (@pxref{Indentation Commands}). By default, tab stops -are located every 8 columns. These positions are stored in the -variable @code{tab-stop-list}, whose value is a list of column numbers -in increasing order. +like @kbd{M-i} (@pxref{Indentation Commands}). The variable +@code{tab-stop-list} controls these positions. The default value +is @code{nil}, which means a tab stop every 8 columns. The value +can also be a list of column numbers (in increasing order) at which to +place tab stops. Emacs extends the list forever by repeating the +difference between the last and next-to-last elements. @findex edit-tab-stops @kindex C-c C-c @r{(Edit Tab Stops)} @@ -178,12 +180,15 @@ @noindent The first line contains a colon at each tab stop. The numbers on the -next two lines are present just to indicate where the colons are. It -is implicitly extended to infinity by repeating the last step. +next two lines are present just to indicate where the colons are. +If the value @code{tab-stop-list} is @code{nil}, as it is by default, +no colons are displayed initially. You can edit this buffer to specify different tab stops by placing colons on the desired columns. The buffer uses Overwrite mode -(@pxref{Minor Modes}). When you are done, type @kbd{C-c C-c} to make +(@pxref{Minor Modes}). Remember that Emacs will extend the list of +tab stops forever by repeating the difference between the last two +explicit stops that you place. When you are done, type @kbd{C-c C-c} to make the new tab stops take effect. Normally, the new tab stop settings apply to all buffers. However, if you have made the @code{tab-stop-list} variable local to the buffer where you called === modified file 'etc/NEWS' --- etc/NEWS 2014-01-28 00:39:50 +0000 +++ etc/NEWS 2014-01-28 02:16:13 +0000 @@ -268,6 +268,7 @@ *** `electric-indent-mode' is enabled by default. ++++ *** `tab-stop-list' is now implicitly extended to infinity by repeating the last step. Its default value is changed to nil, which means a tab stop every `tab-width' columns. ------------------------------------------------------------ revno: 116181 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 20:49:02 -0500 message: Some doc related to tab-stops * doc/lispref/text.texi (Indent Tabs): Update related to tab-stops. * lisp/indent.el (tab-stop-list): Doc fix. Add :version. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-01-24 04:11:48 +0000 +++ doc/lispref/ChangeLog 2014-01-28 01:49:02 +0000 @@ -1,3 +1,7 @@ +2014-01-28 Glenn Morris + + * text.texi (Indent Tabs): Update related to tab-stops. + 2014-01-24 Glenn Morris * control.texi (Handling Errors): Update with-demoted-errors. === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2014-01-09 23:21:56 +0000 +++ doc/lispref/text.texi 2014-01-28 01:49:02 +0000 @@ -2460,19 +2460,19 @@ @deffn Command tab-to-tab-stop This command inserts spaces or tabs before point, up to the next tab -stop column defined by @code{tab-stop-list}. It searches the list for -an element greater than the current column number, and uses that element -as the column to indent to. It does nothing if no such element is -found. +stop column defined by @code{tab-stop-list}. @end deffn @defopt tab-stop-list -This variable is the list of tab stop columns used by -@code{tab-to-tab-stops}. The elements should be integers in increasing -order. The tab stop columns need not be evenly spaced. +This variable defines the tab stop columns used by @code{tab-to-tab-stop}. +It should be either @code{nil}, or a list of increasing integers, +which need not be evenly spaced. The list is implicitly +extended to infinity through repetition of the interval between the +last and penultimate elements (or @code{tab-width} if the list has +fewer than two elements). A value of @code{nil} means a tab stop +every @code{tab-width} columns. -Use @kbd{M-x edit-tab-stops} to edit the location of tab stops -interactively. +Use @kbd{M-x edit-tab-stops} to edit the location of tab stops interactively. @end defopt @node Motion by Indent === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-28 00:39:50 +0000 +++ lisp/ChangeLog 2014-01-28 01:49:02 +0000 @@ -1,5 +1,7 @@ 2014-01-28 Glenn Morris + * indent.el (tab-stop-list): Doc fix. Add :version. + * vc/pcvs.el (vc-editable-p, vc-checkout): Remove unused declarations. (cvs-append-to-ignore): Add compatibility alias. === modified file 'lisp/indent.el' --- lisp/indent.el 2014-01-20 08:45:56 +0000 +++ lisp/indent.el 2014-01-28 01:49:02 +0000 @@ -586,16 +586,17 @@ (move-marker opoint nil)) (tab-to-tab-stop)))) -(defcustom tab-stop-list - nil +(defcustom tab-stop-list nil "List of tab stop positions used by `tab-to-tab-stop'. -This should be a list of integers, ordered from smallest to largest. -It implicitly extends to infinity by repeating the last step (e.g. '(1 2 5) -is equivalent to '(1 2 5 8 11)). -If the list has less than 2 elements, `tab-width' is used as the \"last step\"." +This should be nil, or a list of integers, ordered from smallest to largest. +It implicitly extends to infinity through repetition of the last step. +For example, '(1 2 5) is equivalent to '(1 2 5 8 11 ...). If the list has +fewer than 2 elements, `tab-width' is used as the \"last step\". +A value of nil means a tab stop every `tab-width' columns." :group 'indent + :version "24.4" ; from explicit list to nil + :safe 'listp :type '(repeat integer)) -(put 'tab-stop-list 'safe-local-variable 'listp) (defvar edit-tab-stops-map (let ((map (make-sparse-keymap))) ------------------------------------------------------------ revno: 116180 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 19:39:50 -0500 message: * lisp/vc/pcvs.el (cvs-append-to-ignore): Add compatibility alias. (vc-editable-p, vc-checkout): Remove unused declarations. * etc/NEWS: Small edits. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-27 22:27:16 +0000 +++ etc/NEWS 2014-01-28 00:39:50 +0000 @@ -42,8 +42,7 @@ --- ** The configure option `--with-crt-dir' has been removed. -It is no longer needed, as the crt*.o files are no longer linked -specially. +It is no longer needed, as the crt*.o files are no longer linked specially. --- ** Directories passed to configure option `--enable-locallisppath' are @@ -242,17 +241,15 @@ ** `emacs-bzr-version' has been renamed to `emacs-repository-version', and works for git too, if you fetch the repository notes. -** New user options: - -*** `read-regexp-defaults-function' defines a function to read regexps, +** `read-regexp-defaults-function' defines a function to read regexps, used by commands like `rgrep', `lgrep' `occur', `highlight-regexp', etc. You can customize this to specify a function that provides a default value from the regexp last history element, or from the symbol found at point. +++ -*** `load-prefer-newer' affects how the `load' function chooses the -file to load. If this is non-nil, then when both .el and .elc +** New option `load-prefer-newer' affects how the `load' function chooses +the file to load. If this is non-nil, then when both .el and .elc versions of a file exist, and the caller did not explicitly specify which one to load, then the newer file is loaded. The default, nil, means to always load the .elc file. @@ -409,13 +406,13 @@ **** Improved detection of used namespaces in current scope in C++. **** Parsing of default values for variables and function arguments in C/C++. -They are also displayed by the summarize feature in the modeline. +They are also displayed by the summarize feature in the mode line. **** Improved parsing of function pointers in C/C++. This also includes parsing of function pointers as function arguments. -**** Parsing of C/C++ preprocessor macros which open new scope. -For example, this enables parsing of macros which open new namespaces. +**** Parsing of C/C++ preprocessor macros that open new scope. +For example, this enables parsing of macros that open new namespaces. **** Support for 'this' pointer in inline member functions in C++. @@ -757,7 +754,7 @@ that it matches symbols, and non-symbol characters between symbols. +++ -** New SES command `ses-rename-cell' allows assigning names to SES cells. +** New SES command `ses-rename-cell' allows assignment of names to SES cells. --- ** The shell.el option `explicit-bash-args' includes --noediting by default. @@ -765,10 +762,12 @@ ** Shell Script mode +--- +*** The SMIE indentation engine is now used by default - see `sh-use-smie'. + +--- *** `sh-mode' now has its own setting for `add-log-current-defun-function'. -*** The SMIE indentation engine is now used by default. - ** SMIE indentation can be customized via `smie-config'. Emacs can learn the appropriate indentation settings if you provide it with an indented sample file. @@ -859,10 +858,6 @@ under current version control system. When called with a prefix argument, you can remove a file from the ignored file list. ---- -*** `cvs-append-to-ignore' has been renamed to `vc-cvs-append-to-ignore' -because it is moved to vc-cvs.el. - ** VHDL mode --- @@ -875,7 +870,7 @@ ** The Woman commands `woman-default-faces' and `woman-monochrome-faces' are obsolete. Customize the `woman-*' faces instead. -** Obsolete packages: +** Obsolete packages *** Iswitchb is made obsolete by icomplete-mode. @@ -1086,7 +1081,7 @@ ** New hook `pre-redisplay-function'. +++ -** New bool-vector set operation functions: +** New bool-vector set operation functions *** `bool-vector-exclusive-or' *** `bool-vector-union' *** `bool-vector-intersection' @@ -1126,7 +1121,7 @@ *** `string-remove-suffix' +++ -** Obsoleted functions: +** Obsoleted functions *** `log10' *** `dont-compile' *** `lisp-complete-symbol' === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-27 21:42:53 +0000 +++ lisp/ChangeLog 2014-01-28 00:39:50 +0000 @@ -1,3 +1,8 @@ +2014-01-28 Glenn Morris + + * vc/pcvs.el (vc-editable-p, vc-checkout): Remove unused declarations. + (cvs-append-to-ignore): Add compatibility alias. + 2014-01-27 Glenn Morris * dired.el (dired-hide-details-mode): Don't autoload it, === modified file 'lisp/vc/pcvs.el' --- lisp/vc/pcvs.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/pcvs.el 2014-01-28 00:39:50 +0000 @@ -1976,8 +1976,9 @@ (setf (cvs-fileinfo->type fi) 'DEAD)) (cvs-cleanup-collection cvs-cookies nil nil nil)) -(declare-function vc-editable-p "vc" (file)) -(declare-function vc-checkout "vc" (file &optional writable rev)) +(define-obsolete-function-alias 'cvs-append-to-ignore 'vc-cvs-append-to-ignore + "24.4") + (defun cvs-mode-find-file-other-window (e) "Select a buffer containing the file in another window." ------------------------------------------------------------ revno: 116179 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 17:27:16 -0500 message: * etc/NEWS: Small edits diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-27 22:05:52 +0000 +++ etc/NEWS 2014-01-27 22:27:16 +0000 @@ -609,17 +609,19 @@ ** JS Mode +--- +*** New option `js-switch-indent-offset'. + +--- *** Better indentation of multiple-variable declarations. -If declaration spans several lines, variables on the following lines +If a declaration spans several lines, variables on the following lines are lined up to the first one. -*** We now recognize and better indent continuations in array -comprehensions. - -*** New option `js-switch-indent-offset`. - -** MH-E has been updated to MH-E version 8.5. -See MH-E-NEWS for details. +--- +*** Recognition and better indentation of continuations in array comprehensions. + ++++ +** MH-E has been updated to version 8.5 - see separate MH-E-NEWS file. +++ ** Octave mode @@ -1113,10 +1115,10 @@ ** New library subr-x.el with miscellaneous small utility functions *** `hash-table-keys' *** `hash-table-values' -*** `string-blank-p` -*** `string-empty-p` -*** `string-join` -*** `string-reverse` +*** `string-blank-p' +*** `string-empty-p' +*** `string-join' +*** `string-reverse' *** `string-trim-left' *** `string-trim-right' *** `string-trim' @@ -3363,7 +3365,7 @@ *** `frame-update-faces' (not needed) *** `frame-update-face-colors' (`frame-set-background-mode') *** `x-frob-font-weight' and `x-frob-font-slant' (`make-face-*' functions) -*** `x-make-font-bold and x-make-font-demibold (`make-face-bold') +*** `x-make-font-bold' and `x-make-font-demibold' (`make-face-bold') *** `x-make-font-italic' and `x-make-font-oblique' (`make-face-italic') *** `x-make-font-bold-italic' (`make-face-bold-italic') *** `x-make-font-unbold' (`make-face-unbold') ------------------------------------------------------------ revno: 116178 committer: Paul Eggert branch nick: trunk timestamp: Mon 2014-01-27 14:22:17 -0800 message: Spelling fix. diff: === modified file 'lisp/emulation/viper-keym.el' --- lisp/emulation/viper-keym.el 2014-01-27 02:02:28 +0000 +++ lisp/emulation/viper-keym.el 2014-01-27 22:22:17 +0000 @@ -148,7 +148,7 @@ ;; This was the main Vi mode in old versions of VIP which may have been ;; extensively used by VIP users. We declare it as a global var and, after -;; viper-custom-file-name is loaded, we add this keymapto viper-vi-basic-map. +;; viper-custom-file-name is loaded, we add this keymap to viper-vi-basic-map. (defvar viper-mode-map (make-sparse-keymap)) ;; Some important keys used in viper ------------------------------------------------------------ revno: 116177 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 17:05:52 -0500 message: * etc/NEWS: Tiny edits. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-27 21:26:48 +0000 +++ etc/NEWS 2014-01-27 22:05:52 +0000 @@ -429,8 +429,8 @@ ** CUA mode *** CUA mode now uses `delete-selection-mode' and `shift-select-mode'. -Hence, you can now enable it independently from `transient-mark-mode', -`delete-selection-mode', and `shift-select-mode'. +Hence, you can now enable it independently from those modes, and from +`transient-mark-mode'. --- *** `cua-highlight-region-shift-only' is now obsolete. @@ -440,11 +440,13 @@ ** CFEngine mode +--- *** Support for completion, ElDoc, and Flycheck has been added. +--- *** The current CFEngine syntax is parsed from "cf-promises -s json". There is a fallback syntax available if you don't have cf-promises or -if it doesn't support that option. +if your version doesn't support that option. See option `cfengine-cf-promises'. ** Delete Selection mode can now be used without `transient-mark-mode'. ------------------------------------------------------------ revno: 116176 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 16:42:53 -0500 message: * lisp/dired.el (dired-hide-details-mode): Don't autoload it, since it cannot be used outside Dired buffers anyway. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-27 21:26:48 +0000 +++ lisp/ChangeLog 2014-01-27 21:42:53 +0000 @@ -1,5 +1,8 @@ 2014-01-27 Glenn Morris + * dired.el (dired-hide-details-mode): Don't autoload it, + since it cannot be used outside Dired buffers anyway. + * emulation/cua-base.el (cua-mode): Doc fix. * dired.el (dired-hide-details-hide-symlink-targets) === modified file 'lisp/dired.el' --- lisp/dired.el 2014-01-27 21:26:48 +0000 +++ lisp/dired.el 2014-01-27 21:42:53 +0000 @@ -2267,7 +2267,6 @@ (substring file (match-end 0)) file)) -;;;###autoload (define-minor-mode dired-hide-details-mode "Toggle visibility of detailed information in current Dired buffer. When this minor mode is enabled, details such as file ownership and ------------------------------------------------------------ revno: 116175 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 16:26:48 -0500 message: Small doc updates for CUA and dired * doc/emacs/dired.texi (Misc Dired Features): Copyedits for hide-details. * lisp/dired.el (dired-hide-details-hide-symlink-targets) (dired-hide-details-hide-information-lines) (dired-hide-details-mode): Doc fixes. * lisp/emulation/cua-base.el (cua-mode): Doc fix. * etc/NEWS: Related edits. * lisp/ChangeLog: Comment changes do not need ChangeLog entries. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-01-27 02:03:26 +0000 +++ doc/emacs/ChangeLog 2014-01-27 21:26:48 +0000 @@ -1,5 +1,7 @@ 2014-01-27 Glenn Morris + * dired.texi (Misc Dired Features): Copyedits for hide-details. + * buffers.texi (List Buffers): Tiny edit. * calendar.texi (Time Intervals): Update for files in ~/.emacs.d/. === modified file 'doc/emacs/dired.texi' --- doc/emacs/dired.texi 2014-01-10 02:30:51 +0000 +++ doc/emacs/dired.texi 2014-01-27 21:26:48 +0000 @@ -1382,7 +1382,7 @@ a regular expression search. @xref{Repeat Isearch}, for information about search repetition. -@cindex Adding to the kill ring in Dired. +@cindex adding to the kill ring in Dired @kindex w @r{(Dired)} @findex dired-copy-filename-as-kill The command @kbd{w} (@code{dired-copy-filename-as-kill}) puts the @@ -1403,6 +1403,19 @@ it added to the kill ring, so you can use it to display the list of currently marked files in the echo area. +@kindex ( @r{(Dired)} +@findex dired-hide-details-mode +@vindex dired-hide-details-hide-symlink-targets +@vindex dired-hide-details-hide-information-lines +@cindex hiding details in Dired + The command @kbd{(} (@code{dired-hide-details-mode}) toggles whether +details, such as ownership or file permissions, are visible in the +current Dired buffer. By default, it also hides the targets of +symbolic links, and all lines other than the header line and +file/directory listings. To change this, customize the options +@code{dired-hide-details-hide-symlink-targets} and +@code{dired-hide-details-hide-information-lines}, respectively. + @cindex Dired and version control If the directory you are visiting is under version control (@pxref{Version Control}), then the normal VC diff and log commands @@ -1440,18 +1453,3 @@ to the file in that directory. Precisely which action is taken is determined by the originating program. Dragging files out of a Dired buffer is currently not supported. - -@kindex ( @r{(Dired)} -@c ) -@findex dired-hide-details-mode -@vindex dired-hide-details-hide-symlink-targets -@vindex dired-hide-details-hide-information-lines -@cindex Hide details in Dired. - The command @kbd{(} (@code{dired-hide-details-mode}) toggles whether -details, such as ownership or file permissions, are hidden. If the -variable @code{dired-hide-details-hide-symlink-targets} is -non-@code{nil} then targets of symbolic links are hidden as well. A -non-@code{nil} value for the variable -@code{dired-hide-details-hide-information-lines} means that all lines -other than the header and lines containing files and directories are -hidden. === modified file 'etc/NEWS' --- etc/NEWS 2014-01-27 19:56:13 +0000 +++ etc/NEWS 2014-01-27 21:26:48 +0000 @@ -432,6 +432,7 @@ Hence, you can now enable it independently from `transient-mark-mode', `delete-selection-mode', and `shift-select-mode'. +--- *** `cua-highlight-region-shift-only' is now obsolete. You can disable `transient-mark-mode' to get the same result. @@ -458,9 +459,8 @@ and `desktop-restore-forces-onscreen' offer further customization. +++ -** Dired - -*** New minor mode `dired-hide-details-mode' hides details. +** New Dired minor mode `dired-hide-details-mode' toggles whether details, +such as file ownership or permissions, are visible. ** Eldoc Mode works properly in the minibuffer. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-27 12:30:17 +0000 +++ lisp/ChangeLog 2014-01-27 21:26:48 +0000 @@ -1,10 +1,11 @@ -2014-01-27 Reuben Thomas - - * whitespace.el (whitespace-enable-predicate): fix sense of comment. - Fixes bug #16564, from change of 2013-03-10. - 2014-01-27 Glenn Morris + * emulation/cua-base.el (cua-mode): Doc fix. + + * dired.el (dired-hide-details-hide-symlink-targets) + (dired-hide-details-hide-information-lines) + (dired-hide-details-mode): Doc fixes. + * shadowfile.el (shadow-info-file, shadow-todo-file): Doc fix. * strokes.el (strokes-file): Doc fix. Bump :version. (strokes-help): Doc fix. === modified file 'lisp/dired.el' --- lisp/dired.el 2014-01-12 11:24:16 +0000 +++ lisp/dired.el 2014-01-27 21:26:48 +0000 @@ -241,13 +241,13 @@ :group 'dired) (defcustom dired-hide-details-hide-symlink-targets t - "If non-nil, `dired-hide-details-mode' hides symbolic link targets." + "Non-nil means `dired-hide-details-mode' hides symbolic link targets." :type 'boolean :version "24.4" :group 'dired) (defcustom dired-hide-details-hide-information-lines t - "Non-nil means hide lines other than header and file/dir lines." + "Non-nil means `dired-hide-details-mode' hides all but header and file lines." :type 'boolean :version "24.4" :group 'dired) @@ -2267,10 +2267,14 @@ (substring file (match-end 0)) file)) -;;; Minor mode for hiding details ;;;###autoload (define-minor-mode dired-hide-details-mode - "Hide details in Dired mode." + "Toggle visibility of detailed information in current Dired buffer. +When this minor mode is enabled, details such as file ownership and +permissions are hidden from view. + +See options: `dired-hide-details-hide-symlink-targets' and +`dired-hide-details-hide-information-lines'." :group 'dired (unless (derived-mode-p 'dired-mode) (error "Not a Dired buffer")) === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2014-01-01 07:43:34 +0000 +++ lisp/emulation/cua-base.el 2014-01-27 21:26:48 +0000 @@ -1426,12 +1426,7 @@ You can customize `cua-enable-cua-keys' to completely disable the CUA bindings, or `cua-prefix-override-inhibit-delay' to change -the prefix fallback behavior. - -CUA mode manages Transient Mark mode internally. Trying to disable -Transient Mark mode while CUA mode is enabled does not work; if you -only want to highlight the region when it is selected using a -shifted movement key, set `cua-highlight-region-shift-only'." +the prefix fallback behavior." :global t :group 'cua :set-after '(cua-enable-modeline-indications ------------------------------------------------------------ revno: 116174 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-01-27 14:56:13 -0500 message: * etc/NEWS: Small calc edits. In general, it is not necessary for NEWS to repeat information from an option's doc-string. All NEWS really has to do is advertise that the option exists. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-27 02:02:28 +0000 +++ etc/NEWS 2014-01-27 19:56:13 +0000 @@ -378,18 +378,18 @@ ** Calc ++++ *** Calc by default now uses the Gregorian calendar for all dates, and uses January 1, 1 AD as its day number 1. Previously Calc used the Julian calendar for dates before September 14, 1752, and it used December 31, 1 BC as its day number 1; the new scheme is more consistent with Calendar's calendrical system and day numbering. -*** The new variable `calc-gregorian-switch' lets you configure the -date when Calc switches from the Julian to the Gregorian calendar. -Nil, the default value, means to always use the Gregorian calendar. -The value (YEAR MONTH DAY) means to start using the Gregorian calendar -on the given date. ++++ +*** The new option `calc-gregorian-switch' lets you configure if +(and when) Calc switches from the Julian to the Gregorian calendar. ++++ *** Support for ISO 8601 dates. ** CEDET ------------------------------------------------------------ revno: 116173 committer: Michael Albinus branch nick: trunk timestamp: Mon 2014-01-27 20:10:02 +0100 message: * automated/file-notify-tests.el (file-notify--deftest-remote): Do not skip when the local test has failed. They are unrelated. (file-notify--wait-for-events): Use `sit-for'. Let-bind `noninteractive' to nil, otherwise `sit-for' could be degraded to `sleep-for'. (file-notify-test02-events): Check for `file-remote-p' instead of `file-notify--test-remote-enabled'. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-01-26 16:20:13 +0000 +++ test/ChangeLog 2014-01-27 19:10:02 +0000 @@ -1,3 +1,13 @@ +2014-01-27 Michael Albinus + + * automated/file-notify-tests.el (file-notify--deftest-remote): + Do not skip when the local test has failed. They are unrelated. + (file-notify--wait-for-events): Use `sit-for'. Let-bind + `noninteractive' to nil, otherwise `sit-for' could be degraded to + `sleep-for'. + (file-notify-test02-events): Check for `file-remote-p' instead of + `file-notify--test-remote-enabled'. + 2014-01-26 Michael Albinus * automated/file-notify-tests.el (file-notify-test02-events): === modified file 'test/automated/file-notify-tests.el' --- test/automated/file-notify-tests.el 2014-01-26 16:29:50 +0000 +++ test/automated/file-notify-tests.el 2014-01-27 19:10:02 +0000 @@ -102,11 +102,6 @@ file-notify-test-remote-temporary-file-directory) (ert-test (ert-get-test ',test))) (skip-unless (file-notify--test-remote-enabled)) - ;; The local test could have passed, skipped, or quit. All of - ;; these results should not prevent us to run the remote test. - ;; That's why we skip only for failed local tests. - (skip-unless - (not (ert-test-failed-p (ert-test-most-recent-result ert-test)))) (tramp-cleanup-connection (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) (funcall (ert-test-body ert-test))))) @@ -189,20 +184,18 @@ (defmacro file-notify--wait-for-events (timeout until) "Wait for file notification events until form UNTIL is true. -TIMEOUT is the maximum time to wait for." +TIMEOUT is the maximum time to wait for, in seconds." `(with-timeout (,timeout (ignore)) (while (null ,until) - ;; glib events, and remote events. - (accept-process-output nil 0.1) - ;; inotify events. - (read-event nil nil 0.1)))) + (let (noninteractive) + (sit-for 0.1 'nodisplay))))) (ert-deftest file-notify-test02-events () "Check file creation/removal notifications." ;; Bug#16519. :expected-result (if (and noninteractive - (not (file-notify--test-remote-enabled)) + (not (file-remote-p temporary-file-directory)) (memq file-notify--library '(gfilenotify w32notify))) :failed :passed) (skip-unless (file-notify--test-local-enabled)) ------------------------------------------------------------ revno: 116172 committer: Reuben Thomas branch nick: trunk timestamp: Mon 2014-01-27 12:30:17 +0000 message: * whitespace.el (whitespace-enable-predicate): fix sense of comment. Fixes bug #16564, from change of 2013-03-10. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-27 02:02:28 +0000 +++ lisp/ChangeLog 2014-01-27 12:30:17 +0000 @@ -1,3 +1,8 @@ +2014-01-27 Reuben Thomas + + * whitespace.el (whitespace-enable-predicate): fix sense of comment. + Fixes bug #16564, from change of 2013-03-10. + 2014-01-27 Glenn Morris * shadowfile.el (shadow-info-file, shadow-todo-file): Doc fix. === modified file 'lisp/whitespace.el' --- lisp/whitespace.el 2014-01-06 06:25:30 +0000 +++ lisp/whitespace.el 2014-01-27 12:30:17 +0000 @@ -1084,7 +1084,7 @@ (not (memq major-mode (cdr whitespace-global-modes))) (memq major-mode whitespace-global-modes))) (t nil)) - ;; ...we have a display (we're running a batch job) + ;; ...we have a display (not running a batch job) (not noninteractive) ;; ...the buffer is not internal (name starts with a space) (not (eq (aref (buffer-name) 0) ?\ )) ------------------------------------------------------------ revno: 116171 committer: Paul Eggert branch nick: trunk timestamp: Sun 2014-01-26 21:29:30 -0800 message: * lread.c (oblookup): Fix comment to match code. diff: === modified file 'src/lread.c' --- src/lread.c 2014-01-20 07:56:28 +0000 +++ src/lread.c 2014-01-27 05:29:30 +0000 @@ -3938,7 +3938,8 @@ /* Return the symbol in OBARRAY whose names matches the string of SIZE characters (SIZE_BYTE bytes) at PTR. - If there is no such symbol in OBARRAY, return nil. + If there is no such symbol, return the integer bucket number of + where the symbol would be if it were present. Also store the bucket number in oblookup_last_bucket_number. */