Now on revision 112457. ------------------------------------------------------------ revno: 112457 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-05-04 22:03:08 -0700 message: Spelling fixes (or remove unnecessary and unusually-spelled words). diff: === modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el 2013-04-27 16:55:29 +0000 +++ lisp/ls-lisp.el 2013-05-05 05:03:08 +0000 @@ -404,8 +404,8 @@ ;; 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 + ;; dired-insert-directory expects to find point after the + ;; text. But if the listing 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 === modified file 'src/fileio.c' --- src/fileio.c 2013-05-05 00:51:49 +0000 +++ src/fileio.c 2013-05-05 05:03:08 +0000 @@ -6076,9 +6076,8 @@ Hence, for now by default fsync is used only when interactive. For more on why fsync often fails to work on today's hardware, see: - Zheng M, Tucek J, Qin F, Lillibridge M. Understanding the - robustness of SSDs under power fault. 11th USENIX Conference on - File and Storage Technologies, 2013 (FAST '13), 271-84 + Zheng M et al. Understanding the robustness of SSDs under power fault. + 11th USENIX Conf. on File and Storage Technologies, 2013 (FAST '13), 271-84 http://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf For more on why fsync does not suffice even if it works properly, see: === modified file 'src/nsfns.m' --- src/nsfns.m 2013-05-01 07:02:19 +0000 +++ src/nsfns.m 2013-05-05 05:03:08 +0000 @@ -1502,7 +1502,7 @@ ret = (ret == NSOKButton) || panelOK; - if (ret) + if (ret) { NSString *str = [panel getFilename]; if (! str) str = [panel getDirectory]; @@ -1699,7 +1699,7 @@ (Lisp_Object display) { NSWindowDepth depth; - + check_ns_display_info (display); depth = [ns_get_screen (display) depth]; @@ -2267,7 +2267,7 @@ { NSWindowDepth depth; NSString *colorSpace; - + check_ns_display_info (display); depth = [ns_get_screen (display) depth]; colorSpace = NSColorSpaceFromDepth (depth); @@ -2546,7 +2546,7 @@ /* Handle arrow/function/control keys and copy/paste/cut in file dialogs. - Return YES if handeled, NO if not. + Return YES if handled, NO if not. */ static BOOL handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent) ------------------------------------------------------------ revno: 112456 committer: Leo Liu branch nick: trunk timestamp: Sun 2013-05-05 12:49:27 +0800 message: * progmodes/octave.el (inferior-octave-strip-ctrl-g) (inferior-octave-output-filter): Remove. (octave-send-region, inferior-octave-startup): Fix callers. (inferior-octave-mode-map): Don't use comint-dynamic-complete. (octave-binary-file-extensions): New user variable. (octave-find-definition): Confirm if opening binary files. (octave-help-file): Use octave-find-definition to get the binary confirmation. (octave-help): Adjust for octave-help-file change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-05 02:26:38 +0000 +++ lisp/ChangeLog 2013-05-05 04:49:27 +0000 @@ -1,3 +1,15 @@ +2013-05-05 Leo Liu + + * progmodes/octave.el (inferior-octave-strip-ctrl-g) + (inferior-octave-output-filter): Remove. + (octave-send-region, inferior-octave-startup): Fix callers. + (inferior-octave-mode-map): Don't use comint-dynamic-complete. + (octave-binary-file-extensions): New user variable. + (octave-find-definition): Confirm if opening binary files. + (octave-help-file): Use octave-find-definition to get the binary + confirmation. + (octave-help): Adjust for octave-help-file change. + 2013-05-05 Stefan Monnier * progmodes/pascal.el (pascal-font-lock-keywords): Use backquotes. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-03 07:52:17 +0000 +++ lisp/progmodes/octave.el 2013-05-05 04:49:27 +0000 @@ -590,8 +590,9 @@ (let ((map (make-sparse-keymap))) (set-keymap-parent map comint-mode-map) (define-key map "\M-." 'octave-find-definition) - (define-key map "\t" 'comint-dynamic-complete) + (define-key map "\t" 'completion-at-point) (define-key map "\C-hd" 'octave-help) + ;; Same as in `shell-mode'. (define-key map "\M-?" 'comint-dynamic-list-filename-completions) (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) (define-key map [menu-bar inout list-history] @@ -730,7 +731,7 @@ inferior-octave-output-string)) ;; And finally, everything is back to normal. - (set-process-filter proc 'inferior-octave-output-filter) + (set-process-filter proc 'comint-output-filter) ;; Just in case, to be sure a cd in the startup file ;; won't have detrimental effects. (inferior-octave-resync-dirs))) @@ -783,21 +784,6 @@ (set-window-configuration conf) (setq unread-command-events (list ch))))))) -(defun inferior-octave-strip-ctrl-g (string) - "Strip leading `^G' character. -If STRING starts with a `^G', ring the bell and strip it." - (if (string-match "^\a" string) - (progn - (ding) - (setq string (substring string 1)))) - string) - -(defun inferior-octave-output-filter (proc string) - "Standard output filter for the inferior Octave process. -Ring Emacs bell if process output starts with an ASCII bell, and pass -the rest to `comint-output-filter'." - (comint-output-filter proc (inferior-octave-strip-ctrl-g string))) - (defun inferior-octave-output-digest (_proc string) "Special output filter for the inferior Octave process. Save all output between newlines into `inferior-octave-output-list', and @@ -1398,27 +1384,26 @@ (interactive "r") (inferior-octave t) (let ((proc inferior-octave-process) - (string (buffer-substring-no-properties beg end)) - line) + (string (buffer-substring-no-properties beg end)) + line) (with-current-buffer inferior-octave-buffer (setq inferior-octave-output-list nil) (while (not (string-equal string "")) - (if (string-match "\n" string) - (setq line (substring string 0 (match-beginning 0)) - string (substring string (match-end 0))) - (setq line string string "")) - (setq inferior-octave-receive-in-progress t) - (inferior-octave-send-list-and-digest (list (concat line "\n"))) - (while inferior-octave-receive-in-progress - (accept-process-output proc)) - (insert-before-markers - (mapconcat 'identity - (append - (if octave-send-echo-input (list line) (list "")) - (mapcar 'inferior-octave-strip-ctrl-g - inferior-octave-output-list) - (list inferior-octave-output-string)) - "\n"))))) + (if (string-match "\n" string) + (setq line (substring string 0 (match-beginning 0)) + string (substring string (match-end 0))) + (setq line string string "")) + (setq inferior-octave-receive-in-progress t) + (inferior-octave-send-list-and-digest (list (concat line "\n"))) + (while inferior-octave-receive-in-progress + (accept-process-output proc)) + (insert-before-markers + (mapconcat 'identity + (append + (if octave-send-echo-input (list line) (list "")) + inferior-octave-output-list + (list inferior-octave-output-string)) + "\n"))))) (if octave-send-show-buffer (display-buffer inferior-octave-buffer))) @@ -1482,9 +1467,7 @@ (define-button-type 'octave-help-file 'follow-link t 'action #'help-button-action - 'help-function (lambda (fn) - (find-file fn) - (octave-goto-function-definition))) + 'help-function 'octave-find-definition) (define-button-type 'octave-help-function 'follow-link t @@ -1527,7 +1510,7 @@ (replace-match "" nil nil nil 1) (insert "`") (help-insert-xref-button (file-name-nondirectory file) - 'octave-help-file file) + 'octave-help-file fn) (insert "'"))) ;; Make 'See also' clickable (with-syntax-table octave-mode-syntax-table @@ -1537,6 +1520,12 @@ (match-end 0) :type 'octave-help-function)))))))) +(defcustom octave-binary-file-extensions '("oct" "mex") + "A list of binary file extensions for Octave." + :type '(repeat string) + :group 'octave + :version "24.4") + (defvar find-tag-marker-ring) (defun octave-find-definition (fn) @@ -1552,6 +1541,11 @@ (match-string 1 line)))) (if (not file) (user-error "%s" (or line (format "`%s' not found" fn))) + (when (and (member (file-name-extension file) + octave-binary-file-extensions) + (not (yes-or-no-p (format "File `%s' may be binary; open? " + (file-name-nondirectory file))))) + (error "Aborted")) (require 'etags) (ring-insert find-tag-marker-ring (point-marker)) (find-file file) ------------------------------------------------------------ revno: 112455 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-05-04 19:29:28 -0700 message: Fix NEWS typo diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-05-05 00:51:49 +0000 +++ etc/NEWS 2013-05-05 02:29:28 +0000 @@ -151,7 +151,7 @@ ** Calendar and Diary +++ -*** New variable `diary-from-outlook-function' for used by the command +*** New variable `diary-from-outlook-function', used by the command `diary-from-outlook'. ** cl-lib ------------------------------------------------------------ revno: 112454 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-05-04 22:26:38 -0400 message: * lisp/progmodes/pascal.el (pascal--syntax-propertize): New const. (pascal-mode): Use it. Use setq-local. (pascal-font-lock-keywords): Use backquotes. Merge the two entries that handle function definitions. * test/indent/pascal.pas: Add test for mis-identified comments. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-04 23:55:57 +0000 +++ lisp/ChangeLog 2013-05-05 02:26:38 +0000 @@ -1,3 +1,10 @@ +2013-05-05 Stefan Monnier + + * progmodes/pascal.el (pascal-font-lock-keywords): Use backquotes. + Merge the two entries that handle function definitions. + (pascal--syntax-propertize): New const. + (pascal-mode): Use it. Use setq-local. + 2013-05-04 Glenn Morris * calendar/diary-lib.el (diary-from-outlook-function): New variable. === modified file 'lisp/progmodes/pascal.el' --- lisp/progmodes/pascal.el 2013-01-31 00:58:24 +0000 +++ lisp/progmodes/pascal.el 2013-05-05 02:26:38 +0000 @@ -158,31 +158,44 @@ -(defconst pascal-font-lock-keywords (purecopy - (list - '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\([a-z]\\)" - 1 font-lock-keyword-face) - '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\([a-z][a-z0-9_]*\\)" - 3 font-lock-function-name-face t) -; ("type" "const" "real" "integer" "char" "boolean" "var" -; "record" "array" "file") - (cons (concat "\\<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|" - "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\>") - 'font-lock-type-face) - '("\\<\\(label\\|external\\|forward\\)\\>" . font-lock-constant-face) - '("\\<\\([0-9]+\\)[ \t]*:" 1 font-lock-function-name-face) -; ("of" "to" "for" "if" "then" "else" "case" "while" -; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end") - (concat "\\<\\(" - "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|" - "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)" - "\\)\\>") - '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" - 1 font-lock-keyword-face) - '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" - 2 font-lock-keyword-face t))) +(defconst pascal-font-lock-keywords + `(("\\_<\\(function\\|pro\\(cedure\\|gram\\)\\)[ \t]+\\([[:alpha:]][[:alnum:]_]*\\)" + (1 font-lock-keyword-face) + (3 font-lock-function-name-face)) + ;; ("type" "const" "real" "integer" "char" "boolean" "var" + ;; "record" "array" "file") + (,(concat "\\<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|" + "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\>") + font-lock-type-face) + ("\\<\\(label\\|external\\|forward\\)\\>" . font-lock-constant-face) + ("\\<\\([0-9]+\\)[ \t]*:" 1 font-lock-function-name-face) + ;; ("of" "to" "for" "if" "then" "else" "case" "while" + ;; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end") + ,(concat "\\<\\(" + "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|" + "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)" + "\\)\\>") + ("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" + 1 font-lock-keyword-face) + ("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" + 2 font-lock-keyword-face t)) "Additional expressions to highlight in Pascal mode.") -(put 'pascal-mode 'font-lock-defaults '(pascal-font-lock-keywords nil t)) + +(defconst pascal--syntax-propertize + (syntax-propertize-rules + ;; The syntax-table settings are too coarse and end up treating /* and (/ + ;; as comment starters. Fix it here by removing the "2" from the syntax + ;; of the second char of such sequences. + ("/\\(\\*\\)" (1 ". 3b")) + ("(\\(\\/\\)" (1 (prog1 ". 1c" (forward-char -1) nil))) + ;; Pascal uses '' and "" rather than \' and \" to escape quotes. + ("''\\|\"\"" (0 (if (save-excursion + (nth 3 (syntax-ppss (match-beginning 0)))) + (string-to-syntax ".") + ;; In case of 3 or more quotes in a row, only advance + ;; one quote at a time. + (forward-char -1) + nil))))) (defcustom pascal-indent-level 3 "Indentation of Pascal statements with respect to containing block." @@ -346,23 +359,22 @@ Turning on Pascal mode calls the value of the variable pascal-mode-hook with no args, if that value is non-nil." - (set (make-local-variable 'local-abbrev-table) pascal-mode-abbrev-table) - (set (make-local-variable 'indent-line-function) 'pascal-indent-line) - (set (make-local-variable 'comment-indent-function) 'pascal-indent-comment) - (set (make-local-variable 'parse-sexp-ignore-comments) nil) - (set (make-local-variable 'blink-matching-paren-dont-ignore-comments) t) - (set (make-local-variable 'case-fold-search) t) - (set (make-local-variable 'comment-start) "{") - (set (make-local-variable 'comment-start-skip) "(\\*+ *\\|{ *") - (set (make-local-variable 'comment-end) "}") + (setq-local local-abbrev-table pascal-mode-abbrev-table) + (setq-local indent-line-function 'pascal-indent-line) + (setq-local comment-indent-function 'pascal-indent-comment) + (setq-local parse-sexp-ignore-comments nil) + (setq-local blink-matching-paren-dont-ignore-comments t) + (setq-local case-fold-search t) + (setq-local comment-start "{") + (setq-local comment-start-skip "(\\*+ *\\|{ *") + (setq-local comment-end "}") (add-hook 'completion-at-point-functions 'pascal-completions-at-point nil t) ;; Font lock support - (set (make-local-variable 'font-lock-defaults) - '(pascal-font-lock-keywords nil t)) + (setq-local font-lock-defaults '(pascal-font-lock-keywords nil t)) + (setq-local syntax-propertize-function pascal--syntax-propertize) ;; Imenu support - (set (make-local-variable 'imenu-generic-expression) - pascal-imenu-generic-expression) - (set (make-local-variable 'imenu-case-fold-search) t) + (setq-local imenu-generic-expression pascal-imenu-generic-expression) + (setq-local imenu-case-fold-search t) ;; Pascal-mode's own hide/show support. (add-to-invisibility-spec '(pascal . t))) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-04-19 19:56:16 +0000 +++ test/ChangeLog 2013-05-05 02:26:38 +0000 @@ -1,3 +1,7 @@ +2013-05-05 Stefan Monnier + + * indent/pascal.pas: Add test for mis-identified comments. + 2013-04-01 Masatake YAMATO * automated/imenu-tests.el: New file. (Bug#14112) @@ -5,7 +9,7 @@ 2013-04-19 Fabián Ezequiel Gallina * automated/python-tests.el (python-imenu-prev-index-position-1): - Removed test. + Remove test. (python-imenu-create-index-1, python-imenu-create-flat-index-1): New tests. @@ -62,8 +66,8 @@ (ruby-move-to-block-skips-percent-literal): Add depth-affecting bits inside the examples. (ruby-move-to-block-skips-heredoc): New test. - (ruby-add-log-current-method-after-inner-class): Lower - expectations: move point inside a method, initially. + (ruby-add-log-current-method-after-inner-class): + Lower expectations: move point inside a method, initially. 2013-02-13 Dmitry Gutov @@ -76,8 +80,8 @@ 2013-02-03 Chong Yidong - * automated/files.el (file-test--do-local-variables-test): Avoid - compilation warning message. + * automated/files.el (file-test--do-local-variables-test): + Avoid compilation warning message. 2013-01-27 Dmitry Gutov @@ -381,7 +385,7 @@ 2011-07-26 Ulf Jasper * automated/icalendar-tests.el (icalendar-tests--compare-strings): - Removed, simply use string=. + Remove, simply use string=. (icalendar--diarytime-to-isotime) (icalendar--datetime-to-diary-date) (icalendar--datestring-to-isodate) === modified file 'test/indent/pascal.pas' --- test/indent/pascal.pas 2013-01-31 01:58:24 +0000 +++ test/indent/pascal.pas 2013-05-05 02:26:38 +0000 @@ -6,7 +6,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, version 2. +published by the Free Software Foundation, version 3. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +25,10 @@ {$gnu-pascal,I+} +(* second style of comment *) // Free-pascal style comment. +var x:Char = 12 /* 45; // This /* does not start a comment. +var x:Char = (/ 4); // This (/ does not start a comment. program CRTDemo; ------------------------------------------------------------ revno: 112453 fixes bug: http://debbugs.gnu.org/14273 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-05-04 17:51:49 -0700 message: `write-region-inhibit-fsync' defaults to noninteractive. * cmdargs.texi (Initial Options): * files.texi (Customize Save): Document this. * etc/NEWS: Document this. * src/fileio.c (syms_of_fileio): Implement this. * src/filelock.c (create_lock_file): If symbolic links don't work, so we use a regular file as a lock file, do not fsync the lock file; it's not needed. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-05-04 23:55:57 +0000 +++ doc/emacs/ChangeLog 2013-05-05 00:51:49 +0000 @@ -1,3 +1,9 @@ +2013-05-05 Paul Eggert + + `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273). + * cmdargs.texi (Initial Options): + * files.texi (Customize Save): Document this. + 2013-05-04 Glenn Morris * calendar.texi (Importing Diary): Mention diary-from-outlook-function. === modified file 'doc/emacs/cmdargs.texi' --- doc/emacs/cmdargs.texi 2013-02-13 00:42:56 +0000 +++ doc/emacs/cmdargs.texi 2013-05-05 00:51:49 +0000 @@ -251,7 +251,8 @@ but @file{site-start.el} is loaded nonetheless. It also causes Emacs to exit after processing all the command options. In addition, it disables auto-saving except in buffers for which auto-saving is -explicitly requested. +explicitly requested, and when saving files it omits the @code{fsync} +system call unless otherwise requested. @item --script @var{file} @opindex --script === modified file 'doc/emacs/files.texi' --- doc/emacs/files.texi 2013-02-25 17:36:03 +0000 +++ doc/emacs/files.texi 2013-05-05 00:51:49 +0000 @@ -705,13 +705,27 @@ final newlines. @vindex write-region-inhibit-fsync - When Emacs saves a file, it invokes the @code{fsync} system call to -force the data immediately out to disk. This is important for safety -if the system crashes or in case of power outage. However, it can be -disruptive on laptops using power saving, as it may force a disk -spin-up each time you save a file. If you accept an increased risk of -data loss, you can set @code{write-region-inhibit-fsync} to a -non-@code{nil} value to disable the synchronization. + Normally, when a program writes a file, the operating system briefly +caches the file's data in main memory before committing the data to +disk. This can greatly improve performance; for example, when running +on laptops, it can avoid a disk spin-up each time a file is written. +However, it risks data loss if the operating system crashes before +committing the cache to disk. + + To lessen this risk, Emacs can invoke the @code{fsync} system call +after saving a file. Using @code{fsync} does not eliminate the risk +of data loss, partly because many systems do not implement +@code{fsync} properly, and partly because Emacs's file-saving +procedure typically relies also on directory updates that might not +survive a crash even if @code{fsync} works properly. + + The @code{write-region-inhibit-fsync} variable controls whether +Emacs invokes @code{fsync} after saving a file. The variable's +default value is @code{nil} when Emacs is interactive, and @code{t} +when Emacs runs in batch mode. + + Emacs never uses @code{fsync} when writing auto-save files, as these +files might lose data anyway. @node Interlocking @subsection Protection against Simultaneous Editing === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-04-24 16:50:14 +0000 +++ etc/ChangeLog 2013-05-05 00:51:49 +0000 @@ -1,3 +1,8 @@ +2013-05-05 Paul Eggert + + `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273). + * NEWS: Document this. + 2013-04-24 Tassilo Horn * themes/tsdh-dark-theme.el (tsdh-dark): Add ido faces and remove === modified file 'etc/NEWS' --- etc/NEWS 2013-05-04 23:55:57 +0000 +++ etc/NEWS 2013-05-05 00:51:49 +0000 @@ -61,6 +61,8 @@ ** `initial-buffer-choice' can now specify a function to set up the initial buffer. +** `write-region-inhibit-fsync' now defaults to t in batch mode. + ** ACL support has been added. +++ *** Emacs preserves the ACL entries of files when backing up. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-04 19:27:41 +0000 +++ src/ChangeLog 2013-05-05 00:51:49 +0000 @@ -1,3 +1,11 @@ +2013-05-05 Paul Eggert + + `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273). + * fileio.c (syms_of_fileio): Implement this. + * filelock.c (create_lock_file): If symbolic links don't work, so + we use a regular file as a lock file, do not fsync the lock file; + it's not needed. + 2013-05-04 Stefan Monnier * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp. @@ -51,6 +59,7 @@ 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/fileio.c' --- src/fileio.c 2013-04-07 16:18:41 +0000 +++ src/fileio.c 2013-05-05 00:51:49 +0000 @@ -4979,15 +4979,14 @@ immediate_quit = 0; - /* fsync appears to change the modtime on BSD4.2. - Disk full in NFS may be reported here. */ - /* mib says that closing the file will try to write as fast as NFS can do - it, and that means the fsync here is not crucial for autosave files. */ + /* fsync is not crucial for auto-save files, since they might lose + some work anyway. */ if (!auto_saving && !write_region_inhibit_fsync) { - /* Transfer data and metadata to disk, retrying if interrupted. Also, - ignore EINVAL which happens when fsync is not supported on this - file. */ + /* Transfer data and metadata to disk, retrying if interrupted. + fsync can report a write failure here, e.g., due to disk full + under NFS. But ignore EINVAL, which means fsync is not + supported on this file. */ while (fsync (desc) != 0) if (errno != EINTR) { @@ -6069,11 +6068,29 @@ file is usually more useful if it contains the deleted text. */); Vauto_save_include_big_deletions = Qnil; + /* fsync can be a significant performance hit. Often it doesn't + suffice to make the file-save operation survive a crash. For + batch scripts, which are typically part of larger shell commands + that don't fsync other files, its effect on performance can be + significant so its utility is particularly questionable. + Hence, for now by default fsync is used only when interactive. + + For more on why fsync often fails to work on today's hardware, see: + Zheng M, Tucek J, Qin F, Lillibridge M. Understanding the + robustness of SSDs under power fault. 11th USENIX Conference on + File and Storage Technologies, 2013 (FAST '13), 271-84 + http://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf + + For more on why fsync does not suffice even if it works properly, see: + Roche X. Necessary step(s) to synchronize filename operations on disk. + Austin Group Defect 672, 2013-03-19 + http://austingroupbugs.net/view.php?id=672 */ DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, doc: /* Non-nil means don't call fsync in `write-region'. This variable affects calls to `write-region' as well as save commands. -A non-nil value may result in data loss! */); - write_region_inhibit_fsync = 0; +Setting this to nil may avoid data loss if the system loses power or +the operating system crashes. */); + write_region_inhibit_fsync = noninteractive; DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash, doc: /* Specifies whether to use the system's trash can. === modified file 'src/filelock.c' --- src/filelock.c 2013-03-13 18:42:22 +0000 +++ src/filelock.c 2013-05-05 00:51:49 +0000 @@ -437,14 +437,8 @@ if (emacs_write (fd, lock_info_str, lock_info_len) != lock_info_len || (need_fchmod && fchmod (fd, world_readable) != 0)) err = errno; - else - while (fsync (fd) != 0) - if (errno != EINTR) - { - if (errno != EINVAL) - err = errno; - break; - } + /* There is no need to call fsync here, as the contents of + the lock file need not survive system crashes. */ if (emacs_close (fd) != 0) err = errno; if (!err && rename_lock_file (nonce, lfname, force) != 0) ------------------------------------------------------------ revno: 112452 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-05-04 16:55:57 -0700 message: * lisp/calendar/diary-lib.el (diary-from-outlook-function): New variable. (diary-from-outlook): Respect diary-from-outlook-function. * doc/emacs/calendar.texi (Importing Diary): Mention diary-from-outlook-function. * etc/NEWS: Mention this. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-04-04 03:46:25 +0000 +++ doc/emacs/ChangeLog 2013-05-04 23:55:57 +0000 @@ -1,3 +1,7 @@ +2013-05-04 Glenn Morris + + * calendar.texi (Importing Diary): Mention diary-from-outlook-function. + 2013-03-17 Paul Eggert doc: convert some TeX accents to UTF-8 === modified file 'doc/emacs/calendar.texi' --- doc/emacs/calendar.texi 2013-03-04 08:45:03 +0000 +++ doc/emacs/calendar.texi 2013-05-04 23:55:57 +0000 @@ -1542,7 +1542,8 @@ messages. While viewing such a message in Rmail or Gnus, do @kbd{M-x diary-from-outlook} to import the entry. You can make this command recognize additional appointment message formats by customizing the -variable @code{diary-outlook-formats}. +variable @code{diary-outlook-formats}. Other mail clients can set +@code{diary-from-outlook-function} to an appropriate value. @c FIXME the name of the RFC is hardly very relevant. @cindex iCalendar support === modified file 'etc/NEWS' --- etc/NEWS 2013-04-27 20:55:00 +0000 +++ etc/NEWS 2013-05-04 23:55:57 +0000 @@ -146,6 +146,12 @@ *** Battery information via the BSD `apm' utility is now supported. +** Calendar and Diary + ++++ +*** New variable `diary-from-outlook-function' for used by the command +`diary-from-outlook'. + ** cl-lib *** New macro cl-tagbody. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-04 19:27:41 +0000 +++ lisp/ChangeLog 2013-05-04 23:55:57 +0000 @@ -1,3 +1,8 @@ +2013-05-04 Glenn Morris + + * calendar/diary-lib.el (diary-from-outlook-function): New variable. + (diary-from-outlook): Respect diary-from-outlook-function. + 2013-05-04 Stefan Monnier * simple.el (read-expression-map): Use completion-at-point (bug#14255). === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2013-01-01 09:11:05 +0000 +++ lisp/calendar/diary-lib.el 2013-05-04 23:55:57 +0000 @@ -2611,14 +2611,23 @@ (diary-from-outlook-internal subject body) (message "Diary entry added")))))) +(defvar diary-from-outlook-function nil + "If non-nil, a function of one argument for `diary-from-outlook' to call. +If the current buffer contains an Outlook-style appointment message, +this function should extract it into a diary entry. If the argument is +nil, it should ask for confirmation before adding this entry to the diary. +For examples, see `diary-from-outlook-rmail' and `diary-from-outlook-gnus'.") + (defun diary-from-outlook (&optional noconfirm) "Maybe snarf diary entry from current Outlook-generated message. -Currently knows about Gnus and Rmail modes. Unless the optional -argument NOCONFIRM is non-nil (which is the case when this -function is called interactively), then if an entry is found the -user is asked to confirm its addition." +Uses `diary-from-outlook-function' if that is non-nil, else +`diary-from-outlook-rmail' for Rmail or `diary-from-outlook-gnus' for Gnus. +Unless the optional argument NOCONFIRM is non-nil (which is the +case when this function is called interactively), then if an +entry is found the user is asked to confirm its addition." (interactive "p") (let ((func (cond + (diary-from-outlook-function) ((eq major-mode 'rmail-mode) #'diary-from-outlook-rmail) ((memq major-mode '(gnus-summary-mode gnus-article-mode)) ------------------------------------------------------------ revno: 112451 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2013-05-04 22:38:05 +0000 message: gnus-sum.el (gnus-read-header): Ensure groups are prefixed when entering into the registry diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-04 19:34:19 +0000 +++ lisp/gnus/ChangeLog 2013-05-04 22:38:05 +0000 @@ -4,6 +4,11 @@ (message-send-and-exit): Don't pass `buf' so as to hide the buffer (bug#14085). +2013-05-04 Andrew Cohen + + * gnus-sum.el (gnus-read-header): Ensure groups are prefixed when + entering into the registry. + 2013-05-01 Katsumi Yamaoka * gnus-util.el (gnus-emacs-completing-read): Fix a filter for XEmacs. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-04-24 22:06:56 +0000 +++ lisp/gnus/gnus-sum.el 2013-05-04 22:38:05 +0000 @@ -12415,7 +12415,9 @@ (not (gnus-ephemeral-group-p (car where)))) (gnus-registry-handle-action (mail-header-id header) nil - (gnus-group-prefixed-name (car where) gnus-override-method) + (gnus-group-prefixed-name + (car where) + (or gnus-override-method (gnus-find-method-for-group group))) (mail-header-subject header) (mail-header-from header))) (when (and (stringp id) ------------------------------------------------------------ revno: 112450 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14293 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-05-04 15:49:23 -0400 message: * doc/misc/cl.texi (Obsolete Macros): Describe replacements for `flet'. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-04-16 08:11:56 +0000 +++ doc/misc/ChangeLog 2013-05-04 19:49:23 +0000 @@ -1,3 +1,8 @@ +2013-05-04 Stefan Monnier + + * cl.texi (Obsolete Macros): Describe replacements for `flet' + (bug#14293). + 2013-04-16 Michael Albinus * tramp.texi (Frequently Asked Questions): Precise, how to define === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2013-02-20 02:07:07 +0000 +++ doc/misc/cl.texi 2013-05-04 19:49:23 +0000 @@ -4850,10 +4850,27 @@ direct C-language calls to the message routines rather than going through the Lisp @code{message} function. +For those cases where the dynamic scoping of @code{flet} is desired, +@code{cl-flet} is clearly not a substitute. The most direct replacement would +be instead to use @code{cl-letf} to temporarily rebind @code{(symbol-function +'@var{fun})}. But in most cases, a better substitute is to use an advice, such +as: + +@example +(defvar my-fun-advice-enable nil) +(add-advice '@var{fun} :around + (lambda (orig &rest args) + (if my-fun-advice-enable (do-something) + (apply orig args)))) +@end example + +so that you can then replace the @code{flet} with a simple dynamically scoped +binding of @code{my-fun-advice-enable}. + @c Bug#411. -Note that many primitives (e.g., @code{+}) have special byte-compile -handling. Attempts to redefine such functions using @code{flet} will -fail if byte-compiled. +Note that many primitives (e.g., @code{+}) have special byte-compile handling. +Attempts to redefine such functions using @code{flet}, @code{cl-letf}, or an +advice will fail when byte-compiled. @c Or cl-flet. @c In such cases, use @code{labels} instead. @end defmac ------------------------------------------------------------ revno: 112449 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14085 author: Thierry Volpiatto committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-05-04 15:34:19 -0400 message: * lisp/gnus/message.el (message-bury): Make `buffer' optional. (message-send-and-exit): Don't pass `buf' so as to hide the buffer. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-01 00:37:07 +0000 +++ lisp/gnus/ChangeLog 2013-05-04 19:34:19 +0000 @@ -1,3 +1,9 @@ +2013-05-04 Thierry Volpiatto + + * message.el (message-bury): Make `buffer' optional. + (message-send-and-exit): Don't pass `buf' so as to hide the buffer + (bug#14085). + 2013-05-01 Katsumi Yamaoka * gnus-util.el (gnus-emacs-completing-read): Fix a filter for XEmacs. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2013-04-26 07:59:32 +0000 +++ lisp/gnus/message.el 2013-05-04 19:34:19 +0000 @@ -4047,7 +4047,7 @@ (actions message-exit-actions)) (when (and (message-send arg) (buffer-name buf)) - (message-bury buf) + (message-bury) (if message-kill-buffer-on-exit (kill-buffer buf)) (message-do-actions actions) @@ -4095,7 +4095,7 @@ (message-disassociate-draft))) (message-do-actions actions)))) -(defun message-bury (buffer) +(defun message-bury (&optional buffer) "Bury this mail BUFFER." (if message-return-action (progn ------------------------------------------------------------ revno: 112448 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14255 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-05-04 15:27:41 -0400 message: * lisp/simple.el (read-expression-map): Use completion-at-point. Move the declaration from C. (read-minibuffer, eval-minibuffer): Move from C. (completion-setup-function): Avoid minibuffer-completion-contents. * src/minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp. (syms_of_minibuf): Adjust accodingly. * src/lread.c (Fread): * src/callint.c (Fcall_interactively): Adjust calls accordingly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-03 07:52:17 +0000 +++ lisp/ChangeLog 2013-05-04 19:27:41 +0000 @@ -1,9 +1,16 @@ +2013-05-04 Stefan Monnier + + * simple.el (read-expression-map): Use completion-at-point (bug#14255). + Move the declaration from C. + (read-minibuffer, eval-minibuffer): Move from C. + (completion-setup-function): Avoid minibuffer-completion-contents. + 2013-05-03 Leo Liu * progmodes/octave.el (octave-font-lock-keywords): Do not dehighlight 'end' in comments or strings. - (octave-completing-read, octave-goto-function-definition): New - helpers. + (octave-completing-read, octave-goto-function-definition): + New helpers. (octave-help-buffer): New user variable. (octave-help-file, octave-help-function): New button types. (octave-help): New command and bind it to C-h ;. @@ -24,8 +31,8 @@ 2013-05-02 Leo Liu - * progmodes/octave.el (octave-syntax-propertize-function): Include - the case when ' is at line beginning. (Bug#14336) + * progmodes/octave.el (octave-syntax-propertize-function): + Include the case when ' is at line beginning. (Bug#14336) 2013-05-02 Glenn Morris @@ -75,8 +82,8 @@ 2013-04-30 Alan Mackenzie Handle arbitrarily long C++ member initialisation lists. - * progmodes/cc-engine.el (c-back-over-member-initializers): new - function. + * progmodes/cc-engine.el (c-back-over-member-initializers): + new function. (c-guess-basic-syntax): New CASE 5R (extracted from 5B) to handle (most) member init lists. @@ -172,8 +179,8 @@ 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 + 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 === modified file 'lisp/simple.el' --- lisp/simple.el 2013-04-18 13:15:08 +0000 +++ lisp/simple.el 2013-05-04 19:27:41 +0000 @@ -1236,13 +1236,35 @@ bidi-fixer encoding-msg pos total percent col hscroll)))))) ;; Initialize read-expression-map. It is defined at C level. -(let ((m (make-sparse-keymap))) - (define-key m "\M-\t" 'lisp-complete-symbol) - ;; Might as well bind TAB to completion, since inserting a TAB char is much - ;; too rarely useful. - (define-key m "\t" 'lisp-complete-symbol) - (set-keymap-parent m minibuffer-local-map) - (setq read-expression-map m)) +(defvar read-expression-map + (let ((m (make-sparse-keymap))) + (define-key m "\M-\t" 'completion-at-point) + ;; Might as well bind TAB to completion, since inserting a TAB char is + ;; much too rarely useful. + (define-key m "\t" 'completion-at-point) + (set-keymap-parent m minibuffer-local-map) + m)) + +(defun read-minibuffer (prompt &optional initial-contents) + "Return a Lisp object read using the minibuffer, unevaluated. +Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS +is a string to insert in the minibuffer before reading. +\(INITIAL-CONTENTS can also be a cons of a string and an integer. +Such arguments are used as in `read-from-minibuffer'.)" + ;; Used for interactive spec `x'. + (read-from-minibuffer prompt initial-contents minibuffer-local-map + t minibuffer-history)) + +(defun eval-minibuffer (prompt &optional initial-contents) + "Return value of Lisp expression read using the minibuffer. +Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS +is a string to insert in the minibuffer before reading. +\(INITIAL-CONTENTS can also be a cons of a string and an integer. +Such arguments are used as in `read-from-minibuffer'.)" + ;; Used for interactive spec `X'. + ;; FIXME: Share code with `eval-expression'. + (eval (read-from-minibuffer prompt initial-contents read-expression-map + t read-expression-history))) (defvar minibuffer-completing-symbol nil "Non-nil means completing a Lisp symbol in the minibuffer.") @@ -6714,15 +6736,21 @@ (defun completion-setup-function () (let* ((mainbuf (current-buffer)) (base-dir - ;; When reading a file name in the minibuffer, - ;; try and find the right default-directory to set in the - ;; completion list buffer. - ;; FIXME: Why do we do that, actually? --Stef + ;; FIXME: This is a bad hack. We try to set the default-directory + ;; in the *Completions* buffer so that the relative file names + ;; displayed there can be treated as valid file names, independently + ;; from the completion context. But this suffers from many problems: + ;; - It's not clear when the completions are file names. With some + ;; completion tables (e.g. bzr revision specs), the listed + ;; completions can mix file names and other things. + ;; - It doesn't pay attention to possible quoting. + ;; - With fancy completion styles, the code below will not always + ;; find the right base directory. (if minibuffer-completing-file-name (file-name-as-directory (expand-file-name - (substring (minibuffer-completion-contents) - 0 (or completion-base-size 0))))))) + (buffer-substring (minibuffer-prompt-end) + (- (point) (or completion-base-size 0)))))))) (with-current-buffer standard-output (let ((base-size completion-base-size) ;Read before killing localvars. (base-position completion-base-position) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-04 10:19:13 +0000 +++ src/ChangeLog 2013-05-04 19:27:41 +0000 @@ -1,8 +1,15 @@ +2013-05-04 Stefan Monnier + + * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp. + (syms_of_minibuf): Adjust accodingly. + * lread.c (Fread): + * callint.c (Fcall_interactively): Adjust calls accordingly. + 2013-05-04 Eli Zaretskii * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that - w->contents is a buffer before computing everything else. Use - parentheses to disambiguate last part of the condition. + w->contents is a buffer before computing everything else. + Use parentheses to disambiguate last part of the condition. * w32fns.c (w32_wnd_proc): Remove temporary code used to trap assertion violations. (Bug#14062) === modified file 'src/callint.c' --- src/callint.c 2013-04-27 21:12:17 +0000 +++ src/callint.c 2013-05-04 19:27:41 +0000 @@ -733,12 +733,12 @@ break; case 'x': /* Lisp expression read but not evaluated. */ - args[i] = Fread_minibuffer (callint_message, Qnil); + args[i] = call1 (intern ("read-minibuffer"), callint_message); visargs[i] = last_minibuf_string; break; case 'X': /* Lisp expression read and evaluated. */ - args[i] = Feval_minibuffer (callint_message, Qnil); + args[i] = call1 (intern ("eval-minibuffer"), callint_message); visargs[i] = last_minibuf_string; break; === modified file 'src/lread.c' --- src/lread.c 2013-04-02 01:54:56 +0000 +++ src/lread.c 2013-05-04 19:27:41 +0000 @@ -1976,7 +1976,9 @@ if (EQ (stream, Qt)) stream = Qread_char; if (EQ (stream, Qread_char)) - return Fread_minibuffer (build_string ("Lisp expression: "), Qnil); + /* FIXME: ¿¡ When is this used !? */ + return call1 (intern ("read-minibuffer"), + build_string ("Lisp expression: ")); return read_internal_start (stream, Qnil, Qnil); } === modified file 'src/minibuf.c' --- src/minibuf.c 2013-04-16 02:39:47 +0000 +++ src/minibuf.c 2013-05-04 19:27:41 +0000 @@ -986,34 +986,6 @@ return val; } -DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, - doc: /* Return a Lisp object read using the minibuffer, unevaluated. -Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS -is a string to insert in the minibuffer before reading. -\(INITIAL-CONTENTS can also be a cons of a string and an integer. -Such arguments are used as in `read-from-minibuffer'.) */) - (Lisp_Object prompt, Lisp_Object initial_contents) -{ - CHECK_STRING (prompt); - return read_minibuf (Vminibuffer_local_map, initial_contents, - prompt, 1, Qminibuffer_history, - make_number (0), Qnil, 0, 0); -} - -DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, - doc: /* Return value of Lisp expression read using the minibuffer. -Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS -is a string to insert in the minibuffer before reading. -\(INITIAL-CONTENTS can also be a cons of a string and an integer. -Such arguments are used as in `read-from-minibuffer'.) */) - (Lisp_Object prompt, Lisp_Object initial_contents) -{ - return Feval (read_minibuf (Vread_expression_map, initial_contents, - prompt, 1, Qread_expression_history, - make_number (0), Qnil, 0, 0), - Qnil); -} - /* Functions that use the minibuffer to read various things. */ DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, @@ -2137,15 +2109,9 @@ Vminibuffer_prompt_properties = Fcons (intern_c_string ("read-only"), Fcons (Qt, Qnil)); - DEFVAR_LISP ("read-expression-map", Vread_expression_map, - doc: /* Minibuffer keymap used for reading Lisp expressions. */); - Vread_expression_map = Qnil; - defsubr (&Sactive_minibuffer_window); defsubr (&Sset_minibuffer_window); defsubr (&Sread_from_minibuffer); - defsubr (&Seval_minibuffer); - defsubr (&Sread_minibuffer); defsubr (&Sread_string); defsubr (&Sread_command); defsubr (&Sread_variable); ------------------------------------------------------------ revno: 112447 fixes bug: http://debbugs.gnu.org/14062 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-05-04 13:19:13 +0300 message: Fix bug #14062 with assertion violations on MS-Windows. src/dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that w->contents is a buffer before computing everything else. Use parentheses to disambiguate last part of the condition. src/w32fns.c (w32_wnd_proc): Remove temporary code used to trap assertion violations. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-01 07:02:19 +0000 +++ src/ChangeLog 2013-05-04 10:19:13 +0000 @@ -1,3 +1,12 @@ +2013-05-04 Eli Zaretskii + + * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that + w->contents is a buffer before computing everything else. Use + parentheses to disambiguate last part of the condition. + + * w32fns.c (w32_wnd_proc): Remove temporary code used to trap + assertion violations. (Bug#14062) + 2013-05-01 David Reitter * nsfns.m (ns_tooltip): Initialize. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-04-28 13:11:16 +0000 +++ src/dispextern.h 2013-05-04 10:19:13 +0000 @@ -1423,13 +1423,14 @@ /* Value is true if window W wants a header line. */ #define WINDOW_WANTS_HEADER_LINE_P(W) \ - (!MINI_WINDOW_P ((W)) \ - && !(W)->pseudo_window_p \ - && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ - && BUFFERP ((W)->contents) \ - && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \ - && WINDOW_TOTAL_LINES (W) > 1 \ - + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format))) + (BUFFERP ((W)->contents) \ + ? (!MINI_WINDOW_P ((W)) \ + && !(W)->pseudo_window_p \ + && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ + && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \ + && WINDOW_TOTAL_LINES (W) > \ + (1 + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))) \ + : 0) /* Return proper value to be used as baseline offset of font that has ASCENT and DESCENT to draw characters by the font at the vertical === modified file 'src/w32fns.c' --- src/w32fns.c 2013-04-20 07:32:31 +0000 +++ src/w32fns.c 2013-05-04 10:19:13 +0000 @@ -3183,28 +3183,8 @@ form.ptCurrentPos.y = w32_system_caret_y; form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0); - -#ifdef ENABLE_CHECKING - /* Temporary code to catch crashes in computing form.rcArea.top. */ - eassert (FRAMEP (w->frame)); - eassert (BUFFERP (w->contents)); - { - int wmbp = WINDOW_MENU_BAR_P (w); - int wtbp = WINDOW_TOOL_BAR_P (w); - struct frame *wf = WINDOW_XFRAME (w); - int fibw = FRAME_INTERNAL_BORDER_WIDTH (wf); - int wtel = WINDOW_TOP_EDGE_LINE (w); - int wflh = FRAME_LINE_HEIGHT (wf); - int wwhlp= WINDOW_WANTS_HEADER_LINE_P (w); - int chlh = CURRENT_HEADER_LINE_HEIGHT (w); - int whlh = (wwhlp ? chlh : 0); - - form.rcArea.top = ((wmbp || wtbp) ? 0 : fibw) + wtel * wflh + whlh; - } -#else form.rcArea.top = (WINDOW_TOP_EDGE_Y (w) + WINDOW_HEADER_LINE_HEIGHT (w)); -#endif form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w) - WINDOW_RIGHT_MARGIN_WIDTH (w) - WINDOW_RIGHT_FRINGE_WIDTH (w)); ------------------------------------------------------------ revno: 112446 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-03 15:52:17 +0800 message: * progmodes/octave.el (user-error): Alias to error if not defined. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-03 07:22:26 +0000 +++ lisp/ChangeLog 2013-05-03 07:52:17 +0000 @@ -8,6 +8,7 @@ (octave-help-file, octave-help-function): New button types. (octave-help): New command and bind it to C-h ;. (octave-find-definition): New command and bind it to M-. + (user-error): Alias to error if not defined. 2013-05-02 Leo Liu === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-03 07:22:26 +0000 +++ lisp/progmodes/octave.el 2013-05-03 07:52:17 +0000 @@ -36,6 +36,9 @@ ;;; For emacs < 24.3. (require 'newcomment) +(eval-and-compile + (unless (fboundp 'user-error) + (defalias 'user-error 'error))) (eval-when-compile (unless (fboundp 'setq-local) (defmacro setq-local (var val)