Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100824. ------------------------------------------------------------ revno: 100824 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-07-15 00:56:13 +0000 message: Make gnus-summary-bookmark-make-record work for Emacs 23 as well. 2010-07-15 Katsumi Yamaoka * gnus-sum.el (gnus-summary-bookmark-make-record): Make it work for Emacs 23 as well. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-07-14 16:41:40 +0000 +++ lisp/gnus/ChangeLog 2010-07-15 00:54:06 +0000 @@ -1,4 +1,9 @@ -2010-07-13 Thierry Volpiatto +2010-07-15 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-bookmark-make-record): Make it work for + Emacs 23 as well. + +2010-07-13 Thierry Volpiatto Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). Patch applied by Karl Fogel. @@ -15,14 +20,14 @@ * gnus-art.el (bookmark-make-record-function): New local variable. - * gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting - from article buffer. + * gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting from + article buffer. (gnus-summary-bookmark-jump): Maybe jump to article buffer. 2010-07-13 Karl Fogel - * gnus/gnus-sum.el (bookmark-make-record-default): Adjust - declaration, based on changes in bookmark.el. + * gnus-sum.el (bookmark-make-record-default): Adjust declaration, based + on changes in bookmark.el. 2010-06-22 Mark A. Hershberger === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-07-14 16:41:40 +0000 +++ lisp/gnus/gnus-sum.el 2010-07-15 00:54:06 +0000 @@ -12645,7 +12645,10 @@ (head (gnus-summary-article-header art)) (id (mail-header-id head))) `(,subject - ,@(bookmark-make-record-default 'no-file 'no-context pos) + ,@(condition-case nil + (bookmark-make-record-default 'no-file 'no-context (point)) + (wrong-number-of-arguments + (bookmark-make-record-default 'point-only))) (location . ,(format "Gnus-%s %s:%d:%s" buf grp art id)) (group . ,grp) (article . ,art) (message-id . ,id) (handler . gnus-summary-bookmark-jump))))) ------------------------------------------------------------ revno: 100823 committer: Karl Fogel branch nick: trunk timestamp: Wed 2010-07-14 15:09:28 -0400 message: * lisp/bookmark.el (bookmark-load-hook): Fix doc string as suggested by Drew Adams (Bug#5504). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-14 18:03:39 +0000 +++ lisp/ChangeLog 2010-07-14 19:09:28 +0000 @@ -1,3 +1,8 @@ +2010-07-14 Karl Fogel + + * bookmark.el (bookmark-load-hook): Fix doc string as suggested + by Drew Adams (Bug#5504). + 2010-07-14 Chong Yidong * term/x-win.el (x-select-enable-clipboard): Default to t. === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2010-07-14 16:41:40 +0000 +++ lisp/bookmark.el 2010-07-14 19:09:28 +0000 @@ -2196,7 +2196,7 @@ ;; Load Hook (defvar bookmark-load-hook nil - "Hook run at the end of loading bookmark.") + "Hook run at the end of loading library `bookmark.el'.") ;; Exit Hook, called from kill-emacs-hook (defvar bookmark-exit-hook nil ------------------------------------------------------------ revno: 100822 committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-07-14 14:03:39 -0400 message: Change clipboard/primary selection to X application standards. * lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite Cut/Copy/Paste menu bar items. * lisp/mouse.el: Bind mouse-2 to mouse-yank-primary. (mouse-drag-copy-region): Default to nil. * lisp/simple.el (select-active-regions): Default to t. (push-mark-command): Don't overwrite primary with empty string. * lisp/term/x-win.el (x-select-enable-clipboard): Default to t. (x-initialize-window-system): Don't overwrite Paste menu item. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-07-03 03:16:11 +0000 +++ etc/NEWS 2010-07-14 18:03:39 +0000 @@ -173,6 +173,20 @@ *** The option `mouse-region-delete-keys' has been deleted. +** Selection changes. + +The way Emacs interacts with the clipboard and primary selection, by +default, is now similar to other X applications. In particular, kill +and yank use the clipboard, in addition to the primary selection. + +*** `select-active-regions' now defaults to t. + +*** `x-select-enable-clipboard' now defaults to t. + +*** `mouse-drag-copy-region' now defaults to nil. + +*** `mouse-2' is now bound to `mouse-yank-primary'. + * Changes in Specialized Modes and Packages in Emacs 24.1 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-14 16:41:40 +0000 +++ lisp/ChangeLog 2010-07-14 18:03:39 +0000 @@ -1,3 +1,17 @@ +2010-07-14 Chong Yidong + + * term/x-win.el (x-select-enable-clipboard): Default to t. + (x-initialize-window-system): Don't overwrite Paste menu item. + + * simple.el (select-active-regions): Default to t. + (push-mark-command): Don't overwrite primary with empty string. + + * mouse.el: Bind mouse-2 to mouse-yank-primary. + (mouse-drag-copy-region): Default to nil. + + * menu-bar.el (menu-bar-enable-clipboard): Don't overwrite + Cut/Copy/Paste menu bar items. + 2010-07-13 Thierry Volpiatto Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2010-07-05 17:54:13 +0000 +++ lisp/menu-bar.el 2010-07-14 18:03:39 +0000 @@ -526,17 +526,6 @@ "Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard. Do the same for the keys of the same name." (interactive) - ;; We can't use constant list structure here because it becomes pure, - ;; and because it gets modified with cache data. - (define-key menu-bar-edit-menu [paste] - (cons "Paste" (cons "Paste text from clipboard" 'clipboard-yank))) - (define-key menu-bar-edit-menu [copy] - (cons "Copy" (cons "Copy text in region to the clipboard" - 'clipboard-kill-ring-save))) - (define-key menu-bar-edit-menu [cut] - (cons "Cut" (cons "Delete text in region and copy it to the clipboard" - 'clipboard-kill-region))) - ;; These are Sun server keysyms for the Cut, Copy and Paste keys ;; (also for XFree86 on Sun keyboard): (define-key global-map [f20] 'clipboard-kill-region) === modified file 'lisp/mouse.el' --- lisp/mouse.el 2010-07-11 22:14:53 +0000 +++ lisp/mouse.el 2010-07-14 18:03:39 +0000 @@ -41,7 +41,7 @@ :type 'boolean :group 'mouse) -(defcustom mouse-drag-copy-region t +(defcustom mouse-drag-copy-region nil "If non-nil, mouse drag copies region to kill-ring." :type 'boolean :version "22.1" @@ -2443,7 +2443,7 @@ (global-set-key [left-fringe mouse-1] 'mouse-set-point) (global-set-key [right-fringe mouse-1] 'mouse-set-point) -(global-set-key [mouse-2] 'mouse-yank-at-click) +(global-set-key [mouse-2] 'mouse-yank-primary) ;; Allow yanking also when the corresponding cursor is "in the fringe". (global-set-key [right-fringe mouse-2] 'mouse-yank-at-click) (global-set-key [left-fringe mouse-2] 'mouse-yank-at-click) === modified file 'lisp/simple.el' --- lisp/simple.el 2010-07-13 10:41:49 +0000 +++ lisp/simple.el 2010-07-14 18:03:39 +0000 @@ -3666,7 +3666,7 @@ (marker-position (mark-marker)) (signal 'mark-inactive nil))) -(defcustom select-active-regions nil +(defcustom select-active-regions t "If non-nil, an active region automatically becomes the window selection." :type 'boolean :group 'killing @@ -3687,6 +3687,7 @@ mark-active (display-selections-p) (x-selection-owner-p 'PRIMARY) + (not (eq (region-beginning) (region-end))) (x-set-selection 'PRIMARY (buffer-substring-no-properties (region-beginning) (region-end)))) (if (and (null force) @@ -3819,6 +3820,8 @@ (push-mark nil nomsg t) (setq mark-active t) (run-hooks 'activate-mark-hook) + (and select-active-regions (display-selections-p) + (x-set-selection 'PRIMARY (current-buffer))) (unless nomsg (message "Mark activated"))))) === modified file 'lisp/term/x-win.el' --- lisp/term/x-win.el 2010-01-18 04:39:40 +0000 +++ lisp/term/x-win.el 2010-07-14 18:03:39 +0000 @@ -1219,13 +1219,9 @@ "Max number of characters to put in the cut buffer. It is said that overlarge strings are slow to put into the cut buffer.") -(defcustom x-select-enable-clipboard nil +(defcustom x-select-enable-clipboard t "Non-nil means cutting and pasting uses the clipboard. -This is in addition to, but in preference to, the primary selection. - -On MS-Windows, this is non-nil by default, since Windows does not -support other types of selections. \(The primary selection that is -set by Emacs is not accessible to other programs on Windows.\)" +This is in addition to, but in preference to, the primary selection." :type 'boolean :group 'killing) @@ -1560,12 +1556,12 @@ ;; Enable CLIPBOARD copy/paste through menu bar commands. (menu-bar-enable-clipboard) - ;; Override Paste so it looks at CLIPBOARD first. - (define-key menu-bar-edit-menu [paste] - (append '(menu-item "Paste" x-clipboard-yank - :enable (not buffer-read-only) - :help "Paste (yank) text most recently cut/copied") - nil)) + ;; ;; Override Paste so it looks at CLIPBOARD first. + ;; (define-key menu-bar-edit-menu [paste] + ;; (append '(menu-item "Paste" x-clipboard-yank + ;; :enable (not buffer-read-only) + ;; :help "Paste (yank) text most recently cut/copied") + ;; nil)) (setq x-initialized t)) ------------------------------------------------------------ revno: 100821 author: Thierry Volpiatto committer: Karl Fogel branch nick: trunk timestamp: Wed 2010-07-14 12:41:40 -0400 message: Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). * lisp/bookmark.el (bookmark-set): Don't set `bookmark-yank-point' and `bookmark-current-buffer' if they have been already set in another buffer (e.g gnus-art). * lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record): Set `bookmark-yank-point' and `bookmark-current-buffer' to allow C-w. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-14 15:57:54 +0000 +++ lisp/ChangeLog 2010-07-14 16:41:40 +0000 @@ -1,3 +1,12 @@ +2010-07-13 Thierry Volpiatto + + Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). + Patch applied by Karl Fogel. + + * bookmark.el (bookmark-set): Don't set `bookmark-yank-point' + and `bookmark-current-buffer' if they have been already set in + another buffer (e.g gnus-art). + 2010-07-13 Karl Fogel Thierry Volpiatto === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2010-07-14 15:57:54 +0000 +++ lisp/bookmark.el 2010-07-14 16:41:40 +0000 @@ -783,27 +783,34 @@ it removes only the first instance of a bookmark with that name from the list of bookmarks.)" (interactive (list nil current-prefix-arg)) - (let* ((record (bookmark-make-record)) - (default (car record))) - - (bookmark-maybe-load-default-file) - - (setq bookmark-yank-point (point)) - (setq bookmark-current-buffer (current-buffer)) - - (let ((str - (or name - (read-from-minibuffer - (format "Set bookmark (%s): " default) - nil - bookmark-minibuffer-read-name-map - nil nil default)))) - (and (string-equal str "") (setq str default)) - (bookmark-store str (cdr record) no-overwrite) - - ;; Ask for an annotation buffer for this bookmark - (when bookmark-use-annotations - (bookmark-edit-annotation str))))) + (unwind-protect + (let* ((record (bookmark-make-record)) + (default (car record))) + + (bookmark-maybe-load-default-file) + ;; Don't set `bookmark-yank-point' and `bookmark-current-buffer' + ;; if they have been already set in another buffer. (e.g gnus-art). + (unless (and bookmark-yank-point + bookmark-current-buffer) + (setq bookmark-yank-point (point)) + (setq bookmark-current-buffer (current-buffer))) + + (let ((str + (or name + (read-from-minibuffer + (format "Set bookmark (%s): " default) + nil + bookmark-minibuffer-read-name-map + nil nil default)))) + (and (string-equal str "") (setq str default)) + (bookmark-store str (cdr record) no-overwrite) + + ;; Ask for an annotation buffer for this bookmark + (when bookmark-use-annotations + (bookmark-edit-annotation str)))) + (setq bookmark-yank-point nil) + (setq bookmark-current-buffer nil))) + (defun bookmark-kill-line (&optional newline-too) "Kill from point to end of line. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-07-14 16:02:53 +0000 +++ lisp/gnus/ChangeLog 2010-07-14 16:41:40 +0000 @@ -1,3 +1,11 @@ +2010-07-13 Thierry Volpiatto + + Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). + Patch applied by Karl Fogel. + + * gnus-sum.el (gnus-summary-bookmark-make-record): Set + `bookmark-yank-point' and `bookmark-current-buffer' to allow C-w. + 2010-07-13 Thierry Volpiatto Allow bookmarks to be set from Gnus Article buffers (Bug #5975). === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-07-14 16:02:53 +0000 +++ lisp/gnus/gnus-sum.el 2010-07-14 16:41:40 +0000 @@ -12631,10 +12631,12 @@ "Make a bookmark entry for a Gnus summary buffer." (let (pos buf) (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current) - (save-restriction ; FIXME is it necessary to widen? + (save-restriction ; FIXME is it necessary to widen? (widen) (setq pos (point))) ; Set position in gnus-article buffer. (setq buf "art") ; We are recording bookmark from article buffer. - (gnus-article-show-summary)) ; Go back in summary buffer. + (setq bookmark-yank-point (point)) + (setq bookmark-current-buffer (current-buffer)) + (gnus-article-show-summary)) ; Go back in summary buffer. ;; We are now recording bookmark from summary buffer. (unless buf (setq buf "sum")) (let* ((subject (elt (gnus-summary-article-header) 1)) ------------------------------------------------------------ revno: 100820 committer: Karl Fogel branch nick: trunk timestamp: Wed 2010-07-14 12:02:53 -0400 message: Allow bookmarks to be set from Gnus Article buffers (Bug #5975). Patch applied (with minor tweaks) by Karl Fogel. Note this leaves C-w still not working correctly from Article buffers; Thierry's patch to fix that will be applied after this. * lisp/gnus/gnus-art.el (bookmark-make-record-function): New local variable. * lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting from article buffer. (gnus-summary-bookmark-jump): Maybe jump to article buffer. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-07-14 15:57:54 +0000 +++ lisp/gnus/ChangeLog 2010-07-14 16:02:53 +0000 @@ -1,3 +1,16 @@ +2010-07-13 Thierry Volpiatto + + Allow bookmarks to be set from Gnus Article buffers (Bug #5975). + Patch applied (with minor tweaks) by Karl Fogel. Note this leaves + C-w still not working correctly from Article buffers; Thierry's + patch to fix that will be applied after this. + + * gnus-art.el (bookmark-make-record-function): New local variable. + + * gnus-sum.el (gnus-summary-bookmark-make-record): Allow setting + from article buffer. + (gnus-summary-bookmark-jump): Maybe jump to article buffer. + 2010-07-13 Karl Fogel * gnus/gnus-sum.el (bookmark-make-record-default): Adjust === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-06-10 05:33:55 +0000 +++ lisp/gnus/gnus-art.el 2010-07-14 16:02:53 +0000 @@ -4452,6 +4452,8 @@ (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) + (set (make-local-variable 'bookmark-make-record-function) + 'gnus-summary-bookmark-make-record) ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' ;; face. (set (make-local-variable 'nobreak-char-display) nil) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-07-14 15:57:54 +0000 +++ lisp/gnus/gnus-sum.el 2010-07-14 16:02:53 +0000 @@ -12629,18 +12629,24 @@ (defun gnus-summary-bookmark-make-record () "Make a bookmark entry for a Gnus summary buffer." - (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current) - (error "Please retry from the Gnus summary buffer")) ;[1] - (let* ((subject (elt (gnus-summary-article-header) 1)) - (grp (car gnus-article-current)) - (art (cdr gnus-article-current)) - (head (gnus-summary-article-header art)) - (id (mail-header-id head))) - `(,subject - ,@(bookmark-make-record-default 'point-only) - (location . ,(format "Gnus %s:%d:%s" grp art id)) - (group . ,grp) (article . ,art) - (message-id . ,id) (handler . gnus-summary-bookmark-jump)))) + (let (pos buf) + (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current) + (save-restriction ; FIXME is it necessary to widen? + (widen) (setq pos (point))) ; Set position in gnus-article buffer. + (setq buf "art") ; We are recording bookmark from article buffer. + (gnus-article-show-summary)) ; Go back in summary buffer. + ;; We are now recording bookmark from summary buffer. + (unless buf (setq buf "sum")) + (let* ((subject (elt (gnus-summary-article-header) 1)) + (grp (car gnus-article-current)) + (art (cdr gnus-article-current)) + (head (gnus-summary-article-header art)) + (id (mail-header-id head))) + `(,subject + ,@(bookmark-make-record-default 'no-file 'no-context pos) + (location . ,(format "Gnus-%s %s:%d:%s" buf grp art id)) + (group . ,grp) (article . ,art) + (message-id . ,id) (handler . gnus-summary-bookmark-jump))))) ;;;###autoload (defun gnus-summary-bookmark-jump (bookmark) @@ -12648,10 +12654,18 @@ BOOKMARK is a bookmark name or a bookmark record." (let ((group (bookmark-prop-get bookmark 'group)) (article (bookmark-prop-get bookmark 'article)) - (id (bookmark-prop-get bookmark 'message-id))) + (id (bookmark-prop-get bookmark 'message-id)) + (buf (car (split-string (bookmark-prop-get bookmark 'location))))) (gnus-fetch-group group (list article)) (gnus-summary-insert-cached-articles) (gnus-summary-goto-article id nil 'force) + ;; FIXME we have to wait article buffer is ready (only large buffer) + ;; Is there a better solution to know that? + ;; If we don't wait `bookmark-default-handler' will have no chance + ;; to set position. However there is no error, just wrong pos. + (sit-for 1) + (when (string= buf "Gnus-art") + (other-window 1)) (bookmark-default-handler `("" (buffer . ,(current-buffer)) ------------------------------------------------------------ revno: 100819 committer: Karl Fogel branch nick: trunk timestamp: Wed 2010-07-14 11:57:54 -0400 message: Preparation for setting bookmarks in Gnus article buffers (Bug#5975). * lisp/bookmark.el (bookmark-make-record-default): Allow unneeded information to be omitted from the record. Adjust declarations and calls: * lisp/info.el (bookmark-make-record-default): Adjust declaration. (Info-bookmark-make-record): Adjust call. * lisp/woman.el (bookmark-make-record-default): Adjust declaration. (woman-bookmark-make-record): Adjust call. * lisp/man.el (bookmark-make-record-default): Adjust declaration. (Man-bookmark-make-record): Adjust call. * lisp/image-mode.el (bookmark-make-record-default): Adjust declaration. * lisp/doc-view.el (bookmark-make-record-default): Adjust declaration. * lisp/gnus/gnus-sum.el (bookmark-make-record-default): Adjust declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-14 15:54:26 +0000 +++ lisp/ChangeLog 2010-07-14 15:57:54 +0000 @@ -1,4 +1,27 @@ 2010-07-13 Karl Fogel + Thierry Volpiatto + + Preparation for setting bookmarks in Gnus article buffers (Bug#5975). + + * bookmark.el (bookmark-make-record-default): Allow unneeded + information to be omitted from the record. + + Adjust declarations and calls: + + * info.el (bookmark-make-record-default): Adjust declaration. + (Info-bookmark-make-record): Adjust call. + + * woman.el (bookmark-make-record-default): Adjust declaration. + (woman-bookmark-make-record): Adjust call. + + * man.el (bookmark-make-record-default): Adjust declaration. + (Man-bookmark-make-record): Adjust call. + + * image-mode.el (bookmark-make-record-default): Adjust declaration. + + * doc-view.el (bookmark-make-record-default): Adjust declaration. + +2010-07-13 Karl Fogel * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. This is also from Thierry Volpiatto's patch in bug #6444. However, === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2010-07-13 22:17:51 +0000 +++ lisp/bookmark.el 2010-07-14 15:57:54 +0000 @@ -528,26 +528,36 @@ (setq bookmark-current-bookmark stripped-name) (bookmark-bmenu-surreptitiously-rebuild-list))) -(defun bookmark-make-record-default (&optional point-only) +(defun bookmark-make-record-default (&optional no-file no-context posn) "Return the record describing the location of a new bookmark. -Must be at the correct position in the buffer in which the bookmark is -being set. -If POINT-ONLY is non-nil, then only return the subset of the -record that pertains to the location within the buffer." - `(,@(unless point-only `((filename . ,(bookmark-buffer-file-name)))) - (front-context-string - . ,(if (>= (- (point-max) (point)) bookmark-search-size) - (buffer-substring-no-properties - (point) - (+ (point) bookmark-search-size)) - nil)) - (rear-context-string - . ,(if (>= (- (point) (point-min)) bookmark-search-size) - (buffer-substring-no-properties - (point) - (- (point) bookmark-search-size)) - nil)) - (position . ,(point)))) +Point should be at the buffer in which the bookmark is being set, +and normally should be at the position where the bookmark is desired, +but see the optional arguments for other possibilities. + +If NO-FILE is non-nil, then only return the subset of the +record that pertains to the location within the buffer, leaving off +the part that records the filename. + +If NO-CONTEXT is non-nil, do not include the front- and rear-context +strings in the record -- the position is enough. + +If POSN is non-nil, record POSN as the point instead of `(point)'." + `(,@(unless no-file `((filename . ,(bookmark-buffer-file-name)))) + ,@(unless no-context `((front-context-string + . ,(if (>= (- (point-max) (point)) + bookmark-search-size) + (buffer-substring-no-properties + (point) + (+ (point) bookmark-search-size)) + nil)))) + ,@(unless no-context `((rear-context-string + . ,(if (>= (- (point) (point-min)) + bookmark-search-size) + (buffer-substring-no-properties + (point) + (- (point) bookmark-search-size)) + nil)))) + (position . ,(or posn (point))))) ;;; File format stuff === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2010-02-16 14:35:45 +0000 +++ lisp/doc-view.el 2010-07-14 15:57:54 +0000 @@ -1349,8 +1349,8 @@ ;;;; Bookmark integration -(declare-function bookmark-make-record-default "bookmark" - (&optional point-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-06-22 16:48:53 +0000 +++ lisp/gnus/ChangeLog 2010-07-14 15:57:54 +0000 @@ -1,3 +1,8 @@ +2010-07-13 Karl Fogel + + * gnus/gnus-sum.el (bookmark-make-record-default): Adjust + declaration, based on changes in bookmark.el. + 2010-06-22 Mark A. Hershberger * mm-url.el (mm-url-encode-multipart-form-data): New function to handle === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-06-10 00:30:13 +0000 +++ lisp/gnus/gnus-sum.el 2010-07-14 15:57:54 +0000 @@ -12621,7 +12621,8 @@ (gnus-summary-position-point))) ;;; Bookmark support for Gnus. -(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) (declare-function bookmark-get-bookmark-record "bookmark" (bmk)) === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2010-06-14 03:19:46 +0000 +++ lisp/image-mode.el 2010-07-14 15:57:54 +0000 @@ -516,8 +516,8 @@ ;;; Support for bookmark.el -(declare-function bookmark-make-record-default "bookmark" - (&optional point-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) === modified file 'lisp/info.el' --- lisp/info.el 2010-06-17 20:56:17 +0000 +++ lisp/info.el 2010-07-14 15:57:54 +0000 @@ -4901,7 +4901,8 @@ '(Info-mode . Info-restore-desktop-buffer)) ;;;; Bookmark support -(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) (declare-function bookmark-get-bookmark-record "bookmark" (bmk)) @@ -4910,7 +4911,7 @@ "This implements the `bookmark-make-record-function' type (which see) for Info nodes." `(,Info-current-node - ,@(bookmark-make-record-default 'point-only) + ,@(bookmark-make-record-default 'no-file) (filename . ,Info-current-file) (info-node . ,Info-current-node) (handler . Info-bookmark-jump))) === modified file 'lisp/man.el' --- lisp/man.el 2010-06-01 02:34:49 +0000 +++ lisp/man.el 2010-07-14 15:57:54 +0000 @@ -1674,7 +1674,8 @@ complete-path)) ;;; Bookmark Man Support -(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) (declare-function bookmark-get-bookmark-record "bookmark" (bmk)) @@ -1691,7 +1692,7 @@ (defun Man-bookmark-make-record () "Make a bookmark entry for a Man buffer." `(,(Man-default-bookmark-title) - ,@(bookmark-make-record-default 'point-only) + ,@(bookmark-make-record-default 'no-file) (location . ,(concat "man " Man-arguments)) (man-args . ,Man-arguments) (handler . Man-bookmark-jump))) === modified file 'lisp/woman.el' --- lisp/woman.el 2010-05-25 02:11:08 +0000 +++ lisp/woman.el 2010-07-14 15:57:54 +0000 @@ -4521,7 +4521,8 @@ nil) ; for woman-file-readable-p etc. ;;; Bookmark Woman support. -(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) (declare-function bookmark-prop-get "bookmark" (bookmark prop)) (declare-function bookmark-default-handler "bookmark" (bmk)) (declare-function bookmark-get-bookmark-record "bookmark" (bmk)) @@ -4532,7 +4533,7 @@ (defun woman-bookmark-make-record () "Make a bookmark entry for a Woman buffer." `(,(Man-default-bookmark-title) - ,@(bookmark-make-record-default 'point-only) + ,@(bookmark-make-record-default 'no-file) (location . ,(concat "woman " woman-last-file-name)) ;; Use the same form as man's bookmarks, as much as possible. (man-args . ,woman-last-file-name) ------------------------------------------------------------ revno: 100818 committer: Karl Fogel branch nick: trunk timestamp: Wed 2010-07-14 11:54:26 -0400 message: Fix attribution in a ChangeLog entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-13 22:17:51 +0000 +++ lisp/ChangeLog 2010-07-14 15:54:26 +0000 @@ -5,11 +5,11 @@ because it was extraneous to the functional change in that patch, and causes a re-indendation, I am committing it separately. -2010-07-13 Karl Fogel +2010-07-13 Thierry Volpiatto * bookmark.el (bookmark-show-annotation): Ensure annotations show, e.g. in Info bookmarks, by using `switch-to-buffer-other-window'. - Patch by Thierry Volpiatto (Bug#6444). + Patch applied by Karl Fogel (Bug#6444). 2010-07-13 Chong Yidong ------------------------------------------------------------ revno: 100817 committer: Jan D branch nick: trunk timestamp: Wed 2010-07-14 17:10:59 +0200 message: Fix frame size when scroll bar width not an integral of column width. xterm.c (x_set_window_size_1): scroll_bar_actual_width is always SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing. diff: === modified file 'src/xterm.c' --- src/xterm.c 2010-07-14 14:32:25 +0000 +++ src/xterm.c 2010-07-14 15:10:59 +0000 @@ -8606,9 +8606,7 @@ f->scroll_bar_actual_width = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) ? 0 - : FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0 - ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) - : (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f))); + : FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)); compute_fringe_widths (f, 0); ------------------------------------------------------------ revno: 100816 committer: Jan D branch nick: trunk timestamp: Wed 2010-07-14 17:06:33 +0200 message: Fix frame size when scroll bar width not an integral of column width. xterm.c (x_set_window_size_1): scroll_bar_actual_width is always SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-14 14:32:25 +0000 +++ src/ChangeLog 2010-07-14 15:06:33 +0000 @@ -8,6 +8,8 @@ Remove #ifdef USE_GTK around finish = X_EVENT_DROP. Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for ButtonRelease. + (x_set_window_size_1): scroll_bar_actual_width is always + SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing. * xdisp.c (pending_menu_activation): Remove extern declaration. (prepare_menu_bars): Remove setting of pending_menu_activation. ------------------------------------------------------------ revno: 100815 committer: Jan D branch nick: trunk timestamp: Wed 2010-07-14 16:32:25 +0200 message: Fix menu bar activation with click for Motif/Lesstif. * src/xdisp.c (pending_menu_activation): Remove extern declaration. (prepare_menu_bars): Remove setting of pending_menu_activation. * src/xmenu.c (pending_menu_activation): Remove. (x_activate_menubar): Set popup_activated_flag for Xt also. Remove setting of pending_menu_activation. (set_frame_menubar): Remove check of pending_menu_activation. Declare menubar_size before code. Correct spelling in comment. * src/xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype. (SET_SAVED_KEY_EVENT): Remove (not used). (SET_SAVED_MENU_EVENT): Rename to SET_SAVED_BUTTON_EVENT and remove size parameter. (handle_one_xevent): Check popup_activated () for menu for Xt also. Remove #ifdef USE_GTK around finish = X_EVENT_DROP. Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for ButtonRelease. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-14 03:53:53 +0000 +++ src/ChangeLog 2010-07-14 14:32:25 +0000 @@ -1,3 +1,23 @@ +2010-07-14 Jan Djärv + + * xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype. + (SET_SAVED_KEY_EVENT): Remove (not used). + (SET_SAVED_MENU_EVENT): Rename to SET_SAVED_BUTTON_EVENT and + remove size parameter. + (handle_one_xevent): Check popup_activated () for menu for Xt also. + Remove #ifdef USE_GTK around finish = X_EVENT_DROP. + Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for + ButtonRelease. + + * xdisp.c (pending_menu_activation): Remove extern declaration. + (prepare_menu_bars): Remove setting of pending_menu_activation. + + * xmenu.c (pending_menu_activation): Remove. + (x_activate_menubar): Set popup_activated_flag for Xt also. Remove + setting of pending_menu_activation. + (set_frame_menubar): Remove check of pending_menu_activation. + Declare menubar_size before code. Correct spelling in comment. + 2010-07-14 Kenichi Handa * font.c (font_open_entity): Cancel previous change. === modified file 'src/xdisp.c' --- src/xdisp.c 2010-07-13 10:57:00 +0000 +++ src/xdisp.c 2010-07-14 14:32:25 +0000 @@ -271,7 +271,6 @@ #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ || defined(HAVE_NS) || defined (USE_GTK) extern void set_frame_menubar (struct frame *f, int, int); -extern int pending_menu_activation; #endif extern int interrupt_input; @@ -9866,12 +9865,6 @@ update_tool_bar (sf, 1); #endif } - - /* Motif needs this. See comment in xmenu.c. Turn it off when - pending_menu_activation is not defined. */ -#ifdef USE_X_TOOLKIT - pending_menu_activation = 0; -#endif } === modified file 'src/xmenu.c' --- src/xmenu.c 2010-07-12 19:56:46 +0000 +++ src/xmenu.c 2010-07-14 14:32:25 +0000 @@ -151,14 +151,6 @@ extern widget_value *digest_single_submenu (int, int, int); #endif -/* This is set nonzero after the user activates the menu bar, and set - to zero again after the menu bars are redisplayed by prepare_menu_bar. - While it is nonzero, all calls to set_frame_menubar go deep. - - I don't understand why this is needed, but it does seem to be - needed on Motif, according to Marcus Daniels . */ - -int pending_menu_activation; #ifdef USE_X_TOOLKIT @@ -670,6 +662,7 @@ set_frame_menubar (f, 0, 1); BLOCK_INPUT; + popup_activated_flag = 1; #ifdef USE_GTK /* If we click outside any menu item, the menu bar still grabs. So we send Press and the Release. If outside, grab is released. @@ -681,15 +674,10 @@ f->output_data.x->saved_menu_event->type = ButtonPress; XPutBackEvent (f->output_data.x->display_info->display, f->output_data.x->saved_menu_event); - popup_activated_flag = 1; #else XtDispatchEvent (f->output_data.x->saved_menu_event); #endif UNBLOCK_INPUT; -#ifdef USE_MOTIF - if (f->output_data.x->saved_menu_event->type == ButtonRelease) - pending_menu_activation = 1; -#endif /* Ignore this if we get it a second time. */ f->output_data.x->saved_menu_event->type = 0; @@ -991,8 +979,6 @@ if (! menubar_widget) deep_p = 1; - else if (pending_menu_activation && !deep_p) - deep_p = 1; /* Make the first call for any given frame always go deep. */ else if (!f->output_data.x->saved_menu_event && !deep_p) { @@ -1274,10 +1260,11 @@ } { + int menubar_size; if (f->output_data.x->menubar_widget) XtRealizeWidget (f->output_data.x->menubar_widget); - int menubar_size + menubar_size = (f->output_data.x->menubar_widget ? (f->output_data.x->menubar_widget->core.height + f->output_data.x->menubar_widget->core.border_width) @@ -1286,7 +1273,7 @@ #if 1 /* Experimentally, we now get the right results for -geometry -0-0 without this. 24 Aug 96, rms. Maybe so, but the menu bar size is missing the pixels so the - WM size hints are off by theses pixel. Jan D, oct 2009. */ + WM size hints are off by these pixels. Jan D, oct 2009. */ #ifdef USE_LUCID if (FRAME_EXTERNAL_MENU_BAR (f)) { === modified file 'src/xterm.c' --- src/xterm.c 2010-07-13 04:47:45 +0000 +++ src/xterm.c 2010-07-14 14:32:25 +0000 @@ -4159,9 +4159,7 @@ CALL_DATA is a pointer to a XmScrollBarCallbackStruct. */ static void -xm_scroll_callback (widget, client_data, call_data) - Widget widget; - XtPointer client_data, call_data; +xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) { struct scroll_bar *bar = (struct scroll_bar *) client_data; XmScrollBarCallbackStruct *cs = (XmScrollBarCallbackStruct *) call_data; @@ -5546,22 +5544,18 @@ static struct x_display_info *next_noop_dpyinfo; -#define SET_SAVED_MENU_EVENT(size) \ +#define SET_SAVED_BUTTON_EVENT \ do \ { \ if (f->output_data.x->saved_menu_event == 0) \ f->output_data.x->saved_menu_event \ = (XEvent *) xmalloc (sizeof (XEvent)); \ - memcpy (f->output_data.x->saved_menu_event, &event, size); \ + *f->output_data.x->saved_menu_event = event; \ inev.ie.kind = MENU_BAR_ACTIVATE_EVENT; \ XSETFRAME (inev.ie.frame_or_window, f); \ } \ while (0) -#define SET_SAVED_BUTTON_EVENT SET_SAVED_MENU_EVENT (sizeof (XButtonEvent)) -#define SET_SAVED_KEY_EVENT SET_SAVED_MENU_EVENT (sizeof (XKeyEvent)) - - enum { X_EVENT_NORMAL, @@ -6755,14 +6749,12 @@ Instead, save it away and we will pass it to Xt from kbd_buffer_get_event. That way, we can run some Lisp code first. */ - if ( + if (! popup_activated () #ifdef USE_GTK - ! popup_activated () /* Gtk+ menus only react to the first three buttons. */ && event.xbutton.button < 3 - && #endif - f && event.type == ButtonPress + && f && event.type == ButtonPress /* Verify the event is really within the menu bar and not just sent to it due to grabbing. */ && event.xbutton.x >= 0 @@ -6773,30 +6765,13 @@ { SET_SAVED_BUTTON_EVENT; XSETFRAME (last_mouse_press_frame, f); -#ifdef USE_GTK *finish = X_EVENT_DROP; -#endif } else if (event.type == ButtonPress) { last_mouse_press_frame = Qnil; goto OTHER; } - -#ifdef USE_MOTIF /* This should do not harm for Lucid, - but I am trying to be cautious. */ - else if (event.type == ButtonRelease) - { - if (!NILP (last_mouse_press_frame)) - { - f = XFRAME (last_mouse_press_frame); - if (f->output_data.x) - SET_SAVED_BUTTON_EVENT; - } - else - goto OTHER; - } -#endif /* USE_MOTIF */ else goto OTHER; #endif /* USE_X_TOOLKIT || USE_GTK */ @@ -10336,8 +10311,7 @@ that slows us down. */ static void -x_process_timeouts (timer) - struct atimer *timer; +x_process_timeouts (struct atimer *timer) { BLOCK_INPUT; x_timeout_atimer_activated_flag = 0; ------------------------------------------------------------ revno: 100814 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Wed 2010-07-14 12:54:58 +0900 message: Do not record a font-entity in the property of font-object. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-13 10:57:00 +0000 +++ src/ChangeLog 2010-07-14 03:53:53 +0000 @@ -1,3 +1,8 @@ +2010-07-14 Kenichi Handa + + * font.c (font_open_entity): Cancel previous change. + (Ffont_get): Don't check FONT_ENTITY_INDEX of a font-object. + 2010-07-13 Eli Zaretskii Remove subprocesses #ifdefs. === modified file 'src/font.c' --- src/font.c 2010-07-12 02:28:50 +0000 +++ src/font.c 2010-07-14 03:40:47 +0000 @@ -3005,7 +3005,6 @@ return Qnil; ASET (entity, FONT_OBJLIST_INDEX, Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX))); - ASET (font_object, FONT_ENTITY_INDEX, entity); num_fonts++; font = XFONT_OBJECT (font_object); @@ -4131,20 +4130,12 @@ if (NILP (val) && EQ (key, QCotf) && FONT_OBJECT_P (font)) { struct font *fontp = XFONT_OBJECT (font); - Lisp_Object entity = AREF (font, FONT_ENTITY_INDEX); - val = Fassq (key, AREF (entity, FONT_EXTRA_INDEX)); - if (NILP (val)) - { - if (fontp->driver->otf_capability) - val = fontp->driver->otf_capability (fontp); - else - val = Fcons (Qnil, Qnil); - font_put_extra (font, QCotf, val); - font_put_extra (entity, QCotf, val); - } + if (fontp->driver->otf_capability) + val = fontp->driver->otf_capability (fontp); else - val = Fcdr (val); + val = Fcons (Qnil, Qnil); + font_put_extra (font, QCotf, val); } else val = Fcdr (val); ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.