Now on revision 112444. ------------------------------------------------------------ revno: 112444 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-03 12:47:08 +0800 message: * progmodes/octave.el (octave-font-lock-keywords): Do not dehighlight 'end' in comments or strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-02 23:03:00 +0000 +++ lisp/ChangeLog 2013-05-03 04:47:08 +0000 @@ -1,3 +1,8 @@ +2013-05-03 Leo Liu + + * progmodes/octave.el (octave-font-lock-keywords): Do not + dehighlight 'end' in comments or strings. + 2013-05-02 Leo Liu * progmodes/octave.el (octave-mode-syntax-table): Correct syntax === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-02 23:03:00 +0000 +++ lisp/progmodes/octave.el 2013-05-03 04:47:08 +0000 @@ -100,30 +100,34 @@ (list ;; Fontify all builtin keywords. (cons (concat "\\_<\\(" - (regexp-opt (append octave-reserved-words + (regexp-opt (append octave-reserved-words octave-text-functions)) - "\\)\\_>") - 'font-lock-keyword-face) + "\\)\\_>") + 'font-lock-keyword-face) ;; Note: 'end' also serves as the last index in an indexing expression. ;; Ref: http://www.mathworks.com/help/matlab/ref/end.html - '("\\_" (0 (save-excursion - (condition-case nil - (progn - (goto-char (match-beginning 0)) - (backward-up-list) - (unless (memq (char-after) '(?\( ?\[ ?\{)) - font-lock-keyword-face)) - (error font-lock-keyword-face))) - t)) + '((lambda (limit) + (while (re-search-forward "\\_" limit 'move) + (let ((beg (match-beginning 0)) + (end (match-end 0))) + (unless (octave-in-string-or-comment-p) + (unwind-protect + (progn + (goto-char beg) + (backward-up-list) + (when (memq (char-after) '(?\( ?\[ ?\{)) + (put-text-property beg end 'face nil))) + (goto-char end))))) + nil)) ;; Fontify all builtin operators. (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)" - (if (boundp 'font-lock-builtin-face) - 'font-lock-builtin-face - 'font-lock-preprocessor-face)) + (if (boundp 'font-lock-builtin-face) + 'font-lock-builtin-face + 'font-lock-preprocessor-face)) ;; Fontify all function declarations. (list octave-function-header-regexp - '(1 font-lock-keyword-face) - '(3 font-lock-function-name-face nil t))) + '(1 font-lock-keyword-face) + '(3 font-lock-function-name-face nil t))) "Additional Octave expressions to highlight.") (defun octave-syntax-propertize-function (start end) ------------------------------------------------------------ revno: 112443 fixes bug: http://debbugs.gnu.org/14332 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-03 07:03:00 +0800 message: * progmodes/octave.el (octave-mode-syntax-table): Correct syntax for \. (octave-font-lock-keywords): Include [ and {. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-02 21:34:53 +0000 +++ lisp/ChangeLog 2013-05-02 23:03:00 +0000 @@ -1,5 +1,11 @@ 2013-05-02 Leo Liu + * progmodes/octave.el (octave-mode-syntax-table): Correct syntax + for \. (bug#14332) + (octave-font-lock-keywords): Include [ and {. + +2013-05-02 Leo Liu + * progmodes/octave.el (inferior-octave-startup-file): Change default. (inferior-octave): Remove calling comint-mode and return the buffer. (inferior-octave-startup): Cosmetic changes. @@ -24,7 +30,7 @@ 2013-05-01 Leo Liu * progmodes/octave.el: Compatible with older emacs-24 releases. - (inferior-octave-has-built-in-variables): Remove. Buil-in + (inferior-octave-has-built-in-variables): Remove. Built-in variables were removed from Octave in 2007. (inferior-octave-startup): Fix uses. (comint-line-beginning-position): Remove compatibility code for === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-02 21:34:53 +0000 +++ lisp/progmodes/octave.el 2013-05-02 23:03:00 +0000 @@ -111,7 +111,7 @@ (progn (goto-char (match-beginning 0)) (backward-up-list) - (unless (eq (char-after) ?\() + (unless (memq (char-after) '(?\( ?\[ ?\{)) font-lock-keyword-face)) (error font-lock-keyword-face))) t)) @@ -233,7 +233,7 @@ (modify-syntax-entry ?& "." table) (modify-syntax-entry ?| "." table) (modify-syntax-entry ?! "." table) - (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) ------------------------------------------------------------ revno: 112442 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-03 05:34:53 +0800 message: * progmodes/octave.el (inferior-octave-startup-file): Change default. (inferior-octave): Remove calling comint-mode and return the buffer. (inferior-octave-startup): Cosmetic changes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-02 21:27:16 +0000 +++ lisp/ChangeLog 2013-05-02 21:34:53 +0000 @@ -1,5 +1,11 @@ 2013-05-02 Leo Liu + * progmodes/octave.el (inferior-octave-startup-file): Change default. + (inferior-octave): Remove calling comint-mode and return the buffer. + (inferior-octave-startup): Cosmetic changes. + +2013-05-02 Leo Liu + * progmodes/octave.el (octave-syntax-propertize-function): Include the case when ' is at line beginning. (Bug#14336) === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-02 21:27:16 +0000 +++ lisp/progmodes/octave.el 2013-05-02 21:34:53 +0000 @@ -553,13 +553,15 @@ :group 'octave :version "24.4") -(defcustom inferior-octave-startup-file nil +(defcustom inferior-octave-startup-file + (convert-standard-filename + (concat "~/.emacs-" (file-name-nondirectory inferior-octave-program))) "Name of the inferior Octave startup file. The contents of this file are sent to the inferior Octave process on startup." - :type '(choice (const :tag "None" nil) - file) - :group 'octave) + :type '(choice (const :tag "None" nil) file) + :group 'octave + :version "24.4") (defcustom inferior-octave-startup-args nil "List of command line arguments for the inferior Octave process. @@ -650,16 +652,14 @@ the file specified by `inferior-octave-startup-file' or by the default startup file, `~/.emacs-octave'." (interactive "P") - (let ((buffer inferior-octave-buffer)) - (get-buffer-create buffer) - (if (comint-check-proc buffer) - () + (let ((buffer (get-buffer-create inferior-octave-buffer))) + (unless (comint-check-proc buffer) (with-current-buffer buffer - (comint-mode) - (inferior-octave-startup) - (inferior-octave-mode))) - (if (not arg) - (pop-to-buffer buffer)))) + (inferior-octave-startup) + (inferior-octave-mode))) + (unless arg + (pop-to-buffer buffer)) + buffer)) ;;;###autoload (defalias 'run-octave 'inferior-octave) @@ -667,17 +667,16 @@ (defun inferior-octave-startup () "Start an inferior Octave process." (let ((proc (comint-exec-1 - (substring inferior-octave-buffer 1 -1) - inferior-octave-buffer - inferior-octave-program - (append (list "-i" "--no-line-editing") - inferior-octave-startup-args)))) + (substring inferior-octave-buffer 1 -1) + inferior-octave-buffer + inferior-octave-program + (append (list "-i" "--no-line-editing") + inferior-octave-startup-args)))) (set-process-filter proc 'inferior-octave-output-digest) - (setq comint-ptyp process-connection-type - inferior-octave-process proc - inferior-octave-output-list nil - inferior-octave-output-string nil - inferior-octave-receive-in-progress t) + (setq inferior-octave-process proc + inferior-octave-output-list nil + inferior-octave-output-string nil + inferior-octave-receive-in-progress t) ;; This may look complicated ... However, we need to make sure that ;; we additional startup code only AFTER Octave is ready (otherwise, @@ -691,35 +690,32 @@ (concat (if (not (bobp)) " \n") (if inferior-octave-output-list - (concat (mapconcat - 'identity inferior-octave-output-list "\n") - "\n")))) + (concat (mapconcat + 'identity inferior-octave-output-list "\n") + "\n")))) ;; An empty secondary prompt, as e.g. obtained by '--braindead', ;; means trouble. (inferior-octave-send-list-and-digest (list "PS2\n")) - (if (string-match "\\(PS2\\|ans\\) = *$" (car inferior-octave-output-list)) - (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) + (when (string-match "\\(PS2\\|ans\\) = *$" + (car inferior-octave-output-list)) + (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) - ;; O.k., now we are ready for the Inferior Octave startup commands. - (let* (commands - (program (file-name-nondirectory inferior-octave-program)) - (file (or inferior-octave-startup-file - (concat "~/.emacs-" program)))) - (setq commands - (list "more off;\n" - (if (not (string-equal - inferior-octave-output-string ">> ")) - "PS1 (\"\\\\s> \");\n") - (if (file-exists-p file) - (format "source (\"%s\");\n" file)))) - (inferior-octave-send-list-and-digest commands)) + ;; O.K., now we are ready for the Inferior Octave startup commands. + (inferior-octave-send-list-and-digest + (list "more off;\n" + (unless (equal inferior-octave-output-string ">> ") + "PS1 (\"\\\\s> \");\n") + (when (and inferior-octave-startup-file + (file-exists-p inferior-octave-startup-file)) + (format "source (\"%s\");\n" inferior-octave-startup-file)))) + ;; XXX: the first prompt is incorrectly highlighted (insert-before-markers (concat (if inferior-octave-output-list - (concat (mapconcat - 'identity inferior-octave-output-list "\n") - "\n")) + (concat (mapconcat + 'identity inferior-octave-output-list "\n") + "\n")) inferior-octave-output-string)) ;; And finally, everything is back to normal. ------------------------------------------------------------ revno: 112441 fixes bug: http://debbugs.gnu.org/14336 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-03 05:27:16 +0800 message: * progmodes/octave.el (octave-syntax-propertize-function): Include the case when ' is at line beginning. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-02 17:47:39 +0000 +++ lisp/ChangeLog 2013-05-02 21:27:16 +0000 @@ -1,3 +1,8 @@ +2013-05-02 Leo Liu + + * progmodes/octave.el (octave-syntax-propertize-function): Include + the case when ' is at line beginning. (Bug#14336) + 2013-05-02 Glenn Morris * vc/vc-dir.el (vc-dir-mode): Don't autoload it for everyone. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-01 17:25:03 +0000 +++ lisp/progmodes/octave.el 2013-05-02 21:27:16 +0000 @@ -131,7 +131,7 @@ (octave-syntax-propertize-sqs end) (funcall (syntax-propertize-rules ;; Try to distinguish the string-quotes from the transpose-quotes. - ("[[({,; ]\\('\\)" + ("\\(?:^\\|[[({,; ]\\)\\('\\)" (1 (prog1 "\"'" (octave-syntax-propertize-sqs end))))) (point) end)) ------------------------------------------------------------ revno: 112440 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-02 13:47:39 -0400 message: * lisp/vc/vc-dir.el (vc-dir-mode): Don't autoload it for everyone. * lisp/desktop.el (vc-dir-mode): Just autoload it here. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-02 11:18:18 +0000 +++ lisp/ChangeLog 2013-05-02 17:47:39 +0000 @@ -1,3 +1,8 @@ +2013-05-02 Glenn Morris + + * vc/vc-dir.el (vc-dir-mode): Don't autoload it for everyone. + * desktop.el (vc-dir-mode): Just autoload it here. + 2013-05-02 Alan Mackenzie Eliminate variable c-standard-font-lock-fontify-region-function. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-04-27 20:55:00 +0000 +++ lisp/desktop.el 2013-05-02 17:47:39 +0000 @@ -1374,6 +1374,9 @@ (desktop-auto-save-set-timer) (setq inhibit-startup-screen t)))) +;; So we can restore vc-dir buffers. +(autoload 'vc-dir-mode "vc-dir" nil t) + (provide 'desktop) ;;; desktop.el ends here === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/vc-dir.el 2013-05-02 17:47:39 +0000 @@ -930,8 +930,6 @@ (defvar use-vc-backend) ;; dynamically bound -;; Autoload cookie needed by desktop.el. -;;;###autoload (define-derived-mode vc-dir-mode special-mode "VC dir" "Major mode for VC directory buffers. Marking/Unmarking key bindings and actions: ------------------------------------------------------------ revno: 112439 committer: Alan Mackenzie branch nick: trunk timestamp: Thu 2013-05-02 11:18:18 +0000 message: Eliminate variable c-standard-font-lock-fontify-region-function. * progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function): Remove. (c-font-lock-fontify-region, c-after-font-lock-init): Adapt. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-01 17:25:03 +0000 +++ lisp/ChangeLog 2013-05-02 11:18:18 +0000 @@ -1,3 +1,10 @@ +2013-05-02 Alan Mackenzie + + Eliminate variable c-standard-font-lock-fontify-region-function. + * progmodes/cc-mode.el + (c-standard-font-lock-fontify-region-function): Remove. + (c-font-lock-fontify-region, c-after-font-lock-init): Adapt. + 2013-05-01 Leo Liu * progmodes/octave.el: Compatible with older emacs-24 releases. === modified file 'lisp/progmodes/cc-mode.el' --- lisp/progmodes/cc-mode.el 2013-04-15 16:10:24 +0000 +++ lisp/progmodes/cc-mode.el 2013-05-02 11:18:18 +0000 @@ -1160,9 +1160,6 @@ ;; `c-set-fl-decl-start' for the detailed functionality. (cons (c-set-fl-decl-start beg) end)) -(defvar c-standard-font-lock-fontify-region-function nil - "Standard value of `font-lock-fontify-region-function'") - (defun c-font-lock-fontify-region (beg end &optional verbose) ;; Effectively advice around `font-lock-fontify-region' which extends the ;; region (BEG END), for example, to avoid context fontification chopping @@ -1187,17 +1184,14 @@ (setq new-region (funcall fn new-beg new-end)) (setq new-beg (car new-region) new-end (cdr new-region))) c-before-context-fontification-functions)))) - (funcall c-standard-font-lock-fontify-region-function + (funcall (default-value 'font-lock-fontify-region-function) new-beg new-end verbose))) (defun c-after-font-lock-init () ;; Put on `font-lock-mode-hook'. This function ensures our after-change - ;; function will get executed before the font-lock one. Amongst other - ;; things. + ;; function will get executed before the font-lock one. (remove-hook 'after-change-functions 'c-after-change t) - (add-hook 'after-change-functions 'c-after-change nil t) - (setq c-standard-font-lock-fontify-region-function - (default-value 'font-lock-fontify-region-function))) + (add-hook 'after-change-functions 'c-after-change nil t)) (defun c-font-lock-init () "Set up the font-lock variables for using the font-lock support in CC Mode. ------------------------------------------------------------ revno: 112438 committer: Paul Eggert branch nick: trunk timestamp: Wed 2013-05-01 12:28:41 -0700 message: * make-dist: Keep necessary restrictions on file access. diff: === modified file 'ChangeLog' --- ChangeLog 2013-04-29 04:48:30 +0000 +++ ChangeLog 2013-05-01 19:28:41 +0000 @@ -1,3 +1,7 @@ +2013-05-01 Paul Eggert + + * make-dist: Keep necessary restrictions on file access. + 2013-04-29 Paul Eggert Merge from gnulib, incorporating: === modified file 'make-dist' --- make-dist 2013-04-22 05:08:36 +0000 +++ make-dist 2013-05-01 19:28:41 +0000 @@ -42,8 +42,8 @@ LANG= export LANGUAGE LC_ALL LC_MESSAGES LANG -## Don't restrict access to any files. -umask 0 +## Remove unnecessary restrictions on file access. +umask 022 update=yes check=yes