Now on revision 113244. ------------------------------------------------------------ revno: 113244 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-07-01 05:01:42 +0000 message: lisp/Changelog: Typo fix diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-01 05:00:50 +0000 +++ lisp/ChangeLog 2013-07-01 05:01:42 +0000 @@ -1,4 +1,4 @@ -2013-01-07 Katsumi Yamaoka +2013-07-01 Katsumi Yamaoka * wid-edit.el (widget-default-get): Don't modify widget (Bug#14738). ------------------------------------------------------------ revno: 113243 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-07-01 05:00:50 +0000 message: wid-edit.el (widget-default-get): Don't modify widget (Bug#14738) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-01 03:29:46 +0000 +++ lisp/ChangeLog 2013-07-01 05:00:50 +0000 @@ -1,3 +1,7 @@ +2013-01-07 Katsumi Yamaoka + + * wid-edit.el (widget-default-get): Don't modify widget (Bug#14738). + 2013-07-01 Juanma Barranquero * desktop.el (desktop-restore-frames): Rename from desktop-save-windows. === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2013-01-07 11:24:35 +0000 +++ lisp/wid-edit.el 2013-07-01 05:00:50 +0000 @@ -528,6 +528,7 @@ (or (widget-get widget :value) (progn (when (widget-get widget :args) + (setq widget (widget-copy widget)) (let (args) (dolist (arg (widget-get widget :args)) (setq args (append args ------------------------------------------------------------ revno: 113242 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-07-01 05:29:46 +0200 message: lisp/desktop.el: More fixes to frame restoration. (desktop-restore-frames): Rename from desktop-save-windows. (desktop-restore-in-current-display): New customization option. (desktop--excluded-frame-parameters): Add `font'. (desktop--save-frames): Rename from desktop--save-windows. (desktop--restore-in-this-display-p): New function. (desktop--make-full-frame): Remove unwanted width/height from full(width|height) frames. (desktop--restore-frames): Rename from desktop--restore-windows. Obey desktop-restore-current-display. Do not delete old frames or select a new frame unless we were able to restore at least one frame. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-06-30 22:29:23 +0000 +++ etc/NEWS 2013-07-01 03:29:46 +0000 @@ -252,7 +252,7 @@ *** `desktop-auto-save-timeout' defines the number of seconds between auto-saves of the desktop. -*** `desktop-save-windows' enables saving and restoring the window/frame +*** `desktop-restore-frames enables saving and restoring the window/frame configuration. ** Dired === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-01 00:19:15 +0000 +++ lisp/ChangeLog 2013-07-01 03:29:46 +0000 @@ -1,3 +1,16 @@ +2013-07-01 Juanma Barranquero + + * desktop.el (desktop-restore-frames): Rename from desktop-save-windows. + (desktop-restore-in-current-display): New customization option. + (desktop--excluded-frame-parameters): Add `font'. + (desktop--save-frames): Rename from desktop--save-windows. + (desktop--restore-in-this-display-p): New function. + (desktop--make-full-frame): Remove unwanted width/height from + full(width|height) frames. + (desktop--restore-frames): Rename from desktop--restore-windows. + Obey desktop-restore-current-display. Do not delete old frames or + select a new frame unless we were able to restore at least one frame. + 2013-06-30 Michal Nazarewicz * files.el (find-file-noselect): Simplify conditional expression. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-06-30 05:08:23 +0000 +++ lisp/desktop.el 2013-07-01 03:29:46 +0000 @@ -371,12 +371,19 @@ :type '(repeat symbol) :group 'desktop) -(defcustom desktop-save-windows nil +(defcustom desktop-restore-frames nil "When non-nil, save window/frame configuration to desktop file." :type 'boolean :group 'desktop :version "24.4") +(defcustom desktop-restore-in-current-display nil + "When non-nil, frames are restored in the current display. +Otherwise they are restored, if possible, in their original displays." + :type 'boolean + :group 'desktop + :version "24.4") + (defcustom desktop-file-name-format 'absolute "Format in which desktop file names should be saved. Possible values are: @@ -872,6 +879,7 @@ buffer-predicate buried-buffer-list explicit-name + font font-backend minibuffer name @@ -891,12 +899,12 @@ (push param params))) params)) -(defun desktop--save-windows () +(defun desktop--save-frames () "Save window/frame state, as a global variable. Intended to be called from `desktop-save'. Internal use only." (setq desktop--saved-states - (and desktop-save-windows + (and desktop-restore-frames (mapcar (lambda (frame) (cons (desktop--filter-frame-parms frame) (window-state-get (frame-root-window frame) t))) @@ -944,7 +952,7 @@ (insert "\n;; Global section:\n") ;; Called here because we save the window/frame state as a global ;; variable for compatibility with previous Emacsen. - (desktop--save-windows) + (desktop--save-frames) (mapc (function desktop-outvar) desktop-globals-to-save) (when (memq 'kill-ring desktop-globals-to-save) (insert @@ -1003,6 +1011,10 @@ (defvar desktop-lazy-timer nil) ;; ---------------------------------------------------------------------------- +(defun desktop--restore-in-this-display-p () + (or desktop-restore-in-current-display + (and (eq system-type 'windows-nt) (not (display-graphic-p))))) + (defun desktop--find-frame-in-display (frames display) (let (result) (while (and frames (not result)) @@ -1017,47 +1029,53 @@ (params '((visibility))) frame) (when width - (setq params (append `((user-size . t) (width . ,width)) params))) + (setq params (append `((user-size . t) (width . ,width)) params) + config (assq-delete-all 'height config))) (when height - (setq params (append `((user-size . t) (height . ,height)) params))) + (setq params (append `((user-size . t) (height . ,height)) params) + config (assq-delete-all 'width config))) (setq frame (make-frame-on-display display params)) (modify-frame-parameters frame config) frame)) -(defun desktop--restore-windows () +(defun desktop--restore-frames () "Restore window/frame configuration. Internal use only." - (when (and desktop-save-windows desktop--saved-states) + (when (and desktop-restore-frames desktop--saved-states) (let ((frames (frame-list)) + (current (frame-parameter nil 'display)) (selected nil)) (dolist (state desktop--saved-states) (condition-case err - (let* ((fconfig (car state)) - (display (cdr (assq 'display fconfig))) - (full (cdr (assq 'fullscreen fconfig))) + (let* ((config (car state)) + (display (if (desktop--restore-in-this-display-p) + (setcdr (assq 'display config) current) + (cdr (assq 'display config)))) + (full (cdr (assq 'fullscreen config))) (frame (and (not full) (desktop--find-frame-in-display frames display)))) (cond (full ;; treat fullscreen/maximized frames specially - (setq frame (desktop--make-full-frame full display fconfig))) + (setq frame (desktop--make-full-frame full display config))) (frame ;; found a frame in the right display -- reuse (setq frames (delq frame frames)) - (modify-frame-parameters frame fconfig)) + (modify-frame-parameters frame config)) (t ;; no frames in the display -- make a new one - (setq frame (make-frame-on-display display fconfig)))) + (setq frame (make-frame-on-display display config)))) ;; restore windows (window-state-put (cdr state) (frame-root-window frame) 'safe) (unless selected (setq selected frame))) (error (message "Error restoring frame: %S" (error-message-string err))))) - ;; make sure the original selected frame is visible and selected - (unless (or (frame-parameter selected 'visibility) (daemonp)) - (modify-frame-parameters selected '((visibility . t)))) - (select-frame-set-input-focus selected) - ;; delete any remaining frames - (mapc #'delete-frame frames)))) + (when selected + ;; make sure the original selected frame is visible and selected + (unless (or (frame-parameter selected 'visibility) (daemonp)) + (modify-frame-parameters selected '((visibility . t)))) + (select-frame-set-input-focus selected) + ;; delete any remaining frames + (mapc #'delete-frame frames))))) ;;;###autoload (defun desktop-read (&optional dirname) @@ -1127,7 +1145,7 @@ (switch-to-buffer (car (buffer-list))) (run-hooks 'desktop-delay-hook) (setq desktop-delay-hook nil) - (desktop--restore-windows) + (desktop--restore-frames) (run-hooks 'desktop-after-read-hook) (message "Desktop: %d buffer%s restored%s%s." desktop-buffer-ok-count ------------------------------------------------------------ revno: 113241 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-07-01 02:19:15 +0200 message: lisp/ChangeLog: Fix typo. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-01 00:09:45 +0000 +++ lisp/ChangeLog 2013-07-01 00:19:15 +0000 @@ -42,8 +42,8 @@ (desktop--make-full-frame): New function. (desktop--restore-windows): Try to re-select the frame that was selected upon saving. Do not abort if some frames fail to restore, - just show an error message and contnue. Set up maximized frames so - they have default non-maximized dimensions. + just show an error message and continue. Set up maximized frames + so they have default non-maximized dimensions. 2013-06-30 Dmitry Gutov ------------------------------------------------------------ revno: 113240 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-06-30 17:09:45 -0700 message: ChangeLog fix diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 22:29:23 +0000 +++ lisp/ChangeLog 2013-07-01 00:09:45 +0000 @@ -2900,9 +2900,9 @@ * faces.el (internal-face-x-get-resource): * frame.el (ns-display-monitor-attributes-list): - * calc/calc-aent.el (math-to-radians-2): Fix declarations. - + * calc/calc-aent.el (math-to-radians-2): * emacs-lisp/package.el (tar-header-name, tar-header-link-type): + Fix declarations. * calc/calc-menu.el: Make it loadable in isolation. ------------------------------------------------------------ revno: 113239 author: Michal Nazarewicz committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-06-30 18:29:23 -0400 message: Add `remember-notes' function to store random notes across Emacs restarts. * remember.el (remember-data-file): Add :set callback to affect notes buffer (if any). (remember-notes): New command. (remember-notes-buffer-name, bury-remember-notes-on-kill): New defcustoms for the `remember-notes' function. (remember-notes-save-and-bury-buffer): New command. (remember-notes-mode-map): New variable. (remember-mode): New minor mode. (remember-notes--kill-buffer-query): New function. * lisp/startup.el (initial-buffer-choice): Add notes to custom type. * src/buffer.c (FKill_buffer): Run `kill-buffer-query-functions' before checking whether buffer is modified. This lets `kill-buffer-query-functions' cancel killing of the buffer or save its content before `kill-buffer' asks user the "Buffer %s modified; kill anyway?" question. * remember.el (remember-append-to-file): Don't mix `find-buffer-visiting' and `get-file-buffer'. * lisp/files.el (find-file-noselect): Simplify conditional expression. diff: === modified file 'doc/lispref/buffers.texi' --- doc/lispref/buffers.texi 2013-06-29 03:24:22 +0000 +++ doc/lispref/buffers.texi 2013-06-30 22:29:23 +0000 @@ -1065,7 +1065,7 @@ @end deffn @defvar kill-buffer-query-functions -After confirming unsaved changes, @code{kill-buffer} calls the functions +Before confirming unsaved changes, @code{kill-buffer} calls the functions in the list @code{kill-buffer-query-functions}, in order of appearance, with no arguments. The buffer being killed is the current buffer when they are called. The idea of this feature is that these functions will === modified file 'etc/NEWS' --- etc/NEWS 2013-06-30 15:10:33 +0000 +++ etc/NEWS 2013-06-30 22:29:23 +0000 @@ -90,6 +90,14 @@ ** `initial-buffer-choice' can now specify a function to set up the initial buffer. +** `remember-notes' creates a buffer whose content is saved on kill-emacs. +You may think of it as a *scratch* buffer whose content is preserved. +In fact, it was designed as a replacement for *scratch* buffer and can +be used that way by setting `initial-buffer-choice' to `remember-notes' +and `remember-notes-buffer-name' to "*scratch*". Without the second +change, *scratch* buffer will still be there for notes that do not +need to be preserved. + ** `write-region-inhibit-fsync' now defaults to t in batch mode. ** ACL support has been added. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 14:49:33 +0000 +++ lisp/ChangeLog 2013-06-30 22:29:23 +0000 @@ -1,18 +1,37 @@ +2013-06-30 Michal Nazarewicz + + * files.el (find-file-noselect): Simplify conditional expression. + + * remember.el (remember-append-to-file): + Don't mix `find-buffer-visiting' and `get-file-buffer'. + + Add `remember-notes' function to store random notes across Emacs + restarts. + * remember.el (remember-data-file): Add :set callback to affect + notes buffer (if any). + (remember-notes): New command. + (remember-notes-buffer-name, bury-remember-notes-on-kill): + New defcustoms for the `remember-notes' function. + (remember-notes-save-and-bury-buffer): New command. + (remember-notes-mode-map): New variable. + (remember-mode): New minor mode. + (remember-notes--kill-buffer-query): New function. + * startup.el (initial-buffer-choice): Add notes to custom type. + 2013-06-30 Eli Zaretskii * bindings.el (right-char, left-char): Don't call sit-for, this is no longer needed. Use arithmetic comparison only for numerical arguments. - * international/mule-cmds.el (select-safe-coding-system): Handle - the case of FROM being a string correctly. (Bug#14755) + * international/mule-cmds.el (select-safe-coding-system): + Handle the case of FROM being a string correctly. (Bug#14755) 2013-06-30 Lars Magne Ingebrigtsen * net/shr.el (shr-make-table-1): Add a sanity check that allows progression on degenerate tables. - (shr-rescale-image): ImageMagick animated images currently doesn't - work. + (shr-rescale-image): ImageMagick animated images currently don't work. 2013-06-30 Juanma Barranquero @@ -28,8 +47,8 @@ 2013-06-30 Dmitry Gutov - * progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't - start heredoc inside a string or comment. + * progmodes/ruby-mode.el (ruby-syntax-propertize-function): + Don't start heredoc inside a string or comment. 2013-06-29 Eli Zaretskii @@ -80,7 +99,7 @@ 2013-06-27 Lars Magne Ingebrigtsen - * net/shr.el (add-face-text-property): Removed compat definition. + * net/shr.el (add-face-text-property): Remove compat definition. 2013-06-27 Stephen Berman === modified file 'lisp/files.el' --- lisp/files.el 2013-05-21 07:25:14 +0000 +++ lisp/files.el 2013-06-30 22:29:23 +0000 @@ -1859,13 +1859,12 @@ (setq buffer-read-only read-only))) (setq buffer-file-read-only read-only)) - (when (and (not (eq (not (null rawfile)) - (not (null find-file-literally)))) - (not nonexistent) - ;; It is confusing to ask whether to visit - ;; non-literally if they have the file in - ;; hexl-mode or image-mode. - (not (memq major-mode '(hexl-mode image-mode)))) + (unless (or (eq (null rawfile) (null find-file-literally)) + nonexistent + ;; It is confusing to ask whether to visit + ;; non-literally if they have the file in + ;; hexl-mode or image-mode. + (memq major-mode '(hexl-mode image-mode))) (if (buffer-modified-p) (if (y-or-n-p (format === modified file 'lisp/startup.el' --- lisp/startup.el 2013-06-17 15:33:52 +0000 +++ lisp/startup.el 2013-06-30 22:29:23 +0000 @@ -53,7 +53,8 @@ (const :tag "Startup screen" nil) (directory :tag "Directory" :value "~/") (file :tag "File" :value "~/.emacs") - (function :tag "Function") + (const :tag "Notes buffer" remember-notes) + (function :tag "Function") (const :tag "Lisp scratch buffer" t)) :version "24.4" :group 'initialization) === modified file 'lisp/textmodes/remember.el' --- lisp/textmodes/remember.el 2013-05-09 01:40:20 +0000 +++ lisp/textmodes/remember.el 2013-06-30 22:29:23 +0000 @@ -382,8 +382,18 @@ ;; Remembering to plain files (defcustom remember-data-file (locate-user-emacs-file "notes" ".notes") - "The file in which to store unprocessed data." + "The file in which to store unprocessed data. +When set via customize, visited file of the notes buffer (if it +exists) might be changed." :type 'file + :set (lambda (symbol value) + (let ((buf (find-buffer-visiting (default-value symbol)))) + (set-default symbol value) + (when (buffer-live-p buf) + (with-current-buffer buf + (set-visited-file-name + (expand-file-name remember-data-file)))))) + :initialize 'custom-initialize-default :group 'remember) (defcustom remember-leader-text "** " @@ -393,21 +403,20 @@ (defun remember-append-to-file () "Remember, with description DESC, the given TEXT." - (let ((text (buffer-string)) - (desc (remember-buffer-desc))) - (with-temp-buffer - (insert "\n" remember-leader-text (current-time-string) - " (" desc ")\n\n" text) - (if (not (bolp)) - (insert "\n")) - (if (find-buffer-visiting remember-data-file) - (let ((remember-text (buffer-string))) - (set-buffer (get-file-buffer remember-data-file)) - (save-excursion - (goto-char (point-max)) - (insert remember-text) - (when remember-save-after-remembering (save-buffer)))) - (append-to-file (point-min) (point-max) remember-data-file))))) + (let* ((text (buffer-string)) + (desc (remember-buffer-desc)) + (remember-text (concat "\n" remember-leader-text (current-time-string) + " (" desc ")\n\n" text + (save-excursion (goto-char (point-max)) + (if (bolp) nil "\n")))) + (buf (find-buffer-visiting remember-data-file))) + (if buf + (with-current-buffer buf + (save-excursion + (goto-char (point-max)) + (insert remember-text)) + (if remember-save-after-remembering (save-buffer))) + (append-to-file remember-text nil remember-data-file)))) (defun remember-region (&optional beg end) "Remember the data from BEG to END. @@ -551,4 +560,96 @@ \\{remember-mode-map}" (set-keymap-parent remember-mode-map nil)) +;; Notes buffer showing the notes: + +(defcustom remember-notes-buffer-name "*notes*" + "Name of the notes buffer. +Setting it to *scratch* will hijack the *scratch* buffer for the +purpose of storing notes." + :type 'string + :version "24.4") + +(defcustom remember-notes-initial-major-mode nil + "Major mode to set to notes buffer when it's created. +If set to nil will use the same mode as `initial-major-mode'." + :type '(choice (const :tag "Same as `initial-major-mode'" nil) + (function :tag "Major mode" text-mode)) + :version "24.4") + +(defcustom remember-notes-bury-on-kill t + "Whether to bury notes buffer instead of killing." + :type 'boolean + :version "24.4") + +(defun remember-notes-save-and-bury-buffer () + "Saves and buries current buffer. +Buffer is saved only if `buffer-modified-p' returns non-nil." + (interactive) + (when (buffer-modified-p) + (save-buffer)) + (bury-buffer)) + + + +(defvar remember-notes-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'remember-notes-save-and-bury-buffer) + map) + "Keymap used in remember-notes mode.") + +(define-minor-mode remember-notes-mode + "Minor mode for the `remember-notes' buffer." + nil nil nil + (cond + (remember-notes-mode + (add-hook 'kill-buffer-query-functions + #'remember-notes--kill-buffer-query nil t) + (setq buffer-save-without-query t)))) + +;;;###autoload +(defun remember-notes (&optional switch-to) + "Creates notes buffer and switches to it if called interactively. + +If a notes buffer created by a previous invocation of this +function already exist, it will be returned. Otherwise a new +buffer will be created whose content will be read from file +pointed by `remember-data-file'. If a buffer visiting this file +already exist, that buffer will be used instead of creating a new +one (see `find-file-noselect' function for more details). + +Name of the created buffer is taken from `remember-notes-buffer-name' +variable and if a buffer with that name already exist (but was not +created by this function), it will be first killed. +\\ +`remember-notes-mode' is active in the notes buffer which by default +contains only one \\[save-and-bury-buffer] binding which saves and +buries the buffer. + +Function returns notes buffer. When called interactively, +switches to it as well. + +Notes buffer is meant for keeping random notes which you'd like to +preserve across Emacs restarts. The notes will be stored in the +`remember-data-file'." + (interactive "p") + (let ((buf (or (find-buffer-visiting remember-data-file) + (with-current-buffer (find-file-noselect remember-data-file) + (and remember-notes-buffer-name + (not (get-buffer remember-notes-buffer-name)) + (rename-buffer remember-notes-buffer-name)) + (funcall (or remember-notes-initial-major-mode + initial-major-mode)) + (remember-notes-mode 1) + (current-buffer))))) + (when switch-to + (switch-to-buffer buf)) + buf)) + +(defun remember-notes--kill-buffer-query () + (when (buffer-modified-p) + (save-buffer)) + (if remember-notes-bury-on-kill + (bury-buffer) + t)) + ;;; remember.el ends here === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 16:38:26 +0000 +++ src/ChangeLog 2013-06-30 22:29:23 +0000 @@ -1,3 +1,11 @@ +2013-06-30 Michal Nazarewicz + + * buffer.c (FKill_buffer): Run `kill-buffer-query-functions' + before checking whether buffer is modified. This lets + `kill-buffer-query-functions' cancel killing of the buffer or save + its content before `kill-buffer' asks user the "Buffer %s + modified; kill anyway?" question. + 2013-06-30 Jan Djärv * nsfns.m (handlePanelKeys): Don't process Command+Function keys. @@ -59,6 +67,24 @@ :prefer-utf-8. (syms_of_coding): Adjust for coding_arg_undecided_max. +2013-06-28 Kenichi Handa + + * coding.h (define_coding_undecided_arg_index): New enum. + (coding_attr_index): New members + coding_attr_undecided_inhibit_null_byte_detection, + coding_attr_undecided_inhibit_iso_escape_detection, + coding_attr_undecided_prefer_utf_8. + (undecided_spec): New struct. + (struct coding_system): New member `undecided' of the member `spec'. + + * coding.c (setup_coding_system): Handle CODING->spec.undecided. + (detect_coding): Likewise. + (detect_coding_system): Likewise. + (Fdefine_coding_system_internal): New coding system properties + :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and + :prefer-utf-8. + (syms_of_coding): Adjust for coding_arg_undecided_max. + 2013-06-28 Paul Eggert * image.c (x_from_xcolors): Remove unused local. @@ -75,8 +101,8 @@ (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p', `mask_p', and `colors_p'. All uses changed. (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'. - (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS): New - macros for `flags' arg to x_clear_image_1. + (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS): + New macros for `flags' arg to x_clear_image_1. (postprocess_image, xpm_load_image, x_build_heuristic_mask) (png_load_body): Use x_clear_image_1 instead of Free_Pixmap. (ZPixmap, XGetImage) [HAVE_NS]: Remove. @@ -343,7 +369,7 @@ * textprop.c (property_set_type): New enum. (add_properties): Allow appending/prepending text properties. (add_text_properties_1): Factored out of Fadd_text_properties. - (Fadd_text_properties): Moved all the code into + (Fadd_text_properties): Move all the code into add_text_properties_1. (Fadd_face_text_property): New function that calls add_text_properties_1. @@ -914,7 +940,7 @@ (Fxw_color_values): Use EmacsCGFloat (Fns_display_monitor_attributes_list): Only get screen number for Cocoa. - (getDirectory, getFilename): Removed from EmacsOpenPanel and + (getDirectory, getFilename): Remove from EmacsOpenPanel and EmacsSavePanel. (EmacsOpenPanel:ok:): Use ns_filename_from_panel and ns_directory_from_panel. === modified file 'src/buffer.c' --- src/buffer.c 2013-06-17 06:03:19 +0000 +++ src/buffer.c 2013-06-30 22:29:23 +0000 @@ -1734,18 +1734,6 @@ if (!BUFFER_LIVE_P (b)) return Qnil; - /* Query if the buffer is still modified. */ - if (INTERACTIVE && !NILP (BVAR (b, filename)) - && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) - { - GCPRO1 (buffer); - tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", - BVAR (b, name), make_number (0))); - UNGCPRO; - if (NILP (tem)) - return Qnil; - } - /* Run hooks with the buffer to be killed the current buffer. */ { ptrdiff_t count = SPECPDL_INDEX (); @@ -1761,6 +1749,22 @@ if (NILP (tem)) return unbind_to (count, Qnil); + /* Query if the buffer is still modified. */ + if (INTERACTIVE && !NILP (BVAR (b, filename)) + && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) + { + GCPRO1 (buffer); + tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", + BVAR (b, name), make_number (0))); + UNGCPRO; + if (NILP (tem)) + return unbind_to (count, Qnil); + } + + /* If the hooks have killed the buffer, exit now. */ + if (!BUFFER_LIVE_P (b)) + return unbind_to (count, Qt); + /* Then run the hooks. */ Frun_hooks (1, &Qkill_buffer_hook); unbind_to (count, Qnil); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-06-30 15:10:33 +0000 +++ src/xdisp.c 2013-06-30 22:29:23 +0000 @@ -20110,7 +20110,7 @@ w->cursor.vpos = -1; return make_number (PT); } - else if (!INTEGERP (g->object) && g->object != gpt->object) + else if (!INTEGERP (g->object) && !EQ (g->object, gpt->object)) { ptrdiff_t new_pos; ------------------------------------------------------------ revno: 113238 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-06-30 14:53:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-06-24 10:17:44 +0000 +++ autogen/configure 2013-06-30 18:53:36 +0000 @@ -11303,6 +11303,7 @@ HAVE_GTK=no GTK_OBJ= +gtk_term_header=$term_header check_gtk2=no gtk3_pkg_errors= if test "${opsys}" != "mingw32"; then @@ -11370,7 +11371,7 @@ $as_echo "#define HAVE_GTK3 1" >>confdefs.h GTK_OBJ=emacsgtkfixed.o - term_header=gtkutil.h + gtk_term_header=gtkutil.h USE_GTK_TOOLKIT="GTK3" if test "x$ac_enable_gtk_deprecation_warnings" = x; then GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" @@ -11467,6 +11468,7 @@ done if test "${GTK_COMPILES}" != "yes"; then + GTK_OBJ= if test "$USE_X_TOOLKIT" != "maybe"; then as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; fi @@ -11476,6 +11478,7 @@ $as_echo "#define USE_GTK 1" >>confdefs.h GTK_OBJ="gtkutil.o $GTK_OBJ" + term_header=$gtk_term_header USE_X_TOOLKIT=none if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then : ------------------------------------------------------------ revno: 113237 fixes bug: http://debbugs.gnu.org/14747 committer: Jan D. branch nick: trunk timestamp: Sun 2013-06-30 18:38:26 +0200 message: * nsfns.m (handlePanelKeys): Don't process Command+Function keys. Let the super performKeyEquivalent deal with them. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 16:14:22 +0000 +++ src/ChangeLog 2013-06-30 16:38:26 +0000 @@ -1,3 +1,8 @@ +2013-06-30 Jan Djärv + + * nsfns.m (handlePanelKeys): Don't process Command+Function keys. + Let the super performKeyEquivalent deal with them (Bug#14747). + 2013-06-30 Paul Eggert * widget.c (resize_cb): Remove unused local. === modified file 'src/nsfns.m' --- src/nsfns.m 2013-06-02 19:14:25 +0000 +++ src/nsfns.m 2013-06-30 16:38:26 +0000 @@ -2705,8 +2705,14 @@ case NSPageUpFunctionKey: case NSPageDownFunctionKey: case NSEndFunctionKey: - [panel sendEvent: theEvent]; - ret = YES; + /* Don't send command modified keys, as those are handled in the + performKeyEquivalent method of the super class. + */ + if (! ([theEvent modifierFlags] & NSCommandKeyMask)) + { + [panel sendEvent: theEvent]; + ret = YES; + } break; /* As we don't have the standard key commands for copy/paste/cut/select-all in our edit menu, we must handle ------------------------------------------------------------ revno: 113236 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-06-30 09:14:22 -0700 message: Fix minor problems found by static checking. * lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): * lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): * lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: Now const. * src/widget.c (resize_cb): Remove unused local. diff: === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2013-06-19 20:10:57 +0000 +++ lwlib/ChangeLog 2013-06-30 16:14:22 +0000 @@ -1,3 +1,11 @@ +2013-06-30 Paul Eggert + + Fix minor problems found by static checking. + * lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): + * lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): + * lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: + Now const. + 2012-10-06 Ulrich Müller * Makefile.in (AR, ARFLAGS): Get values from configure. === modified file 'lwlib/lwlib-Xaw.h' --- lwlib/lwlib-Xaw.h 2011-01-15 23:16:57 +0000 +++ lwlib/lwlib-Xaw.h 2013-06-30 16:14:22 +0000 @@ -15,16 +15,17 @@ xaw_update_one_widget (widget_instance *, Widget, widget_value *, Boolean); void -xaw_update_one_value (widget_instance *, Widget, widget_value *); +xaw_update_one_value (widget_instance *, Widget, widget_value *) + ATTRIBUTE_CONST; void xaw_destroy_instance (widget_instance *); void -xaw_popup_menu (Widget, XEvent *); +xaw_popup_menu (Widget, XEvent *) + ATTRIBUTE_CONST; void xaw_pop_instance (widget_instance *, Boolean); #endif /* LWLIB_XAW_H */ - === modified file 'lwlib/lwlib-Xlw.h' --- lwlib/lwlib-Xlw.h 2011-01-15 23:16:57 +0000 +++ lwlib/lwlib-Xlw.h 2013-06-30 16:14:22 +0000 @@ -15,16 +15,17 @@ void xlw_update_one_value (widget_instance* instance, Widget widget, - widget_value* val); + widget_value* val) + ATTRIBUTE_CONST; void xlw_destroy_instance (widget_instance* instance); void -xlw_pop_instance (widget_instance* instance, Boolean up); +xlw_pop_instance (widget_instance* instance, Boolean up) + ATTRIBUTE_CONST; void xlw_popup_menu (Widget widget, XEvent * event); #endif /* LWLIB_XLW_H */ - === modified file 'lwlib/lwlib.h' --- lwlib/lwlib.h 2013-01-01 09:11:05 +0000 +++ lwlib/lwlib.h 2013-06-30 16:14:22 +0000 @@ -171,9 +171,15 @@ Boolean lw_window_is_in_menubar (Window win, Widget menubar_widget); /* Manage resizing: TRUE permits resizing widget w; FALSE disallows it. */ +#ifndef USE_MOTIF +ATTRIBUTE_CONST +#endif void lw_allow_resizing (Widget w, Boolean flag); /* Set up the main window. */ +#ifndef USE_MOTIF +ATTRIBUTE_CONST +#endif void lw_set_main_areas (Widget parent, Widget menubar, Widget work_area); === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 15:33:01 +0000 +++ src/ChangeLog 2013-06-30 16:14:22 +0000 @@ -1,5 +1,7 @@ 2013-06-30 Paul Eggert + * widget.c (resize_cb): Remove unused local. + Do not use GTK 3 if it exists but cannot be compiled. * xmenu.c (x_menu_wait_for_event) [!USE_GTK]: * xterm.c (x_error_handler) [!USE_GTK]: === modified file 'src/widget.c' --- src/widget.c 2013-01-02 16:13:04 +0000 +++ src/widget.c 2013-06-30 16:14:22 +0000 @@ -656,7 +656,6 @@ XEvent* event, Boolean* continue_to_dispatch) { - EmacsFrame ew = (EmacsFrame) widget; EmacsFrameResize (widget); } ------------------------------------------------------------ revno: 113235 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-06-30 08:33:01 -0700 message: Remove duplicate ChangeLog entry. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 15:24:14 +0000 +++ src/ChangeLog 2013-06-30 15:33:01 +0000 @@ -50,25 +50,6 @@ (Fdefine_coding_system_internal): New coding system properties :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and :prefer-utf-8. - (syms_of_coding): Adjusted for coding_arg_undecided_max. - -2013-06-28 Kenichi Handa - - * coding.h (define_coding_undecided_arg_index): New enum. - (coding_attr_index): New members - coding_attr_undecided_inhibit_null_byte_detection, - coding_attr_undecided_inhibit_iso_escape_detection, - coding_attr_undecided_prefer_utf_8. - (undecided_spec): New struct. - (struct coding_system): New member `undecided' of the member - `spec'. - - * coding.c (setup_coding_system): Handle CODING->spec.undecided. - (detect_coding): Likewise. - (detect_coding_system): Likewise. - (Fdefine_coding_system_internal): New coding system properties - :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and - :prefer-utf-8. (syms_of_coding): Adjust for coding_arg_undecided_max. 2013-06-28 Paul Eggert ------------------------------------------------------------ revno: 113234 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-06-30 08:24:14 -0700 message: Do not use GTK 3 if it exists but cannot be compiled. * configure.ac: Leave GTK_OBJ and term_header alone if GTK 3 exists but cannot be compiled. * src/xmenu.c (x_menu_wait_for_event) [!USE_GTK]: * src/xterm.c (x_error_handler) [!USE_GTK]: Do not use GTK 3. diff: === modified file 'ChangeLog' --- ChangeLog 2013-06-27 01:40:46 +0000 +++ ChangeLog 2013-06-30 15:24:14 +0000 @@ -1,3 +1,9 @@ +2013-06-30 Paul Eggert + + Do not use GTK 3 if it exists but cannot be compiled. + * configure.ac: Leave GTK_OBJ and term_header alone if GTK 3 + exists but cannot be compiled. + 2013-06-27 Juanma Barranquero * Makefile.in (install-arch-indep): Do not create directories passed === modified file 'configure.ac' --- configure.ac 2013-06-24 06:58:52 +0000 +++ configure.ac 2013-06-30 15:24:14 +0000 @@ -2078,6 +2078,7 @@ HAVE_GTK=no GTK_OBJ= +gtk_term_header=$term_header check_gtk2=no gtk3_pkg_errors= if test "${opsys}" != "mingw32"; then @@ -2094,7 +2095,7 @@ if test "$pkg_check_gtk" = "yes"; then AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) GTK_OBJ=emacsgtkfixed.o - term_header=gtkutil.h + gtk_term_header=gtkutil.h USE_GTK_TOOLKIT="GTK3" if test "x$ac_enable_gtk_deprecation_warnings" = x; then GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" @@ -2133,6 +2134,7 @@ GTK_COMPILES=no AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes) if test "${GTK_COMPILES}" != "yes"; then + GTK_OBJ= if test "$USE_X_TOOLKIT" != "maybe"; then AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]); fi @@ -2140,6 +2142,7 @@ HAVE_GTK=yes AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.]) GTK_OBJ="gtkutil.o $GTK_OBJ" + term_header=$gtk_term_header USE_X_TOOLKIT=none if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then : === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 15:14:45 +0000 +++ src/ChangeLog 2013-06-30 15:24:14 +0000 @@ -1,5 +1,10 @@ 2013-06-30 Paul Eggert + Do not use GTK 3 if it exists but cannot be compiled. + * xmenu.c (x_menu_wait_for_event) [!USE_GTK]: + * xterm.c (x_error_handler) [!USE_GTK]: + Do not use GTK 3. + * intervals.c (get_local_map): Actually clip POSITION (Bug#14753). 2013-06-30 Eli Zaretskii === modified file 'src/xmenu.c' --- src/xmenu.c 2013-04-07 04:41:19 +0000 +++ src/xmenu.c 2013-06-30 15:24:14 +0000 @@ -397,7 +397,7 @@ else ntp = &next_time; -#ifdef HAVE_GTK3 +#if defined USE_GTK && defined HAVE_GTK3 /* Gtk3 have arrows on menus when they don't fit. When the pointer is over an arrow, a timeout scrolls it a bit. Use xg_select so that timeout gets triggered. */ === modified file 'src/xterm.c' --- src/xterm.c 2013-06-05 17:04:13 +0000 +++ src/xterm.c 2013-06-30 15:24:14 +0000 @@ -7824,7 +7824,7 @@ static int x_error_handler (Display *display, XErrorEvent *event) { -#ifdef HAVE_GTK3 +#if defined USE_GTK && defined HAVE_GTK3 if (event->error_code == BadMatch && event->request_code == X_SetInputFocus && event->minor_code == 0) ------------------------------------------------------------ revno: 113233 fixes bug: http://debbugs.gnu.org/14753 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-06-30 08:14:45 -0700 message: * intervals.c (get_local_map): Actually clip POSITION diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 15:03:31 +0000 +++ src/ChangeLog 2013-06-30 15:14:45 +0000 @@ -1,3 +1,7 @@ +2013-06-30 Paul Eggert + + * intervals.c (get_local_map): Actually clip POSITION (Bug#14753). + 2013-06-30 Eli Zaretskii * intervals.c (get_local_map): Instead of aborting, clip POSITION === modified file 'src/intervals.c' --- src/intervals.c 2013-06-30 15:03:31 +0000 +++ src/intervals.c 2013-06-30 15:14:45 +0000 @@ -2199,13 +2199,12 @@ `local-map' use BUFFER's local map. */ Lisp_Object -get_local_map (register ptrdiff_t position, register struct buffer *buffer, - Lisp_Object type) +get_local_map (ptrdiff_t position, struct buffer *buffer, Lisp_Object type) { Lisp_Object prop, lispy_position, lispy_buffer; ptrdiff_t old_begv, old_zv, old_begv_byte, old_zv_byte; - clip_to_bounds (BUF_BEGV (buffer), position, BUF_ZV (buffer)); + position = clip_to_bounds (BUF_BEGV (buffer), position, BUF_ZV (buffer)); /* Ignore narrowing, so that a local map continues to be valid even if the visible region contains no characters and hence no properties. */ ------------------------------------------------------------ revno: 113232 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-06-30 08:10:33 -0700 message: Spelling fixes. diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-06-29 13:36:19 +0000 +++ doc/lispref/display.texi 2013-06-30 15:10:33 +0000 @@ -4656,11 +4656,11 @@ @item :max-width, :max-height The @code{:max-width} and @code{:max-height} keywords are used for scaling if the size of the image of the image exceeds these values. -If @code{:width} is set it will have presedence over @code{max-width}, -and if @code{:height} is set it will have presedence over +If @code{:width} is set it will have precedence over @code{max-width}, +and if @code{:height} is set it will have precedence over @code{max-height}, but you can otherwise mix these keywords as you wish. @code{:max-width} and @code{:max-height} will always preserve -the aspec ratio. +the aspect ratio. @item :rotation Specifies a rotation angle in degrees. === modified file 'etc/NEWS' --- etc/NEWS 2013-06-29 13:36:19 +0000 +++ etc/NEWS 2013-06-30 15:10:33 +0000 @@ -369,7 +369,7 @@ - support for multiple todo files and archive files of done items; - renaming, reordering, moving, merging, and deleting categories; - sortable tabular summaries of categories and the types of items they contain; -- cross-categorial lists of items filtered by specific criteria; +- cross-category lists of items filtered by specific criteria; - more fine-grained interaction with the Emacs diary, by being able to decide for each todo item whether it appears in the Fancy Diary display; - highly flexible new item insertion and item editing; === modified file 'lisp/ChangeLog.13' --- lisp/ChangeLog.13 2013-01-01 09:11:05 +0000 +++ lisp/ChangeLog.13 2013-06-30 15:10:33 +0000 @@ -12554,7 +12554,7 @@ 2007-08-23 John Wiegley - * calendar/cal-bahai.el: Added in the diacriticals that were + * calendar/cal-bahai.el: Added in the diacritics that were missing for many of the month names. 2007-08-22 Jason Rumney === modified file 'lisp/calendar/todo-mode.el' --- lisp/calendar/todo-mode.el 2013-06-21 14:07:46 +0000 +++ lisp/calendar/todo-mode.el 2013-06-30 15:10:33 +0000 @@ -40,7 +40,7 @@ ;; You can add new todo files and categories, rename categories, move ;; them to another file or delete them. You can also display summary ;; tables of the categories in a file and the types of items they -;; contain. And you can build cross-categorial lists of items that +;; contain. And you can build cross-category lists of items that ;; satisfy various criteria. ;; To get started, load this package and type `M-x todo-show'. This @@ -440,7 +440,7 @@ (((class color) (min-colors 16) (background dark)) :foreground "LightSteelBlue") (((class color) (min-colors 8)) :foreground "blue" :weight bold) (t :weight bold)) - "Face for separator string bewteen done and not done todo items." + "Face for separator string between done and not done todo items." :group 'todo-faces) (defface todo-done @@ -1095,7 +1095,7 @@ This makes the entire file visible and the buffer writeable and you can use the self-insertion keys and standard Emacs editing commands to make changes. To return to Todo mode, type -\\[todo-edit-quit]. This runs a file format check, signalling +\\[todo-edit-quit]. This runs a file format check, signaling an error if the format has become invalid. However, this check cannot tell if the number of items changed, which could result in the file containing inconsistent information. For this reason @@ -1586,7 +1586,7 @@ (todo-forward-item)))) (defun todo-mark-category () - "Mark all visiblw items in this category with `todo-item-mark'." + "Mark all visible items in this category with `todo-item-mark'." (interactive) (let* ((cat (todo-current-category)) (marks (assoc cat todo-categories-with-marks))) @@ -1628,7 +1628,7 @@ This is the function from which the generated Todo mode item insertion commands derive. -The generated commands have mnenomic key bindings based on the +The generated commands have mnemonic key bindings based on the arguments' values and their order in the command's argument list, as follows: (1) for DIARY `d', (2) for NONMARKING `k', (3) for DATE-TYPE either `c' for calendar or `d' for date or `n' for @@ -3288,7 +3288,7 @@ In the initial display the categories are numbered, indicating their current order for navigating by \\[todo-forward-category] -and \\[todo-backward-category]. You can persistantly change the +and \\[todo-backward-category]. You can permanently change the order of the category at point by typing \\[todo-set-category-number], \\[todo-raise-category] or \\[todo-lower-category]. @@ -4019,10 +4019,10 @@ "Buffer type string for `todo-filter-items'.") (defun todo-filter-items (filter &optional new multifile) - "Display a cross-categorial list of items filtered by FILTER. + "Display a cross-category list of items filtered by FILTER. The values of FILTER can be `top' for top priority items, a cons of `top' and a number passed by the caller, `diary' for diary -items, or `regexp' for items matching a regular expresion entered +items, or `regexp' for items matching a regular expression entered by the user. The items can be from any categories in the current todo file or, with non-nil MULTIFILE, from several files. If NEW is nil, visit an appropriate file containing the list of filtered @@ -5069,7 +5069,7 @@ (not (looking-at (regexp-quote todo-nondiary-start)))))) ;; This duplicates the item locating code from diary-goto-entry, but -;; without the marker code, to test whether the latter is dispensible. +;; without the marker code, to test whether the latter is dispensable. ;; If it is, diary-goto-entry can be simplified. The code duplication ;; here can also be eliminated, leaving only the widening and category ;; selection, and instead of :override advice :around can be used. @@ -5266,10 +5266,10 @@ "Generator list for argument lists of item insertion commands.") (defvar todo-insertion-commands-args - (let ((argslist (todo-gen-arglists todo-insertion-commands-args-genlist)) + (let ((arglist (todo-gen-arglists todo-insertion-commands-args-genlist)) res new) (setq res (cl-remove-duplicates - (apply 'append (mapcar 'todo-powerset argslist)) :test 'equal)) + (apply 'append (mapcar 'todo-powerset arglist)) :test 'equal)) (dolist (l res) (unless (= 5 (length l)) (let ((v (make-vector 5 nil)) elt) @@ -5524,12 +5524,12 @@ ;; Default to the current file. (unless file0 (setq file0 todo-current-todo-file)) ;; First validate only a name passed interactively from - ;; todo-add-category, which must be of a nonexisting category. + ;; todo-add-category, which must be of a nonexistent category. (unless (and (assoc cat categories) (not add)) ;; Validate only against completion categories. (let ((todo-categories categories)) (setq cat (todo-validate-name cat 'category))) - ;; When user enters a nonexisting category name by jumping or + ;; When user enters a nonexistest category name by jumping or ;; moving, confirm that it should be added, then validate. (unless add (if (todo-y-or-n-p (format "Add new category \"%s\" to file \"%s\"? " @@ -5677,7 +5677,7 @@ (completing-read "Enter a day name: " (append calendar-day-name-array nil) nil t))) - + (defun todo-read-time () "Prompt for and return a valid clock time as a string. @@ -6221,7 +6221,7 @@ ;; )) ;; ----------------------------------------------------------------------------- -;;; Hook functions and mode definitions +;;; Hook functions and mode definitions ;; ----------------------------------------------------------------------------- (defun todo-show-current-file () === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-28 08:03:21 +0000 +++ lisp/gnus/ChangeLog 2013-06-30 15:10:33 +0000 @@ -80,7 +80,7 @@ (eww-colorize-region): Use `add-face-text-property'. * shr.el (shr-add-font): Append face data, so that we get the correct - presedence: The innermost value (which is applied first) wins. + precedence: The innermost value (which is applied first) wins. (shr-make-overlay): Obsolete function. * mm-decode.el (mm-convert-shr-links): New function to convert === modified file 'src/conf_post.h' --- src/conf_post.h 2013-06-21 20:11:44 +0000 +++ src/conf_post.h 2013-06-30 15:10:33 +0000 @@ -231,7 +231,7 @@ #define FOO_INLINE EXTERN_INLINE before including any .h file other than config.h. - Other .c files should not define FOO_INILNE. + Other .c files should not define FOO_INLINE. C99 compilers compile functions like 'incr' as C99-style extern inline functions. Pre-C99 GCCs do something similar with === modified file 'src/xdisp.c' --- src/xdisp.c 2013-06-30 14:49:33 +0000 +++ src/xdisp.c 2013-06-30 15:10:33 +0000 @@ -20387,7 +20387,7 @@ break; } /* If we ended up on a composed character inside - bidi-reordered text (e.g., Hebrew text with diacriticals), + bidi-reordered text (e.g., Hebrew text with diacritics), the iterator gives us the buffer position of the last (in logical order) character of the composed grapheme cluster, which is not what we want. So we cheat: we compute the === modified file 'test/automated/flymake-tests.el' --- test/automated/flymake-tests.el 2013-06-21 14:36:13 +0000 +++ test/automated/flymake-tests.el 2013-06-30 15:10:33 +0000 @@ -43,7 +43,7 @@ (face-at-point)) (and buffer (kill-buffer buffer))))) -(ert-deftest warnining-predicate-rx-gcc () +(ert-deftest warning-predicate-rx-gcc () "Test GCC warning via regexp predicate." :expected-result (if (executable-find "gcc") :passed :failed) (should (eq 'flymake-warnline ------------------------------------------------------------ revno: 113231 fixes bug: http://debbugs.gnu.org/14753 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2013-06-30 18:03:31 +0300 message: A possible fix for bug #14753 with aborts in get_local_map. src/intervals.c (get_local_map): Instead of aborting, clip POSITION to the valid range of values. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-30 14:49:33 +0000 +++ src/ChangeLog 2013-06-30 15:03:31 +0000 @@ -1,5 +1,8 @@ 2013-06-30 Eli Zaretskii + * intervals.c (get_local_map): Instead of aborting, clip POSITION + to the valid range of values. (Bug#14753) + * xdisp.c (Fmove_point_visually): Invalidate the cursor position when moving point by using the current glyph matrix. This avoids the need to force redisplay when this function is called in a === modified file 'src/intervals.c' --- src/intervals.c 2013-03-24 12:59:45 +0000 +++ src/intervals.c 2013-06-30 15:03:31 +0000 @@ -2196,9 +2196,7 @@ /* Return the proper local keymap TYPE for position POSITION in BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map specified by the PROP property, if any. Otherwise, if TYPE is - `local-map' use BUFFER's local map. - - POSITION must be in the accessible part of BUFFER. */ + `local-map' use BUFFER's local map. */ Lisp_Object get_local_map (register ptrdiff_t position, register struct buffer *buffer, @@ -2207,9 +2205,7 @@ Lisp_Object prop, lispy_position, lispy_buffer; ptrdiff_t old_begv, old_zv, old_begv_byte, old_zv_byte; - /* Perhaps we should just change `position' to the limit. */ - if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer)) - emacs_abort (); + clip_to_bounds (BUF_BEGV (buffer), position, BUF_ZV (buffer)); /* Ignore narrowing, so that a local map continues to be valid even if the visible region contains no characters and hence no properties. */ ------------------------------------------------------------ revno: 113230 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2013-06-30 17:49:33 +0300 message: Don't call sit-for in right-char and left-char for visual cursor motion. src/xdisp.c (Fmove_point_visually): Invalidate the cursor position when moving point by using the current glyph matrix. This avoids the need to force redisplay when this function is called in a loop. lisp/bindings.el (right-char, left-char): Don't call sit-for, this is no longer needed. Use arithmetic comparison only for numerical arguments. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 14:27:07 +0000 +++ lisp/ChangeLog 2013-06-30 14:49:33 +0000 @@ -1,5 +1,9 @@ 2013-06-30 Eli Zaretskii + * bindings.el (right-char, left-char): Don't call sit-for, this is + no longer needed. Use arithmetic comparison only for numerical + arguments. + * international/mule-cmds.el (select-safe-coding-system): Handle the case of FROM being a string correctly. (Bug#14755) === modified file 'lisp/bindings.el' --- lisp/bindings.el 2013-06-29 15:20:46 +0000 +++ lisp/bindings.el 2013-06-30 14:49:33 +0000 @@ -725,8 +725,7 @@ (interactive "^p") (if visual-order-cursor-movement (dotimes (i (if (numberp n) (abs n) 1)) - (move-point-visually (if (< n 0) -1 1)) - (sit-for 0)) + (move-point-visually (if (and (numberp n) (< n 0)) -1 1))) (if (eq (current-bidi-paragraph-direction) 'left-to-right) (forward-char n) (backward-char n)))) @@ -744,8 +743,7 @@ (interactive "^p") (if visual-order-cursor-movement (dotimes (i (if (numberp n) (abs n) 1)) - (move-point-visually (if (< n 0) 1 -1)) - (sit-for 0)) + (move-point-visually (if (and (numberp n) (< n 0)) 1 -1))) (if (eq (current-bidi-paragraph-direction) 'left-to-right) (backward-char n) (forward-char n)))) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-29 20:19:29 +0000 +++ src/ChangeLog 2013-06-30 14:49:33 +0000 @@ -1,3 +1,10 @@ +2013-06-30 Eli Zaretskii + + * xdisp.c (Fmove_point_visually): Invalidate the cursor position + when moving point by using the current glyph matrix. This avoids + the need to force redisplay when this function is called in a + loop. + 2013-06-29 Paul Eggert Fix minor problems found by static checking. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-06-29 15:52:20 +0000 +++ src/xdisp.c 2013-06-30 14:49:33 +0000 @@ -20107,6 +20107,7 @@ if (BUFFERP (g->object) && g->charpos != PT) { SET_PT (g->charpos); + w->cursor.vpos = -1; return make_number (PT); } else if (!INTEGERP (g->object) && g->object != gpt->object) @@ -20126,6 +20127,7 @@ else break; SET_PT (new_pos); + w->cursor.vpos = -1; return make_number (PT); } else if (ROW_GLYPH_NEWLINE_P (row, g)) @@ -20141,6 +20143,7 @@ SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1); else break; + w->cursor.vpos = -1; return make_number (PT); } } @@ -20161,6 +20164,7 @@ if (row->reversed_p && !row->continued_p) { SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1); + w->cursor.vpos = -1; return make_number (PT); } g = row->glyphs[TEXT_AREA]; @@ -20188,6 +20192,7 @@ SET_PT (ZV); else continue; + w->cursor.vpos = -1; return make_number (PT); } } @@ -20197,6 +20202,7 @@ if (!row->reversed_p && !row->continued_p) { SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1); + w->cursor.vpos = -1; return make_number (PT); } e = row->glyphs[TEXT_AREA]; @@ -20224,6 +20230,7 @@ SET_PT (ZV); else continue; + w->cursor.vpos = -1; return make_number (PT); } } ------------------------------------------------------------ revno: 113229 fixes bug: http://debbugs.gnu.org/14755 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2013-06-30 17:27:07 +0300 message: Fix bug #14755 which prevented autoloads from being computed. lisp/international/mule-cmds.el (select-safe-coding-system): Handle the case of FROM being a string correctly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 13:11:41 +0000 +++ lisp/ChangeLog 2013-06-30 14:27:07 +0000 @@ -1,3 +1,8 @@ +2013-06-30 Eli Zaretskii + + * international/mule-cmds.el (select-safe-coding-system): Handle + the case of FROM being a string correctly. (Bug#14755) + 2013-06-30 Lars Magne Ingebrigtsen * net/shr.el (shr-make-table-1): Add a sanity check that allows === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2013-06-28 14:42:55 +0000 +++ lisp/international/mule-cmds.el 2013-06-30 14:27:07 +0000 @@ -1031,7 +1031,10 @@ (error "Canceled because the buffer was modified")) (if (and (eq (coding-system-type coding-system) 'undecided) (coding-system-get coding-system :prefer-utf-8) - (< (- to from) (- (position-bytes to) (position-bytes from)))) + (or (multibyte-string-p from) + (and (number-or-marker-p from) + (< (- to from) + (- (position-bytes to) (position-bytes from)))))) (setq coding-system (coding-system-change-text-conversion coding-system 'utf-8))) coding-system))) ------------------------------------------------------------ revno: 113228 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2013-06-30 15:11:41 +0200 message: Fix shr table rendering infloop * net/shr.el (shr-make-table-1): Add a sanity check that allows progression on degenerate tables. (shr-rescale-image): ImageMagick animated images currently doesn't work. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 05:08:23 +0000 +++ lisp/ChangeLog 2013-06-30 13:11:41 +0000 @@ -1,3 +1,10 @@ +2013-06-30 Lars Magne Ingebrigtsen + + * net/shr.el (shr-make-table-1): Add a sanity check that allows + progression on degenerate tables. + (shr-rescale-image): ImageMagick animated images currently doesn't + work. + 2013-06-30 Juanma Barranquero Some fixes and improvements for desktop frame restoration. === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-06-28 07:57:49 +0000 +++ lisp/net/shr.el 2013-06-30 13:11:41 +0000 @@ -762,6 +762,7 @@ "Rescale DATA, if too big, to fit the current buffer. If FORCE, rescale the image anyway." (if (or (not (fboundp 'imagemagick-types)) + (eq (image-type-from-data data) 'gif) (not (get-buffer-window (current-buffer)))) (create-image data nil t :ascent 100) (let ((edges (window-inside-pixel-edges @@ -1473,7 +1474,10 @@ (setq width (if column (aref widths width-column) - 0)) + 10)) + ;; Sanity check for degenerate tables. + (when (zerop width) + (setq width 10)) (when (and fill (setq colspan (cdr (assq :colspan (cdr column))))) (setq colspan (string-to-number colspan)) ------------------------------------------------------------ revno: 113227 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-06-30 07:08:23 +0200 message: Some fixes and improvements for desktop frame restoration. It is still experimental and disabled by default. * lisp/desktop.el (desktop--save-windows): Put the selected frame at the head of the list. (desktop--make-full-frame): New function. (desktop--restore-windows): Try to re-select the frame that was selected upon saving. Do not abort if some frames fail to restore, just show an error message and contnue. Set up maximized frames so they have default non-maximized dimensions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-30 02:23:10 +0000 +++ lisp/ChangeLog 2013-06-30 05:08:23 +0000 @@ -1,3 +1,15 @@ +2013-06-30 Juanma Barranquero + + Some fixes and improvements for desktop frame restoration. + It is still experimental and disabled by default. + * desktop.el (desktop--save-windows): Put the selected frame at + the head of the list. + (desktop--make-full-frame): New function. + (desktop--restore-windows): Try to re-select the frame that was + selected upon saving. Do not abort if some frames fail to restore, + just show an error message and contnue. Set up maximized frames so + they have default non-maximized dimensions. + 2013-06-30 Dmitry Gutov * progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-06-27 09:08:14 +0000 +++ lisp/desktop.el 2013-06-30 05:08:23 +0000 @@ -900,7 +900,8 @@ (mapcar (lambda (frame) (cons (desktop--filter-frame-parms frame) (window-state-get (frame-root-window frame) t))) - (frame-list)))) + (cons (selected-frame) + (delq (selected-frame) (frame-list)))))) (desktop-outvar 'desktop--saved-states)) ;;;###autoload @@ -1010,28 +1011,53 @@ (setq frames (cdr frames)))) result)) +(defun desktop--make-full-frame (full display config) + (let ((width (and (eq full 'fullheight) (cdr (assq 'width config)))) + (height (and (eq full 'fullwidth) (cdr (assq 'height config)))) + (params '((visibility))) + frame) + (when width + (setq params (append `((user-size . t) (width . ,width)) params))) + (when height + (setq params (append `((user-size . t) (height . ,height)) params))) + (setq frame (make-frame-on-display display params)) + (modify-frame-parameters frame config) + frame)) + (defun desktop--restore-windows () "Restore window/frame configuration. Internal use only." (when (and desktop-save-windows desktop--saved-states) - (condition-case nil - (let ((frames (frame-list))) - (dolist (state desktop--saved-states) + (let ((frames (frame-list)) + (selected nil)) + (dolist (state desktop--saved-states) + (condition-case err (let* ((fconfig (car state)) (display (cdr (assq 'display fconfig))) - (frame (desktop--find-frame-in-display frames display))) - (if (not frame) - ;; no frames in the display -- make a new one - (setq frame (make-frame-on-display display fconfig)) - ;; found one -- reuse and remove from list - (setq frames (delq frame frames)) - (modify-frame-parameters frame fconfig)) + (full (cdr (assq 'fullscreen fconfig))) + (frame (and (not full) + (desktop--find-frame-in-display frames display)))) + (cond (full + ;; treat fullscreen/maximized frames specially + (setq frame (desktop--make-full-frame full display fconfig))) + (frame + ;; found a frame in the right display -- reuse + (setq frames (delq frame frames)) + (modify-frame-parameters frame fconfig)) + (t + ;; no frames in the display -- make a new one + (setq frame (make-frame-on-display display fconfig)))) ;; restore windows - (window-state-put (cdr state) (frame-root-window frame) 'safe))) - ;; delete any remaining frames - (mapc #'delete-frame frames)) - (error - (message "Error loading window configuration from desktop file"))))) + (window-state-put (cdr state) (frame-root-window frame) 'safe) + (unless selected (setq selected frame))) + (error + (message "Error restoring frame: %S" (error-message-string err))))) + ;; make sure the original selected frame is visible and selected + (unless (or (frame-parameter selected 'visibility) (daemonp)) + (modify-frame-parameters selected '((visibility . t)))) + (select-frame-set-input-focus selected) + ;; delete any remaining frames + (mapc #'delete-frame frames)))) ;;;###autoload (defun desktop-read (&optional dirname)