Now on revision 112805. ------------------------------------------------------------ revno: 112805 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-06-01 11:38:36 +0800 message: * progmodes/octave.el (octave-mode-syntax-table): Give `.' punctuation syntax. (inferior-octave-minimal-columns) (inferior-octave-last-column-width): New variables. (inferior-octave-track-window-width-change): New function. (inferior-octave-mode): Adjust column width so that Octave output, for example from 'ls', can fit into the window nicely. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-31 16:55:03 +0000 +++ lisp/ChangeLog 2013-06-01 03:38:36 +0000 @@ -1,3 +1,13 @@ +2013-06-01 Leo Liu + + * progmodes/octave.el (octave-mode-syntax-table): Give `.' + punctuation syntax. + (inferior-octave-minimal-columns) + (inferior-octave-last-column-width): New variables. + (inferior-octave-track-window-width-change): New function. + (inferior-octave-mode): Adjust column width so that Octave output, + for example from 'ls', can fit into the window nicely. + 2013-05-31 Dmitry Gutov * progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-29 06:50:48 +0000 +++ lisp/progmodes/octave.el 2013-06-01 03:38:36 +0000 @@ -191,10 +191,9 @@ (modify-syntax-entry ?! "." table) (modify-syntax-entry ?\\ "." table) (modify-syntax-entry ?\' "." table) - ;; Was "w" for abbrevs, but now that it's not necessary any more, (modify-syntax-entry ?\` "." table) + (modify-syntax-entry ?. "." table) (modify-syntax-entry ?\" "\"" table) - (modify-syntax-entry ?. "_" table) (modify-syntax-entry ?_ "_" table) ;; The "b" flag only applies to the second letter of the comstart ;; and the first letter of the comend, i.e. the "4b" below is ineffective. @@ -676,13 +675,16 @@ (setq-local eldoc-documentation-function 'octave-eldoc-function) (setq comint-input-ring-file-name - (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") - comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) + (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") + comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) (setq-local comint-dynamic-complete-functions inferior-octave-dynamic-complete-functions) (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) (add-hook 'comint-input-filter-functions 'inferior-octave-directory-tracker nil t) + ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 + (add-hook 'window-configuration-change-hook + 'inferior-octave-track-window-width-change nil t) (comint-read-input-ring t)) ;;;###autoload @@ -913,6 +915,24 @@ (inferior-octave-send-list-and-digest '("disp (pwd ())\n")) (cd (car inferior-octave-output-list))) +(defcustom inferior-octave-minimal-columns 80 + "The minimal column width for the inferior Octave process." + :type 'integer + :group 'octave + :version "24.4") + +(defvar inferior-octave-last-column-width nil) + +(defun inferior-octave-track-window-width-change () + ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 + (let ((width (max inferior-octave-minimal-columns (window-width)))) + (unless (eq inferior-octave-last-column-width width) + (setq-local inferior-octave-last-column-width width) + (when (and inferior-octave-process + (process-live-p inferior-octave-process)) + (inferior-octave-send-list-and-digest + (list (format "putenv(\"COLUMNS\", \"%s\");\n" width))))))) + ;;; Miscellaneous useful functions @@ -1639,11 +1659,7 @@ (when (re-search-forward "^\\s-*See also:" nil t) (let ((end (save-excursion (re-search-forward "^\\s-*$" nil t)))) (while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" end t) - (make-text-button (match-beginning 0) - ;; If the match ends with . exclude it. - (if (eq (char-before (match-end 0)) ?.) - (1- (match-end 0)) - (match-end 0)) + (make-text-button (match-beginning 0) (match-end 0) :type 'octave-help-function))))) (octave-help-mode))))) ------------------------------------------------------------ revno: 112804 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-05-31 17:54:34 -0700 message: * process.c (handle_child_signal): Also use WCONTINUED. This is so that list-processes doesn't mistakenly list the process as stopped, when the process has actually been continued and is now running. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-31 01:41:52 +0000 +++ src/ChangeLog 2013-06-01 00:54:34 +0000 @@ -1,3 +1,10 @@ +2013-06-01 Paul Eggert + + * process.c (handle_child_signal): Also use WCONTINUED. + This is so that list-processes doesn't mistakenly list the process + as stopped, when the process has actually been continued and is + now running. + 2013-05-31 Paul Eggert Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474). === modified file 'src/process.c' --- src/process.c 2013-05-15 18:54:49 +0000 +++ src/process.c 2013-06-01 00:54:34 +0000 @@ -6159,7 +6159,8 @@ struct Lisp_Process *p = XPROCESS (proc); int status; - if (p->alive && child_status_changed (p->pid, &status, WUNTRACED)) + if (p->alive + && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED)) { /* Change the status of the process that was found. */ p->tick = ++process_tick; ------------------------------------------------------------ revno: 112803 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-05-31 22:22:23 +0300 message: Document changes in the installation tree on MS-Windows. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-05-30 23:45:41 +0000 +++ etc/NEWS 2013-05-31 19:22:23 +0000 @@ -39,6 +39,18 @@ files are deprecated. See the file nt/INSTALL.MSYS for detailed instructions. +Using the Posix configure script and Makefile's also means a change in +the directory structure of the Emacs installation on Windows. It is +now the same as on GNU and Unix systems. In particular, the auxiliary +programs, such as cmdproxy.exe and hexl.exe, are in +libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs +version), version-independent site-lisp is in share/emacs/site-lisp, +version-specific Lisp files are in share/emacs/VERSION/lisp and in +share/emacs/VERSION/site-lisp, Info docs are in share/info, and data +files are in share/emacs/VERSION/etc. (Emacs knows about all these +directories and will find the files in there automatically; there's no +need to set any variables due to this change.) + * Startup Changes in Emacs 24.4 ------------------------------------------------------------ revno: 112802 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-05-31 10:10:10 -0700 message: Spelling fixes. diff: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-30 23:45:41 +0000 +++ lisp/isearch.el 2013-05-31 17:10:10 +0000 @@ -198,7 +198,7 @@ When the list of predicates is empty, `run-hook-with-args-until-failure' returns non-nil that means that the found match is accepted. The property `isearch-message-prefix' put on the predicate's symbol -specifies the prefix string displyed in the search message.") +specifies the prefix string displayed in the search message.") (define-obsolete-variable-alias 'isearch-filter-predicate 'isearch-filter-predicates "24.4") === modified file 'nt/INSTALL.MSYS' --- nt/INSTALL.MSYS 2013-05-25 09:26:53 +0000 +++ nt/INSTALL.MSYS 2013-05-31 17:10:10 +0000 @@ -331,7 +331,7 @@ C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to install programs in a single coherent tree resembling Posix systems. Such a single-tree installation makes sure all the other programs - and packages ported from GNU or Unix systems will work seemlessly + and packages ported from GNU or Unix systems will work seamlessly together. Where exactly is the root of that tree on your system is something only you, the user who builds Emacs, can know, and the Emacs build process cannot guess, because usually there's no ------------------------------------------------------------ revno: 112801 committer: Dmitry Gutov branch nick: trunk timestamp: Fri 2013-05-31 20:55:03 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): Highlight expansions inside regexp literals. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-31 07:34:56 +0000 +++ lisp/ChangeLog 2013-05-31 16:55:03 +0000 @@ -1,3 +1,8 @@ +2013-05-31 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): + Highlight expansions inside regexp literals. + 2013-05-31 Glenn Morris * obsolete/sym-comp.el (symbol-complete): === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-05-31 06:04:33 +0000 +++ lisp/progmodes/ruby-mode.el 2013-05-31 16:55:03 +0000 @@ -1513,7 +1513,7 @@ "Return non-nil if expression expansion is allowed." (let ((term (nth 3 parse-state))) (cond - ((memq term '(?\" ?` ?\n))) + ((memq term '(?\" ?` ?\n ?/))) ((eq term t) (save-match-data (save-excursion === modified file 'test/automated/ruby-mode-tests.el' --- test/automated/ruby-mode-tests.el 2013-05-31 06:04:33 +0000 +++ test/automated/ruby-mode-tests.el 2013-05-31 16:55:03 +0000 @@ -112,6 +112,9 @@ (ert-deftest ruby-regexp-starts-after-string () (ruby-assert-state "'(/', /\d+/" 3 ?/ 8)) +(ert-deftest ruby-regexp-interpolation-is-highlighted () + (ruby-assert-face "/#{foobs}/" 4 font-lock-variable-name-face)) + (ert-deftest ruby-regexp-skips-over-interpolation () (ruby-assert-state "/#{foobs.join('/')}/" 3 nil)) ------------------------------------------------------------ revno: 112800 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-05-31 11:47:18 +0300 message: Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat. nt/inc/sys/time.h (gettimeofday): Use '__restrict' instead of 'restrict', which is a C99 extension. See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html and the following discussion for the problem this caused in the old nt/configure.bat build. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-05-29 16:48:42 +0000 +++ nt/ChangeLog 2013-05-31 08:47:18 +0000 @@ -1,3 +1,11 @@ +2013-05-31 Eli Zaretskii + + * inc/sys/time.h (gettimeofday): Use '__restrict' instead of + 'restrict', which is a C99 extension. See + http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html + and the following discussion for the problem this caused in the + old nt/configure.bat build. + 2013-05-29 Eli Zaretskii * Makefile.in (emacs.res): Include srcdir when preprocessing === modified file 'nt/inc/sys/time.h' --- nt/inc/sys/time.h 2013-03-28 20:51:26 +0000 +++ nt/inc/sys/time.h 2013-05-31 08:47:18 +0000 @@ -35,10 +35,15 @@ }; #endif + /* This needs to be compatible with Posix signature, in order to pass - the configure test for the type of the second argument. See - m4/gettimeofday.m4. */ -int gettimeofday (struct timeval *restrict, struct timezone *restrict); + the configure test for the type of the second argument; see + m4/gettimeofday.m4. We use '__restrict' here, rather than + 'restrict', for the benefit of the old nt/configure.bat build, + which does not force the use of -std= switch to GCC, and that + causes compilation errors with 'restrict', which is a C99 + extension. */ +int gettimeofday (struct timeval *__restrict, struct timezone *__restrict); #define ITIMER_REAL 0 #define ITIMER_PROF 1 ------------------------------------------------------------ revno: 112799 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-31 00:34:56 -0700 message: * sym-comp.el (symbol-complete): Replace obsolete completion-annotate-function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-31 07:05:55 +0000 +++ lisp/ChangeLog 2013-05-31 07:34:56 +0000 @@ -1,5 +1,8 @@ 2013-05-31 Glenn Morris + * obsolete/sym-comp.el (symbol-complete): + Replace obsolete completion-annotate-function. + * progmodes/cc-vars.el (c-make-macro-with-semi-re): Silence compiler. 2013-05-31 Dmitry Gutov === modified file 'lisp/obsolete/sym-comp.el' --- lisp/obsolete/sym-comp.el 2013-05-24 03:45:50 +0000 +++ lisp/obsolete/sym-comp.el 2013-05-31 07:34:56 +0000 @@ -139,12 +139,13 @@ pattern)) ;; In case the transform needs to access it. (symbol-completion-predicate predicate) - (completion-annotate-function + (completion-extra-properties (if (functionp symbol-completion-transform-function) - (lambda (str) - (car-safe (cdr-safe - (funcall symbol-completion-transform-function - str))))))) + '(:annotation-function + (lambda (str) + (car-safe (cdr-safe + (funcall symbol-completion-transform-function + str)))))))) (completion-in-region (- (point) (length pattern)) (point) completions predicate))) ------------------------------------------------------------ revno: 112798 committer: Tassilo Horn branch nick: trunk timestamp: Fri 2013-05-31 09:15:51 +0200 message: * themes/tsdh-dark-theme.el (tsdh-dark): Refine mode-line faces. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-05-25 02:17:54 +0000 +++ etc/ChangeLog 2013-05-31 07:15:51 +0000 @@ -1,3 +1,7 @@ +2013-05-31 Tassilo Horn + + * themes/tsdh-dark-theme.el (tsdh-dark): Refine mode-line faces. + 2013-05-25 Xue Fuqiao * refcards/refcard.tex: Refine some entries. (Bug#14087) === modified file 'etc/themes/tsdh-dark-theme.el' --- etc/themes/tsdh-dark-theme.el 2013-04-24 16:50:14 +0000 +++ etc/themes/tsdh-dark-theme.el 2013-05-31 07:15:51 +0000 @@ -73,8 +73,8 @@ '(magit-section-title ((t (:inherit magit-header :background "dark slate blue")))) '(menu ((t (:background "gray30" :foreground "gray70")))) '(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold)))) - '(mode-line ((t (:box (:line-width 1 :color "red") :family "DejaVu Sans")))) - '(mode-line-inactive ((t (:inherit mode-line :foreground "dim gray")))) + '(mode-line ((t (:background "gray30" :box (:line-width 1 :color "red") :family "DejaVu Sans")))) + '(mode-line-inactive ((t (:inherit mode-line :foreground "dark gray")))) '(org-agenda-date ((t (:inherit org-agenda-structure))) t) '(org-agenda-date-today ((t (:inherit org-agenda-date :underline t))) t) '(org-agenda-date-weekend ((t (:inherit org-agenda-date :foreground "green"))) t) ------------------------------------------------------------ revno: 112797 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-31 00:05:55 -0700 message: * progmodes/cc-vars.el (c-make-macro-with-semi-re): Silence compiler. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-31 06:04:33 +0000 +++ lisp/ChangeLog 2013-05-31 07:05:55 +0000 @@ -1,3 +1,7 @@ +2013-05-31 Glenn Morris + + * progmodes/cc-vars.el (c-make-macro-with-semi-re): Silence compiler. + 2013-05-31 Dmitry Gutov * progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): New === modified file 'lisp/progmodes/cc-vars.el' --- lisp/progmodes/cc-vars.el 2013-05-28 06:55:48 +0000 +++ lisp/progmodes/cc-vars.el 2013-05-31 07:05:55 +0000 @@ -1645,6 +1645,7 @@ ;; `c-macro-with-semi-re' (or just copy it if it's already a re). (setq c-macro-with-semi-re (and + (boundp 'c-opt-cpp-macro-define) c-opt-cpp-macro-define (cond ((stringp c-macro-names-with-semicolon) ------------------------------------------------------------ revno: 112796 committer: Dmitry Gutov branch nick: trunk timestamp: Fri 2013-05-31 10:04:33 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): New function, checks if expression expansion is allowed in given parse state. (ruby-syntax-propertize-expansion): Use it. (ruby-syntax-propertize-function): Bind `case-fold-search' to nil around the body. * test/automated/ruby-mode-tests.el: New tests, for percent literals and expression expansion. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 23:45:41 +0000 +++ lisp/ChangeLog 2013-05-31 06:04:33 +0000 @@ -1,3 +1,12 @@ +2013-05-31 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): New + function, checks if point is inside a literal that allows + expression expansion. + (ruby-syntax-propertize-expansion): Use it. + (ruby-syntax-propertize-function): Bind `case-fold-search' to nil + around the body. + 2013-05-30 Juri Linkov * isearch.el (isearch-mode-map): Bind `isearch-toggle-invisible' === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-05-24 03:49:52 +0000 +++ lisp/progmodes/ruby-mode.el 2013-05-31 06:04:33 +0000 @@ -1349,6 +1349,7 @@ (declare-function ruby-syntax-propertize-percent-literal "ruby-mode" (limit)) ;; Unusual code layout confuses the byte-compiler. (declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) +(declare-function ruby-syntax-expansion-allowed-p "ruby-mode" (parse-state)) (if (eval-when-compile (fboundp #'syntax-propertize-rules)) ;; New code that works independently from font-lock. @@ -1380,51 +1381,52 @@ (defun ruby-syntax-propertize-function (start end) "Syntactic keywords for Ruby mode. See `syntax-propertize-function'." - (goto-char start) - (remove-text-properties start end '(ruby-expansion-match-data)) - (ruby-syntax-propertize-heredoc end) - (ruby-syntax-enclosing-percent-literal end) - (funcall - (syntax-propertize-rules - ;; $' $" $` .... are variables. - ;; ?' ?" ?` are ascii codes. - ("\\([?$]\\)[#\"'`]" - (1 (unless (save-excursion - ;; Not within a string. - (nth 3 (syntax-ppss (match-beginning 0)))) - (string-to-syntax "\\")))) - ;; Regular expressions. Start with matching unescaped slash. - ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" - (1 (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) - (when (or - ;; Beginning of a regexp. - (and (null (nth 8 state)) - (save-excursion - (forward-char -1) - (looking-back ruby-syntax-before-regexp-re - (point-at-bol)))) - ;; End of regexp. We don't match the whole - ;; regexp at once because it can have - ;; string interpolation inside, or span - ;; several lines. - (eq ?/ (nth 3 state))) - (string-to-syntax "\"/"))))) - ;; Expression expansions in strings. We're handling them - ;; here, so that the regexp rule never matches inside them. - (ruby-expression-expansion-re - (0 (ignore (ruby-syntax-propertize-expansion)))) - ("^=en\\(d\\)\\_>" (1 "!")) - ("^\\(=\\)begin\\_>" (1 "!")) - ;; Handle here documents. - ((concat ruby-here-doc-beg-re ".*\\(\n\\)") - (7 (unless (ruby-singleton-class-p (match-beginning 0)) - (put-text-property (match-beginning 7) (match-end 7) - 'syntax-table (string-to-syntax "\"")) - (ruby-syntax-propertize-heredoc end)))) - ;; Handle percent literals: %w(), %q{}, etc. - ((concat "\\(?:^\\|[[ \t\n<+(,=]\\)" ruby-percent-literal-beg-re) - (1 (prog1 "|" (ruby-syntax-propertize-percent-literal end))))) - (point) end)) + (let (case-fold-search) + (goto-char start) + (remove-text-properties start end '(ruby-expansion-match-data)) + (ruby-syntax-propertize-heredoc end) + (ruby-syntax-enclosing-percent-literal end) + (funcall + (syntax-propertize-rules + ;; $' $" $` .... are variables. + ;; ?' ?" ?` are ascii codes. + ("\\([?$]\\)[#\"'`]" + (1 (unless (save-excursion + ;; Not within a string. + (nth 3 (syntax-ppss (match-beginning 0)))) + (string-to-syntax "\\")))) + ;; Regular expressions. Start with matching unescaped slash. + ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" + (1 (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) + (when (or + ;; Beginning of a regexp. + (and (null (nth 8 state)) + (save-excursion + (forward-char -1) + (looking-back ruby-syntax-before-regexp-re + (point-at-bol)))) + ;; End of regexp. We don't match the whole + ;; regexp at once because it can have + ;; string interpolation inside, or span + ;; several lines. + (eq ?/ (nth 3 state))) + (string-to-syntax "\"/"))))) + ;; Expression expansions in strings. We're handling them + ;; here, so that the regexp rule never matches inside them. + (ruby-expression-expansion-re + (0 (ignore (ruby-syntax-propertize-expansion)))) + ("^=en\\(d\\)\\_>" (1 "!")) + ("^\\(=\\)begin\\_>" (1 "!")) + ;; Handle here documents. + ((concat ruby-here-doc-beg-re ".*\\(\n\\)") + (7 (unless (ruby-singleton-class-p (match-beginning 0)) + (put-text-property (match-beginning 7) (match-end 7) + 'syntax-table (string-to-syntax "\"")) + (ruby-syntax-propertize-heredoc end)))) + ;; Handle percent literals: %w(), %q{}, etc. + ((concat "\\(?:^\\|[[ \t\n<+(,=]\\)" ruby-percent-literal-beg-re) + (1 (prog1 "|" (ruby-syntax-propertize-percent-literal end))))) + (point) end))) (defun ruby-syntax-propertize-heredoc (limit) (let ((ppss (syntax-ppss)) @@ -1496,9 +1498,10 @@ (defun ruby-syntax-propertize-expansion () ;; Save the match data to a text property, for font-locking later. ;; Set the syntax of all double quotes and backticks to punctuation. - (let ((beg (match-beginning 2)) - (end (match-end 2))) - (when (and beg (save-excursion (nth 3 (syntax-ppss beg)))) + (let* ((beg (match-beginning 2)) + (end (match-end 2)) + (state (and beg (save-excursion (syntax-ppss beg))))) + (when (ruby-syntax-expansion-allowed-p state) (put-text-property beg (1+ beg) 'ruby-expansion-match-data (match-data)) (goto-char beg) @@ -1506,6 +1509,17 @@ (put-text-property (match-beginning 0) (match-end 0) 'syntax-table (string-to-syntax ".")))))) + (defun ruby-syntax-expansion-allowed-p (parse-state) + "Return non-nil if expression expansion is allowed." + (let ((term (nth 3 parse-state))) + (cond + ((memq term '(?\" ?` ?\n))) + ((eq term t) + (save-match-data + (save-excursion + (goto-char (nth 8 parse-state)) + (looking-at "%\\(?:[QWrx]\\|\\W\\)"))))))) + (defun ruby-syntax-propertize-expansions (start end) (save-excursion (goto-char start) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-05-29 06:50:48 +0000 +++ test/ChangeLog 2013-05-31 06:04:33 +0000 @@ -1,3 +1,8 @@ +2013-05-31 Dmitry Gutov + + * automated/ruby-mode-tests.el: New tests, for percent literals + and expression expansion. + 2013-05-29 Leo Liu * indent/octave.m: Tweak. === modified file 'test/automated/ruby-mode-tests.el' --- test/automated/ruby-mode-tests.el 2013-05-19 06:01:23 +0000 +++ test/automated/ruby-mode-tests.el 2013-05-31 06:04:33 +0000 @@ -353,6 +353,23 @@ ;; It's confused by the closing paren in the middle. (ruby-assert-state s 8 nil))) +(ert-deftest ruby-interpolation-inside-double-quoted-percent-literals () + (ruby-assert-face "%Q{foo #@bar}" 8 font-lock-variable-name-face) + (ruby-assert-face "%W{foo #@bar}" 8 font-lock-variable-name-face) + (ruby-assert-face "%r{foo #@bar}" 8 font-lock-variable-name-face) + (ruby-assert-face "%x{foo #@bar}" 8 font-lock-variable-name-face)) + +(ert-deftest ruby-no-interpolation-in-single-quoted-literals () + (ruby-assert-face "'foo #@bar'" 7 font-lock-string-face) + (ruby-assert-face "%q{foo #@bar}" 8 font-lock-string-face) + (ruby-assert-face "%w{foo #@bar}" 8 font-lock-string-face) + (ruby-assert-face "%s{foo #@bar}" 8 font-lock-string-face)) + +(ert-deftest ruby-no-unknown-percent-literals () + ;; No folding of case. + (ruby-assert-face "%S{foo}" 4 nil) + (ruby-assert-face "%R{foo}" 4 nil)) + (ert-deftest ruby-add-log-current-method-examples () (let ((pairs '(("foo" . "#foo") ("C.foo" . ".foo")