Now on revision 112416. ------------------------------------------------------------ revno: 112416 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2013-04-27 23:57:29 +0000 message: lisp/gnus/sieve-manage.el (sieve-manage-authenticator-alist): Update the sieve port to "sieve" now that it has an official IANA port assigned diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-04-27 21:32:17 +0000 +++ lisp/gnus/ChangeLog 2013-04-27 23:57:29 +0000 @@ -3,6 +3,11 @@ * gnus.el (gnus-list-debbugs): Use require rather than autoload. (Bug#14262) +2013-04-27 Julien Danjou + + * sieve-manage.el (sieve-manage-authenticator-alist): Update the sieve + port to "sieve" now that it has an official IANA port assigned. + 2013-04-26 Katsumi Yamaoka * mail-source.el (mail-source-fetch-pop, mail-source-check-pop): === modified file 'lisp/gnus/sieve-manage.el' --- lisp/gnus/sieve-manage.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/sieve-manage.el 2013-04-27 23:57:29 +0000 @@ -149,9 +149,10 @@ for doing the actual authentication." :group 'sieve-manage) -(defcustom sieve-manage-default-port 2000 +(defcustom sieve-manage-default-port "sieve" "Default port number or service name for managesieve protocol." - :type 'integer + :type '(choice integer string) + :version "24.4" :group 'sieve-manage) (defcustom sieve-manage-default-stream 'network ------------------------------------------------------------ revno: 112415 fixes bug: http://debbugs.gnu.org/14268 author: Darren Hoo committer: Juri Linkov branch nick: trunk timestamp: Sun 2013-04-28 01:03:42 +0300 message: * lisp/isearch.el (isearch-fail-pos): Check for empty `cmds'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 21:29:00 +0000 +++ lisp/ChangeLog 2013-04-27 22:03:42 +0000 @@ -1,3 +1,7 @@ +2013-04-27 Darren Hoo (tiny change) + + * isearch.el (isearch-fail-pos): Check for empty `cmds'. (Bug#14268) + 2013-04-27 Glenn Morris * vc/log-view.el (log-view-current-entry): === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-02-22 17:13:05 +0000 +++ lisp/isearch.el 2013-04-27 22:03:42 +0000 @@ -1106,8 +1106,9 @@ (curr-msg (if msg isearch-message isearch-string)) succ-msg) (when (or (not isearch-success) isearch-error) - (while (or (not (isearch--state-success (car cmds))) - (isearch--state-error (car cmds))) + (while (and cmds + (or (not (isearch--state-success (car cmds))) + (isearch--state-error (car cmds)))) (pop cmds)) (setq succ-msg (and cmds (if msg (isearch--state-message (car cmds)) (isearch--state-string (car cmds))))) ------------------------------------------------------------ revno: 112414 committer: David Engster branch nick: trunk timestamp: Sat 2013-04-27 23:45:37 +0200 message: * lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions-raw): If `completionslist' is not set, refresh the cache if necessary and use it for completions. This fixes the `semantic-collector-buffer-deep' collector (bug#14265). diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-03-26 02:49:05 +0000 +++ lisp/cedet/ChangeLog 2013-04-27 21:45:37 +0000 @@ -1,3 +1,11 @@ +2013-04-27 David Engster + + * semantic/complete.el + (semantic-collector-calculate-completions-raw): If + `completionslist' is not set, refresh the cache if necessary and + use it for completions. This fixes the + `semantic-collector-buffer-deep' collector (bug#14265). + 2013-03-26 Leo Liu * semantic/senator.el (senator-copy-tag-to-register): Move === modified file 'lisp/cedet/semantic/complete.el' --- lisp/cedet/semantic/complete.el 2013-03-21 22:11:03 +0000 +++ lisp/cedet/semantic/complete.el 2013-04-27 21:45:37 +0000 @@ -988,14 +988,17 @@ "Calculate the completions for prefix from completionlist. Output must be in semanticdb Find result format." ;; Must output in semanticdb format + (unless completionlist + (setq completionlist + (or (oref obj cache) + (semantic-collector-calculate-cache obj)))) (let ((table (with-current-buffer (oref obj buffer) semanticdb-current-table)) (result (semantic-find-tags-for-completion prefix ;; To do this kind of search with a pre-built completion ;; list, we need to strip it first. - (semanticdb-strip-find-results completionlist))) - ) + (semanticdb-strip-find-results completionlist)))) (if result (list (cons table result))))) ------------------------------------------------------------ revno: 112413 fixes bug: http://debbugs.gnu.org/14262 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-04-27 14:32:17 -0700 message: * gnus/gnus.el (gnus-list-debbugs): Use require rather than autoload. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-04-26 10:22:07 +0000 +++ lisp/gnus/ChangeLog 2013-04-27 21:32:17 +0000 @@ -1,3 +1,8 @@ +2013-04-27 Glenn Morris + + * gnus.el (gnus-list-debbugs): + Use require rather than autoload. (Bug#14262) + 2013-04-26 Katsumi Yamaoka * mail-source.el (mail-source-fetch-pop, mail-source-check-pop): === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus.el 2013-04-27 21:32:17 +0000 @@ -4433,12 +4433,13 @@ (gnus-1 arg dont-connect slave) (gnus-final-warning))) -(eval-and-compile - (unless (fboundp 'debbugs-gnu) - (autoload 'debbugs-gnu "debbugs-gnu" "List all outstanding Emacs bugs." t))) +(declare-function debbugs-gnu "ext:debbugs-gnu" + (severities &optional packages archivedp suppress tags)) + (defun gnus-list-debbugs () "List all open Gnus bug reports." (interactive) + (require 'debbugs-gnu) (debbugs-gnu nil "gnus")) ;; Allow redefinition of Gnus functions. ------------------------------------------------------------ revno: 112412 fixes bug: http://debbugs.gnu.org/14169 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-04-27 14:29:00 -0700 message: * vc/log-view.el (log-view-current-entry): Treat "---" separator lines as part of the following rev. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 21:12:17 +0000 +++ lisp/ChangeLog 2013-04-27 21:29:00 +0000 @@ -1,3 +1,8 @@ +2013-04-27 Glenn Morris + + * vc/log-view.el (log-view-current-entry): + Treat "---" separator lines as part of the following rev. (Bug#14169) + 2013-04-27 Juri Linkov * subr.el (read-number): Doc fix about using it by interactive === modified file 'lisp/vc/log-view.el' --- lisp/vc/log-view.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/log-view.el 2013-04-27 21:29:00 +0000 @@ -317,7 +317,9 @@ result) (save-excursion (when pos (goto-char pos)) - (forward-line 1) + (forward-line 0) + ;; Treat "---" separator lines as part of the following revision. + (forward-line (if (looking-at "-\\{20,\\}$") 2 1)) (while looping (setq pos (re-search-backward log-view-message-re nil 'move) looping (and pos (log-view-inside-comment-p (point))))) ------------------------------------------------------------ revno: 112411 fixes bug: http://debbugs.gnu.org/14254 committer: Juri Linkov branch nick: trunk timestamp: Sun 2013-04-28 00:12:17 +0300 message: * src/callint.c (Fcall_interactively): Call `Qread_number' for interactive code letter `n' instead of using duplicate code. * lisp/subr.el (read-number): Doc fix about using it by interactive code letter `n'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 20:55:00 +0000 +++ lisp/ChangeLog 2013-04-27 21:12:17 +0000 @@ -1,5 +1,10 @@ 2013-04-27 Juri Linkov + * subr.el (read-number): Doc fix about using it by interactive + code letter `n'. (Bug#14254) + +2013-04-27 Juri Linkov + * desktop.el (desktop-auto-save-timeout): New option. (desktop-file-checksum): New variable. (desktop-save): Add optional arg `auto-save' and don't auto-save === modified file 'lisp/subr.el' --- lisp/subr.el 2013-04-26 07:34:54 +0000 +++ lisp/subr.el 2013-04-27 21:12:17 +0000 @@ -2200,11 +2200,11 @@ ;; And of course, don't keep the sensitive data around. (erase-buffer)))))))) -;; This should be used by `call-interactively' for `n' specs. (defun read-number (prompt &optional default) "Read a numeric value in the minibuffer, prompting with PROMPT. DEFAULT specifies a default value to return if the user just types RET. -The value of DEFAULT is inserted into PROMPT." +The value of DEFAULT is inserted into PROMPT. +This function is used by the `interactive' code letter `n'." (let ((n nil) (default1 (if (consp default) (car default) default))) (when default1 === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-27 15:34:28 +0000 +++ src/ChangeLog 2013-04-27 21:12:17 +0000 @@ -1,3 +1,9 @@ +2013-04-27 Juri Linkov + + * callint.c (Fcall_interactively): Call `Qread_number' for + interactive code letter `n' instead of using duplicate code. + (Bug#14254) + 2013-04-27 Paul Eggert * systime.h (make_timeval): Declare as 'const'. === modified file 'src/callint.c' --- src/callint.c 2013-02-27 07:42:43 +0000 +++ src/callint.c 2013-04-27 21:12:17 +0000 @@ -34,6 +34,7 @@ static Lisp_Object Qenable_recursive_minibuffers; static Lisp_Object Qhandle_shift_selection; +static Lisp_Object Qread_number; Lisp_Object Qmouse_leave_buffer_hook; @@ -683,29 +684,7 @@ if (!NILP (prefix_arg)) goto have_prefix_arg; case 'n': /* Read number from minibuffer. */ - { - bool first = 1; - do - { - Lisp_Object str; - if (! first) - { - message1 ("Please enter a number."); - sit_for (make_number (1), 0, 0); - } - first = 0; - - str = Fread_from_minibuffer (callint_message, - Qnil, Qnil, Qnil, Qnil, Qnil, - Qnil); - if (! STRINGP (str) || SCHARS (str) == 0) - args[i] = Qnil; - else - args[i] = Fread (str); - } - while (! NUMBERP (args[i])); - } - visargs[i] = args[i]; + args[i] = call1 (Qread_number, callint_message); break; case 'P': /* Prefix arg in raw form. Does no I/O. */ @@ -903,6 +882,7 @@ DEFSYM (Qminus, "-"); DEFSYM (Qplus, "+"); DEFSYM (Qhandle_shift_selection, "handle-shift-selection"); + DEFSYM (Qread_number, "read-number"); DEFSYM (Qcall_interactively, "call-interactively"); DEFSYM (Qcommand_debug_status, "command-debug-status"); DEFSYM (Qenable_recursive_minibuffers, "enable-recursive-minibuffers"); ------------------------------------------------------------ revno: 112410 committer: Juri Linkov branch nick: trunk timestamp: Sat 2013-04-27 23:55:00 +0300 message: * lisp/desktop.el (desktop-auto-save-timeout): New option. (desktop-file-checksum): New variable. (desktop-save): Add optional arg `auto-save' and don't auto-save if nothing changed. (desktop-auto-save-timer): New variable. (desktop-auto-save, desktop-auto-save-set-timer): New functions. (after-init-hook): Call `desktop-auto-save-set-timer'. Suggested by Reuben Thomas in . diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-04-25 17:39:44 +0000 +++ etc/NEWS 2013-04-27 20:55:00 +0000 @@ -169,6 +169,11 @@ *** Support for ISO 8601 dates. +** Desktop + +*** `desktop-auto-save-timeout' defines the number of seconds between +auto-saves of the desktop. + ** Dired *** New minor mode `dired-hide-details-mode' hides details. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 17:07:01 +0000 +++ lisp/ChangeLog 2013-04-27 20:55:00 +0000 @@ -1,3 +1,15 @@ +2013-04-27 Juri Linkov + + * desktop.el (desktop-auto-save-timeout): New option. + (desktop-file-checksum): New variable. + (desktop-save): Add optional arg `auto-save' and don't auto-save + if nothing changed. + (desktop-auto-save-timer): New variable. + (desktop-auto-save, desktop-auto-save-set-timer): New functions. + (after-init-hook): Call `desktop-auto-save-set-timer'. + Suggested by Reuben Thomas in + . + 2013-04-27 Leo Liu * progmodes/octave.el (octave-function-file-p) @@ -160,7 +172,7 @@ (opascal-parse-next-literal, opascal-debug-unparse-buffer): Adjust callers. -2013-04-24 Reuben Thomas +2013-04-24 Reuben Thomas * textmodes/remember.el (remember-handler-functions): Add an option for a new handler `remember-store-in-files'. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-03-26 03:38:18 +0000 +++ lisp/desktop.el 2013-04-27 20:55:00 +0000 @@ -189,6 +189,19 @@ :group 'desktop :version "22.1") +(defcustom desktop-auto-save-timeout nil + "Number of seconds between auto-saves of the desktop. +Zero or nil means disable timer-based auto-saving." + :type '(choice (const :tag "Off" nil) + (integer :tag "Seconds")) + :set (lambda (symbol value) + (set-default symbol value) + (condition-case nil + (desktop-auto-save-set-timer) + (error nil))) + :group 'desktop + :version "24.4") + (defcustom desktop-load-locked-desktop 'ask "Specifies whether the desktop should be loaded if locked. Possible values are: @@ -539,6 +552,10 @@ (defvar desktop-delay-hook nil "Hooks run after all buffers are loaded; intended for internal use.") +(defvar desktop-file-checksum nil + "Checksum of the last auto-saved contents of the desktop file. +Used to avoid writing contents unchanged between auto-saves.") + ;; ---------------------------------------------------------------------------- ;; Desktop file conflict detection (defvar desktop-file-modtime nil @@ -842,11 +859,12 @@ ;; ---------------------------------------------------------------------------- ;;;###autoload -(defun desktop-save (dirname &optional release) +(defun desktop-save (dirname &optional release auto-save) "Save the desktop in a desktop file. Parameter DIRNAME specifies where to save the desktop file. Optional parameter RELEASE says whether we're done with this desktop. -See also `desktop-base-file-name'." +If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, +and don't save the buffer if they are the same." (interactive "DDirectory to save desktop file in: ") (setq desktop-dirname (file-name-as-directory (expand-file-name dirname))) (save-excursion @@ -906,10 +924,17 @@ (insert ")\n\n")))) (setq default-directory desktop-dirname) - (let ((coding-system-for-write 'emacs-mule)) - (write-region (point-min) (point-max) (desktop-full-file-name) nil 'nomessage)) - ;; We remember when it was modified (which is presumably just now). - (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))))))) + ;; If auto-saving, avoid writing if nothing has changed since the last write. + ;; Don't check 300 characters of the header that contains the timestamp. + (let ((checksum (and auto-save (md5 (current-buffer) + (+ (point-min) 300) (point-max) + 'emacs-mule)))) + (unless (and auto-save (equal checksum desktop-file-checksum)) + (let ((coding-system-for-write 'emacs-mule)) + (write-region (point-min) (point-max) (desktop-full-file-name) nil 'nomessage)) + (setq desktop-file-checksum checksum) + ;; We remember when it was modified (which is presumably just now). + (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))))))))) ;; ---------------------------------------------------------------------------- ;;;###autoload @@ -1063,6 +1088,37 @@ (message "Desktop saved in %s" (abbreviate-file-name desktop-dirname))) ;; ---------------------------------------------------------------------------- +;; Auto-Saving. +(defvar desktop-auto-save-timer nil) + +(defun desktop-auto-save () + "Save the desktop periodically. +Called by the timer created in `desktop-auto-save-set-timer'." + (when (and desktop-save-mode + (integerp desktop-auto-save-timeout) + (> desktop-auto-save-timeout 0) + ;; Avoid desktop saving during lazy loading. + (not desktop-lazy-timer) + ;; Save only to own desktop file. + (eq (emacs-pid) (desktop-owner)) + desktop-dirname) + (desktop-save desktop-dirname nil t)) + (desktop-auto-save-set-timer)) + +(defun desktop-auto-save-set-timer () + "Reset the auto-save timer. +Cancel any previous timer. When `desktop-auto-save-timeout' is a positive +integer, start a new timer to call `desktop-auto-save' in that many seconds." + (when desktop-auto-save-timer + (cancel-timer desktop-auto-save-timer) + (setq desktop-auto-save-timer nil)) + (when (and (integerp desktop-auto-save-timeout) + (> desktop-auto-save-timeout 0)) + (setq desktop-auto-save-timer + (run-with-timer desktop-auto-save-timeout nil + 'desktop-auto-save)))) + +;; ---------------------------------------------------------------------------- ;;;###autoload (defun desktop-revert () "Revert to the last loaded desktop." @@ -1315,6 +1371,7 @@ (setq desktop-save-mode nil))) (when desktop-save-mode (desktop-read) + (desktop-auto-save-set-timer) (setq inhibit-startup-screen t)))) (provide 'desktop) ------------------------------------------------------------ revno: 112409 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-04-27 12:30:33 -0700 message: Merge from gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2013-04-26 19:31:09 +0000 +++ ChangeLog 2013-04-27 19:30:33 +0000 @@ -1,3 +1,8 @@ +2013-04-27 Paul Eggert + + Merge from gnulib, incorporating: + 2013-04-27 alignof, intprops, malloca: port better to IBM's C compiler + 2013-04-26 Paul Eggert Port better to AIX (Bug#14258). === modified file 'lib/intprops.h' --- lib/intprops.h 2013-01-01 09:11:05 +0000 +++ lib/intprops.h 2013-04-27 19:30:33 +0000 @@ -89,7 +89,7 @@ /* Return 1 if the __typeof__ keyword works. This could be done by 'configure', but for now it's easier to do it by hand. */ -#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C +#if 2 <= __GNUC__ || defined __IBM__TYPEOF__ || 0x5110 <= __SUNPRO_C # define _GL_HAVE___TYPEOF__ 1 #else # define _GL_HAVE___TYPEOF__ 0 ------------------------------------------------------------ revno: 112408 fixes bug: http://debbugs.gnu.org/14285 committer: Leo Liu branch nick: trunk timestamp: Sun 2013-04-28 01:07:01 +0800 message: * files.el (basic-save-buffer): Don't let errors in before-save-hook prevent saving buffer. * progmodes/octave.el (octave-function-file-p) (octave-skip-comment-forward, octave-function-file-comment) (octave-update-function-file-comment): New functions. (octave-mode-map): Bind C-c ; to octave-update-function-file-comment. (octave-mode-menu): Add octave-update-function-file-comment. (octave-mode, inferior-octave-mode): Fix doc-string. (octave-insert-defun): Conform to Octave's coding convention. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 17:01:17 +0000 +++ lisp/ChangeLog 2013-04-27 17:07:01 +0000 @@ -1,3 +1,18 @@ +2013-04-27 Leo Liu + + * progmodes/octave.el (octave-function-file-p) + (octave-skip-comment-forward, octave-function-file-comment) + (octave-update-function-file-comment): New functions. + (octave-mode-map): Bind C-c ; to + octave-update-function-file-comment. + (octave-mode-menu): Add octave-update-function-file-comment. + (octave-mode, inferior-octave-mode): Fix doc-string. + (octave-insert-defun): Conform to Octave's coding convention. + (Bug#14285) + + * files.el (basic-save-buffer): Don't let errors in + before-save-hook prevent saving buffer. + 2013-04-20 Roland Winkler * faces.el (read-face-name): Use completing-read if arg multiple === modified file 'lisp/files.el' --- lisp/files.el 2013-04-18 06:24:10 +0000 +++ lisp/files.el 2013-04-27 17:07:01 +0000 @@ -4617,7 +4617,8 @@ (insert ?\n)))) ;; Support VC version backups. (vc-before-save) - (run-hooks 'before-save-hook) + ;; Don't let errors prevent saving the buffer. + (with-demoted-errors (run-hooks 'before-save-hook)) (or (run-hook-with-args-until-success 'write-contents-functions) (run-hook-with-args-until-success 'local-write-file-hooks) (run-hook-with-args-until-success 'write-file-functions) === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-04-26 17:11:04 +0000 +++ lisp/progmodes/octave.el 2013-04-27 17:07:01 +0000 @@ -198,7 +198,6 @@ (define-key map "`" 'octave-abbrev-start) (define-key map "\e\n" 'octave-indent-new-comment-line) (define-key map "\M-\C-q" 'octave-indent-defun) - (define-key map "\C-c\C-b" 'octave-submit-bug-report) (define-key map "\C-c\C-p" 'octave-previous-code-line) (define-key map "\C-c\C-n" 'octave-next-code-line) (define-key map "\C-c\C-a" 'octave-beginning-of-line) @@ -207,6 +206,7 @@ (define-key map "\C-c\M-\C-h" 'octave-mark-block) (define-key map "\C-c]" 'smie-close-block) (define-key map "\C-c/" 'smie-close-block) + (define-key map "\C-c;" 'octave-update-function-file-comment) (define-key map "\C-c\C-f" 'octave-insert-defun) (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) @@ -241,7 +241,8 @@ ["Close Block" smie-close-block t]) ("Functions" ["Indent Function" octave-indent-defun t] - ["Insert Function" octave-insert-defun t]) + ["Insert Function" octave-insert-defun t] + ["Update function file comment" octave-update-function-file-comment t]) "-" ("Debug" ["Send Current Line" octave-send-line t] @@ -260,10 +261,11 @@ ["Toggle Auto-Fill Mode" auto-fill-mode :style toggle :selected auto-fill-function] "-" - ["Submit Bug Report" octave-submit-bug-report t] - "-" ["Describe Octave Mode" describe-mode t] - ["Lookup Octave Index" info-lookup-symbol t])) + ["Lookup Octave Index" info-lookup-symbol t] + ["Customize Octave" (customize-group 'octave) t] + "-" + ["Submit Bug Report" report-emacs-bug t])) (defvar octave-mode-syntax-table (let ((table (make-syntax-table))) @@ -508,78 +510,10 @@ (define-derived-mode octave-mode prog-mode "Octave" "Major mode for editing Octave code. -This mode makes it easier to write Octave code by helping with -indentation, doing some of the typing for you (with Abbrev mode) and by -showing keywords, comments, strings, etc. in different faces (with -Font Lock mode on terminals that support it). - -Octave itself is a high-level language, primarily intended for numerical -computations. It provides a convenient command line interface for -solving linear and nonlinear problems numerically. Function definitions -can also be stored in files, and it can be used in a batch mode (which -is why you need this mode!). - -The latest released version of Octave is always available via anonymous -ftp from ftp.octave.org in the directory `/pub/octave'. Complete -source and binaries for several popular systems are available. - -Type \\[list-abbrevs] to display the built-in abbrevs for Octave keywords. - -Keybindings -=========== - -\\{octave-mode-map} - -Variables you can use to customize Octave mode -============================================== - -`octave-blink-matching-block' - Non-nil means show matching begin of block when inserting a space, - newline or semicolon after an else or end keyword. Default is t. - -`octave-block-offset' - Extra indentation applied to statements in block structures. - Default is 2. - -`octave-continuation-offset' - Extra indentation applied to Octave continuation lines. - Default is 4. - -`octave-continuation-string' - String used for Octave continuation lines. - Default is a backslash. - -`octave-send-echo-input' - Non-nil means always display `inferior-octave-buffer' after sending a - command to the inferior Octave process. - -`octave-send-line-auto-forward' - Non-nil means always go to the next unsent line of Octave code after - sending a line to the inferior Octave process. - -`octave-send-echo-input' - Non-nil means echo input sent to the inferior Octave process. - -Turning on Octave mode runs the hook `octave-mode-hook'. - -To begin using this mode for all `.m' files that you edit, add the -following lines to your init file: - - (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) - -To automatically turn on the abbrev and auto-fill features, -add the following lines to your init file as well: - - (add-hook 'octave-mode-hook - (lambda () - (abbrev-mode 1) - (auto-fill-mode 1))) - -To submit a problem report, enter \\[octave-submit-bug-report] from \ -an Octave mode buffer. -This automatically sets up a mail buffer with version information -already added. You just need to add a description of the problem, -including a reproducible test case and send the message." +Octave is a high-level language, primarily intended for numerical +computations. It provides a convenient command line interface +for solving linear and nonlinear problems numerically. Function +definitions can also be stored in files and used in batch mode." (setq local-abbrev-table octave-abbrev-table) (smie-setup octave-smie-grammar #'octave-smie-rules @@ -724,12 +658,7 @@ (defvar info-lookup-mode) (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" - "Major mode for interacting with an inferior Octave process. -Runs Octave as a subprocess of Emacs, with Octave I/O through an Emacs -buffer. - -Entry to this mode successively runs the hooks `comint-mode-hook' and -`inferior-octave-mode-hook'." + "Major mode for interacting with an inferior Octave process." (setq comint-prompt-regexp inferior-octave-prompt mode-line-process '(":%s") local-abbrev-table octave-abbrev-table) @@ -1010,25 +939,105 @@ (delete-horizontal-space) (insert (concat " " octave-continuation-string)))) +(defun octave-function-file-p () + "Return non-nil if the first token is \"function\". +The value is (START END NAME-START NAME-END) of the function." + (save-excursion + (goto-char (point-min)) + (when (equal (funcall smie-forward-token-function) "function") + (forward-word -1) + (let* ((start (point)) + (end (progn (forward-sexp 1) (point))) + (name (when (progn + (goto-char start) + (re-search-forward octave-function-header-regexp + end t)) + (list (match-beginning 3) (match-end 3))))) + (cons start (cons end name)))))) + +;; Like forward-comment but stop at non-comment blank +(defun octave-skip-comment-forward (limit) + (let ((ppss (syntax-ppss))) + (if (nth 4 ppss) + (goto-char (nth 8 ppss)) + (goto-char (or (comment-search-forward limit t) (point))))) + (while (and (< (point) limit) (looking-at-p "\\s<")) + (forward-comment 1))) + +;;; First non-copyright comment block +(defun octave-function-file-comment () + "Beginnning and end positions of the function file comment." + (save-excursion + (goto-char (point-min)) + (let ((bound (progn (forward-comment (point-max)) (point)))) + (goto-char (point-min)) + ;; Copyright block: octave/libinterp/parse-tree/lex.ll around line 1634 + (when (save-excursion + (comment-search-forward bound t) + (when (eq (char-after) ?\{) ; case of block comment + (forward-char 1)) + (skip-syntax-forward "-") + (let ((case-fold-search t)) + (looking-at-p "\\(?:copyright\\|author\\)\\_>"))) + (octave-skip-comment-forward bound)) + (let ((beg (comment-search-forward bound t))) + (when beg + (goto-char beg) + (octave-skip-comment-forward bound) + (list beg (point))))))) + (defun octave-sync-function-file-names () "Ensure function name agree with function file name. See Info node `(octave)Function Files'." (interactive) + (when buffer-file-name + (pcase-let ((`(,start ,_end ,name-start ,name-end) + (octave-function-file-p))) + (when (and start name-start) + (let ((func (buffer-substring name-start name-end)) + (file (file-name-sans-extension + (file-name-nondirectory buffer-file-name)))) + (save-excursion + (when (and (not (equal file func)) + (progn + (goto-char name-start) + (yes-or-no-p + "Function name different from file name. Fix? "))) + (delete-region name-start name-end) + (insert file)))))))) + +(defun octave-update-function-file-comment (beg end) + "Query replace function names in function file comment." + (interactive + (progn + (barf-if-buffer-read-only) + (if (use-region-p) + (list (region-beginning) (region-end)) + (or (octave-function-file-comment) + (error "No function file comment found"))))) (save-excursion - (when (and buffer-file-name - (prog2 - (goto-char (point-min)) - (equal (funcall smie-forward-token-function) "function") - (forward-word -1))) - (let ((file (file-name-sans-extension - (file-name-nondirectory buffer-file-name))) - (func (and (re-search-forward octave-function-header-regexp nil t) - (match-string 3)))) - (when (and func - (not (equal file func)) - (yes-or-no-p - "Function name different from file name. Fix? ")) - (replace-match file nil nil nil 3)))))) + (let* ((bounds (or (octave-function-file-p) + (error "Not in a function file buffer"))) + (func (if (cddr bounds) + (apply #'buffer-substring (cddr bounds)) + (error "Function name not found"))) + (old-func (progn + (goto-char beg) + (when (and (re-search-forward + "usage:\\|@deftypefn" end t) + (re-search-forward + "[=}]\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" + (line-end-position) t)) + (match-string 1)))) + (old-func (read-string (format (if old-func + "Name to replace (default %s): " + "Name to replace: ") + old-func) + nil nil old-func))) + (if (and func old-func (not (equal func old-func))) + (perform-replace old-func func 'query + nil 'delimited nil nil beg end) + (message "Function names match"))))) ;;; Indentation @@ -1356,10 +1365,11 @@ (t (concat vals " = "))) name args)) - \n "function " > str \n \n - octave-block-comment-start "usage: " str \n - octave-block-comment-start \n octave-block-comment-start - \n _ \n + \n octave-block-comment-start "usage: " str \n + octave-block-comment-start '(delete-horizontal-space) \n + octave-block-comment-start '(delete-horizontal-space) \n + "function " > str \n + _ \n "endfunction" > \n) ;;; Communication with the inferior Octave process ------------------------------------------------------------ revno: 112407 committer: Roland Winkler branch nick: trunk timestamp: Sat 2013-04-27 12:01:17 -0500 message: read-face-name: Use completing-read if arg multiple is nil diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 16:55:29 +0000 +++ lisp/ChangeLog 2013-04-27 17:01:17 +0000 @@ -1,3 +1,8 @@ +2013-04-20 Roland Winkler + + * faces.el (read-face-name): Use completing-read if arg multiple + is nil. + 2013-04-27 Ingo Lohmar (tiny change) * ls-lisp.el (ls-lisp-insert-directory): If no files are === modified file 'lisp/faces.el' --- lisp/faces.el 2013-04-20 17:33:52 +0000 +++ lisp/faces.el 2013-04-27 17:01:17 +0000 @@ -938,19 +938,14 @@ PROMPT should not end in a space or a colon. Return DEFAULT if the user enters the empty string. -If DEFAULT is non-nil, it should be a list of face names (symbols or strings). -In that case, return the `car' of DEFAULT (if MULTIPLE is non-nil), -or DEFAULT (if MULTIPLE is nil). See below for the meaning of MULTIPLE. -DEFAULT can also be a single face. - -This function uses `completing-read-multiple' with \"[ \\t]*,[ \\t]*\" -as the separator regexp. Thus, the user may enter multiple face names, -separated by commas. - -MULTIPLE specifies the form of the return value. If MULTIPLE is non-nil, -return a list of face names; if the user entered just one face name, -return a list of one face name. Otherwise, return a single face name; -if the user entered more than one face name, return only the first one." +If DEFAULT is non-nil, it should be a single face or a list of face names +\(symbols or strings). In the latter case, return the `car' of DEFAULT +\(if MULTIPLE is nil, see below), or DEFAULT (if MULTIPLE is non-nil). + +If MULTIPLE is non-nil, this function uses `completing-read-multiple' +to read multiple faces with \"[ \\t]*,[ \\t]*\" as the separator regexp +and it returns a list of face names. Otherwise, it reads and returns +a single face name." (if (and default (not (stringp default))) (setq default (cond ((symbolp default) @@ -961,26 +956,36 @@ ;; If we only want one, and the default is more than one, ;; discard the unwanted ones. (t (symbol-name (car default)))))) + (if (and default (not multiple)) + ;; For compatibility with `completing-read-multiple' use `crm-separator' + ;; to define DEFAULT if MULTIPLE is nil. + (setq default (car (split-string default crm-separator t)))) - (let (aliasfaces nonaliasfaces faces) + (let ((prompt (if default + (format "%s (default `%s'): " prompt default) + (format "%s: " prompt))) + aliasfaces nonaliasfaces faces) ;; Build up the completion tables. (mapatoms (lambda (s) (if (facep s) (if (get s 'face-alias) (push (symbol-name s) aliasfaces) (push (symbol-name s) nonaliasfaces))))) - (dolist (face (completing-read-multiple - (if default - (format "%s (default `%s'): " prompt default) - (format "%s: " prompt)) + (if multiple + (progn + (dolist (face (completing-read-multiple + prompt + (completion-table-in-turn nonaliasfaces aliasfaces) + nil t nil 'face-name-history default)) + ;; Ignore elements that are not faces + ;; (for example, because DEFAULT was "all faces") + (if (facep face) (push (intern face) faces))) + (nreverse faces)) + (let ((face (completing-read + prompt (completion-table-in-turn nonaliasfaces aliasfaces) - nil t nil 'face-name-history default)) - ;; Ignore elements that are not faces - ;; (for example, because DEFAULT was "all faces") - (if (facep face) (push (intern face) faces))) - ;; Return either a list of faces or just one face. - (setq faces (nreverse faces)) - (if multiple faces (car faces)))) + nil t nil 'face-name-history default))) + (if (facep face) (intern face)))))) ;; Not defined without X, but behind window-system test. (defvar x-bitmap-file-path) ------------------------------------------------------------ revno: 112406 author: Ingo Lohmar committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-04-27 19:55:29 +0300 message: Fix Dired when ls-lisp is used and the -a switch is not used. lisp/ls-lisp.el (ls-lisp-insert-directory): If no files are displayed, move point to after the totals line. See http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html for the details. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 13:32:53 +0000 +++ lisp/ChangeLog 2013-04-27 16:55:29 +0000 @@ -1,3 +1,10 @@ +2013-04-27 Ingo Lohmar (tiny change) + + * ls-lisp.el (ls-lisp-insert-directory): If no files are + displayed, move point to after the totals line. See + http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html + for the details. + 2013-04-27 Stefan Monnier * emacs-lisp/package.el (package-autoload-ensure-default-file): === modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el 2013-01-01 09:11:05 +0000 +++ lisp/ls-lisp.el 2013-04-27 16:55:29 +0000 @@ -404,6 +404,13 @@ ;; the wildcard; let's say something similar. (insert "(No match)\n")) (insert (format "total %.0f\n" (fceiling (/ sum 1024.0)))))) + ;; dired-insert-directory exprects to find point after the + ;; text. But if the listinmg is empty, as e.g. in empty + ;; directories with -a removed from switches, point will be + ;; before the inserted text, and dired-insert-directory will + ;; not indent the listing correctly. Going to the end of the + ;; buffer fixes that. + (unless files (goto-char (point-max))) (if (memq ?R switches) ;; List the contents of all directories recursively. ;; cadr of each element of `file-alist' is t for ------------------------------------------------------------ revno: 112405 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-04-27 08:34:28 -0700 message: * systime.h (make_timeval): Declare as 'const'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-27 13:34:02 +0000 +++ src/ChangeLog 2013-04-27 15:34:28 +0000 @@ -1,3 +1,7 @@ +2013-04-27 Paul Eggert + + * systime.h (make_timeval): Declare as 'const'. + 2013-04-27 Kenichi Handa * font.c (font_open_entity): Always open a font of manageable === modified file 'src/systime.h' --- src/systime.h 2013-03-24 12:59:45 +0000 +++ src/systime.h 2013-04-27 15:34:28 +0000 @@ -143,7 +143,7 @@ /* defined in sysdep.c */ extern int set_file_times (int, const char *, EMACS_TIME, EMACS_TIME); -extern struct timeval make_timeval (EMACS_TIME); +extern struct timeval make_timeval (EMACS_TIME) ATTRIBUTE_CONST; /* defined in keyboard.c */ extern void set_waiting_for_input (EMACS_TIME *); ------------------------------------------------------------ revno: 112404 [merge] committer: K. Handa branch nick: trunk timestamp: Sat 2013-04-27 22:36:37 +0900 message: font.c (font_open_entity): Always open a font of manageable size. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-26 19:31:09 +0000 +++ src/ChangeLog 2013-04-27 13:34:02 +0000 @@ -1,5 +1,9 @@ +2013-04-27 Kenichi Handa + + * font.c (font_open_entity): Always open a font of manageable + size. + 2013-04-26 Paul Eggert - Port better to AIX (Bug#14258). * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too, to pacify AIX xlc. === modified file 'src/font.c' --- src/font.c 2013-04-07 04:41:19 +0000 +++ src/font.c 2013-04-27 13:32:24 +0000 @@ -2819,7 +2819,7 @@ struct font_driver_list *driver_list; Lisp_Object objlist, size, val, font_object; struct font *font; - int min_width, height; + int min_width, height, psize; eassert (FONT_ENTITY_P (entity)); size = AREF (entity, FONT_SIZE_INDEX); @@ -2846,12 +2846,19 @@ } } - font_object = driver_list->driver->open (f, entity, pixel_size); - if (!NILP (font_object)) - ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); + /* We always open a font of manageable size; i.e non-zero average + width and height. */ + for (psize = pixel_size; ; psize++) + { + font_object = driver_list->driver->open (f, entity, psize); + if (NILP (font_object)) + return Qnil; + font = XFONT_OBJECT (font_object); + if (font->average_width > 0 && font->height > 0) + break; + } + ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); FONT_ADD_LOG ("open", entity, font_object); - if (NILP (font_object)) - return Qnil; ASET (entity, FONT_OBJLIST_INDEX, Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX))); @@ -3118,6 +3125,8 @@ double pt = XINT (attrs[LFACE_HEIGHT_INDEX]); pixel_size = POINT_TO_PIXEL (pt / 10, FRAME_RES_Y (f)); + if (pixel_size < 1) + pixel_size = 1; } ASET (work, FONT_SIZE_INDEX, Qnil); foundry[0] = AREF (work, FONT_FOUNDRY_INDEX); ------------------------------------------------------------ revno: 112403 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-04-27 09:32:53 -0400 message: * lisp/emacs-lisp/package.el (package-autoload-ensure-default-file): Add current dir to the load-path. (package-generate-autoloads): Don't rely on autoload-ensure-default-file. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-27 06:38:41 +0000 +++ lisp/ChangeLog 2013-04-27 13:32:53 +0000 @@ -1,3 +1,10 @@ +2013-04-27 Stefan Monnier + + * emacs-lisp/package.el (package-autoload-ensure-default-file): + Add current dir to the load-path. + (package-generate-autoloads): Don't rely on + autoload-ensure-default-file. + 2013-04-26 Reuben Thomas * textmodes/remember.el (remember-store-in-files): Document that === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-04-05 18:46:59 +0000 +++ lisp/emacs-lisp/package.el 2013-04-27 13:32:53 +0000 @@ -588,7 +588,8 @@ (concat ";;; " (file-name-nondirectory file) " --- automatically extracted autoloads\n" ";;\n" - ";;; Code:\n\n" + ";;; Code:\n" + "(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))\n" " \n;; Local Variables:\n" ";; version-control: never\n" ";; no-byte-compile: t\n" @@ -605,8 +606,7 @@ ;;(ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) (version-control 'never)) - (unless (fboundp 'autoload-ensure-default-file) - (package-autoload-ensure-default-file generated-autoload-file)) + (package-autoload-ensure-default-file generated-autoload-file) (update-directory-autoloads pkg-dir) (let ((buf (find-buffer-visiting generated-autoload-file))) (when buf (kill-buffer buf))))) ------------------------------------------------------------ revno: 112402 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-04-27 06:17:37 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-04-19 10:17:40 +0000 +++ autogen/configure 2013-04-27 10:17:37 +0000 @@ -7271,10 +7271,10 @@ # Code from module xalloc-oversized: -# It's helpful to have C macros available to GDB, so prefer -g3 to -g -# if -g3 works and the user does not specify CFLAGS. -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. if test "$ac_test_CFLAGS" != set; then + # It's helpful to have C macros available to GDB, so prefer -g3 to -g + # if -g3 works and the user does not specify CFLAGS. + # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. case $CFLAGS in '-g') emacs_g3_CFLAGS='-g3';; @@ -7312,12 +7312,49 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 $as_echo "$emacs_cv_prog_cc_g3" >&6; } - if test $emacs_cv_prog_cc_g3 = yes; then - CFLAGS=$emacs_g3_CFLAGS - else + if test $emacs_cv_prog_cc_g3 != yes; then CFLAGS=$emacs_save_CFLAGS fi fi + + case $CFLAGS in + *-O*) ;; + *) + # No optimization flag was inferred for this non-GCC compiler. + # Try -O. This is needed for xlc on AIX; see Bug#14258. + emacs_save_CFLAGS=$CFLAGS + test -z "$CFLAGS" || CFLAGS="$CFLAGS " + CFLAGS=${CFLAGS}-O + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5 +$as_echo_n "checking whether $CC accepts -O... " >&6; } +if test "${emacs_cv_prog_cc_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_prog_cc_o=yes +else + emacs_cv_prog_cc_o=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5 +$as_echo "$emacs_cv_prog_cc_o" >&6; } + if test $emacs_cv_prog_cc_o != yes; then + CFLAGS=$emacs_save_CFLAGS + fi ;; + esac fi # Check whether --enable-gcc-warnings was given. ------------------------------------------------------------ revno: 112401 committer: Bastien Guerry branch nick: trunk timestamp: Sat 2013-04-27 08:38:41 +0200 message: lisp/ChangeLog: Tiny ChangeLog formatting fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-26 23:55:06 +0000 +++ lisp/ChangeLog 2013-04-27 06:38:41 +0000 @@ -1,7 +1,7 @@ 2013-04-26 Reuben Thomas - * textmodes/remember.el (remember-store-in-files): document that - the file name format is fed through format-time-string. + * textmodes/remember.el (remember-store-in-files): Document that + the file name format is passed to `format-time-string'. 2013-04-26 Leo Liu ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.