Now on revision 113686. ------------------------------------------------------------ revno: 113686 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-08-04 02:48:00 -0400 message: * lisp/emacs-lisp/nadvice.el (advice-function-mapc): Rename from advice-mapc. (advice-mapc): New function, using it. (advice-function-member-p): New function. (advice--normalize): Store the cdr in advice--saved-rewrite since that's the part that will be changed. (advice--symbol-function): New function. (advice-remove): Handle removal before the function is defined. Adjust to new advice--saved-rewrite. (advice-member-p): Use advice-function-member-p and advice--symbol-function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-04 03:01:42 +0000 +++ lisp/ChangeLog 2013-08-04 06:48:00 +0000 @@ -1,3 +1,16 @@ +2013-08-04 Stefan Monnier + + * emacs-lisp/nadvice.el (advice-function-mapc): Rename from advice-mapc. + (advice-mapc): New function, using it. + (advice-function-member-p): New function. + (advice--normalize): Store the cdr in advice--saved-rewrite since + that's the part that will be changed. + (advice--symbol-function): New function. + (advice-remove): Handle removal before the function is defined. + Adjust to new advice--saved-rewrite. + (advice-member-p): Use advice-function-member-p and + advice--symbol-function. + 2013-08-04 Juanma Barranquero * frameset.el (frameset-p, frameset-save): Fix autoload cookies. === modified file 'lisp/emacs-lisp/nadvice.el' --- lisp/emacs-lisp/nadvice.el 2013-07-26 18:41:18 +0000 +++ lisp/emacs-lisp/nadvice.el 2013-08-04 06:48:00 +0000 @@ -193,7 +193,11 @@ (equal function (cdr (assq 'name props)))) (list rest)))))) -(defvar advice--buffer-local-function-sample nil) +(defvar advice--buffer-local-function-sample nil + "keeps an example of the special \"run the default value\" functions. +These functions play the same role as t in buffer-local hooks, and to recognize +them, we keep a sample here against which to compare. Each instance is +different, but `function-equal' will hopefully ignore those differences.") (defun advice--set-buffer-local (var val) (if (function-equal val advice--buffer-local-function-sample) @@ -206,6 +210,7 @@ (declare (gv-setter advice--set-buffer-local)) (if (local-variable-p var) (symbol-value var) (setq advice--buffer-local-function-sample + ;; This function acts like the t special value in buffer-local hooks. (lambda (&rest args) (apply (default-value var) args))))) ;;;###autoload @@ -284,6 +289,20 @@ (macroexp-let2 nil new `(advice--remove-function ,getter ,function) `(unless (eq ,new ,getter) ,(funcall setter new))))) +(defun advice-function-mapc (f function-def) + "Apply F to every advice function in FUNCTION-DEF. +F is called with two arguments: the function that was added, and the +properties alist that was specified when it was added." + (while (advice--p function-def) + (funcall f (advice--car function-def) (advice--props function-def)) + (setq function-def (advice--cdr function-def)))) + +(defun advice-function-member-p (advice function-def) + "Return non-nil if ADVICE is already in FUNCTION-DEF. +Instead of ADVICE being the actual function, it can also be the `name' +of the piece of advice." + (advice--member-p advice advice function-def)) + ;;;; Specific application of add-function to `symbol-function' for advice. (defun advice--subst-main (old new) @@ -294,11 +313,11 @@ (cond ((special-form-p def) ;; Not worth the trouble trying to handle this, I think. - (error "advice-add failure: %S is a special form" symbol)) + (error "Advice impossible: %S is a special form" symbol)) ((and (symbolp def) (eq 'macro (car-safe (ignore-errors (indirect-function def))))) (let ((newval (cons 'macro (cdr (indirect-function def))))) - (put symbol 'advice--saved-rewrite (cons def newval)) + (put symbol 'advice--saved-rewrite (cons def (cdr newval))) newval)) ;; `f' might be a pure (hence read-only) cons! ((and (eq 'macro (car-safe def)) @@ -309,7 +328,26 @@ (defsubst advice--strip-macro (x) (if (eq 'macro (car-safe x)) (cdr x) x)) +(defun advice--symbol-function (symbol) + ;; The value conceptually stored in `symbol-function' is split into two + ;; parts: + ;; - the normal function definition. + ;; - the list of advice applied to it. + ;; `advice--symbol-function' is intended to return the second part (i.e. the + ;; list of advice, which includes a hole at the end which typically holds the + ;; first part, but this function doesn't care much which value is found + ;; there). + ;; In the "normal" state both parts are combined into a single value stored + ;; in the "function slot" of the symbol. But the way they are combined is + ;; different depending on whether the definition is a function or a macro. + ;; Also if the function definition is nil (i.e. unbound) or is an autoload, + ;; the second part is stashed away temporarily in the `advice--pending' + ;; symbol property. + (or (get symbol 'advice--pending) + (advice--strip-macro (symbol-function symbol)))) + (defun advice--defalias-fset (fsetfun symbol newdef) + (unless fsetfun (setq fsetfun #'fset)) (when (get symbol 'advice--saved-rewrite) (put symbol 'advice--saved-rewrite nil)) (setq newdef (advice--normalize symbol newdef)) @@ -330,11 +368,11 @@ (let* ((snewdef (advice--strip-macro newdef)) (snewadv (advice--subst-main oldadv snewdef))) (put symbol 'advice--pending nil) - (funcall (or fsetfun #'fset) symbol + (funcall fsetfun symbol (if (eq snewdef newdef) snewadv (cons 'macro snewadv)))) (unless (eq oldadv (get symbol 'advice--pending)) (put symbol 'advice--pending (advice--subst-main oldadv nil))) - (funcall (or fsetfun #'fset) symbol newdef)))) + (funcall fsetfun symbol newdef)))) ;;;###autoload @@ -349,8 +387,7 @@ ;; - obsolete advice.el. (let* ((f (symbol-function symbol)) (nf (advice--normalize symbol f))) - (unless (eq f nf) ;; Most importantly, if nf == nil! - (fset symbol nf)) + (unless (eq f nf) (fset symbol nf)) (add-function where (cond ((eq (car-safe nf) 'macro) (cdr nf)) ;; Reasons to delay installation of the advice: @@ -377,39 +414,35 @@ Instead of the actual function to remove, FUNCTION can also be the `name' of the piece of advice." (let ((f (symbol-function symbol))) - ;; Can't use the `if' place here, because the body is too large, - ;; resulting in use of code that only works with lexical-scoping. - (remove-function (if (eq (car-safe f) 'macro) - (cdr f) - (symbol-function symbol)) + (remove-function (cond ;This is `advice--symbol-function' but as a "place". + ((get symbol 'advice--pending) + (get symbol 'advice--pending)) + ((eq (car-safe f) 'macro) (cdr f)) + (t (symbol-function symbol))) function) (unless (advice--p (if (eq (car-safe f) 'macro) (cdr f) (symbol-function symbol))) ;; Not advised any more. (remove-function (get symbol 'defalias-fset-function) #'advice--defalias-fset) - (if (eq (symbol-function symbol) - (cdr (get symbol 'advice--saved-rewrite))) - (fset symbol (car (get symbol 'advice--saved-rewrite)))))) + (let ((asr (get symbol 'advice--saved-rewrite))) + (and asr (eq (cdr-safe (symbol-function symbol)) + (cdr asr)) + (fset symbol (car (get symbol 'advice--saved-rewrite))))))) nil) -(defun advice-mapc (fun def) - "Apply FUN to every advice function in DEF. +(defun advice-mapc (fun symbol) + "Apply FUN to every advice function in SYMBOL. FUN is called with a two arguments: the function that was added, and the properties alist that was specified when it was added." - (while (advice--p def) - (funcall fun (advice--car def) (advice--props def)) - (setq def (advice--cdr def)))) + (advice-function-mapc fun (advice--symbol-function symbol))) ;;;###autoload -(defun advice-member-p (advice function-name) - "Return non-nil if ADVICE has been added to FUNCTION-NAME. +(defun advice-member-p (advice symbol) + "Return non-nil if ADVICE has been added to SYMBOL. Instead of ADVICE being the actual function, it can also be the `name' of the piece of advice." - (advice--member-p advice advice - (or (get function-name 'advice--pending) - (advice--strip-macro - (symbol-function function-name))))) + (advice-function-member-p advice (advice--symbol-function symbol))) ;; When code is advised, called-interactively-p needs to be taught to skip ;; the advising frames. ------------------------------------------------------------ revno: 113685 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-08-03 21:37:10 -0700 message: * ert-tests.el: Disable failing test that no-one seems to know how to fix. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-04 04:34:01 +0000 +++ test/ChangeLog 2013-08-04 04:37:10 +0000 @@ -1,5 +1,8 @@ 2013-08-04 Glenn Morris + * automated/ert-tests.el: Disable failing test that no-one seems + to know how to fix. (Bug#13064) + * automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): Try more precise TZ specification. Remove debug messages. === modified file 'test/automated/ert-tests.el' --- test/automated/ert-tests.el 2013-07-11 16:13:38 +0000 +++ test/automated/ert-tests.el 2013-08-04 04:37:10 +0000 @@ -353,16 +353,18 @@ (should-error (macroexpand '(ert-deftest ghi () :documentation "foo")))) -(ert-deftest ert-test-record-backtrace () - (let ((test (make-ert-test :body (lambda () (ert-fail "foo"))))) - (let ((result (ert-run-test test))) - (should (ert-test-failed-p result)) - (with-temp-buffer - (ert--print-backtrace (ert-test-failed-backtrace result)) - (goto-char (point-min)) - (end-of-line) - (let ((first-line (buffer-substring-no-properties (point-min) (point)))) - (should (equal first-line " signal(ert-test-failed (\"foo\"))"))))))) +;; FIXME Test disabled due to persistent failure owing to lexical binding. +;; http://debbugs.gnu.org/13064 +;;; (ert-deftest ert-test-record-backtrace () +;;; (let ((test (make-ert-test :body (lambda () (ert-fail "foo"))))) +;;; (let ((result (ert-run-test test))) +;;; (should (ert-test-failed-p result)) +;;; (with-temp-buffer +;;; (ert--print-backtrace (ert-test-failed-backtrace result)) +;;; (goto-char (point-min)) +;;; (end-of-line) +;;; (let ((first-line (buffer-substring-no-properties (point-min) (point)))) +;;; (should (equal first-line " signal(ert-test-failed (\"foo\"))"))))))) (ert-deftest ert-test-messages () :tags '(:causes-redisplay) ------------------------------------------------------------ revno: 113684 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-08-03 21:34:01 -0700 message: * test/automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): Remove debug messages. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-04 02:30:11 +0000 +++ test/ChangeLog 2013-08-04 04:34:01 +0000 @@ -2,6 +2,7 @@ * automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): Try more precise TZ specification. + Remove debug messages. 2013-08-03 Glenn Morris === modified file 'test/automated/icalendar-tests.el' --- test/automated/icalendar-tests.el 2013-08-04 02:30:11 +0000 +++ test/automated/icalendar-tests.el 2013-08-04 04:34:01 +0000 @@ -433,9 +433,11 @@ (icalendar-recurring-start-year 2000)) (unwind-protect (progn - (message "Current time zone: %s" (current-time-zone)) +;;; (message "Current time zone: %s" (current-time-zone)) + ;; Use this form so as not to rely on system tz database. + ;; Eg hydra.nixos.org. (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") - (message "Current time zone: %s" (current-time-zone)) +;;; (message "Current time zone: %s" (current-time-zone)) (when input-iso (let ((calendar-month-name-array ["January" "February" "March" "April" "May" "June" "July" "August" @@ -676,9 +678,11 @@ (let ((timezone (getenv "TZ"))) (unwind-protect (progn - (message "Current time zone: %s" (current-time-zone)) +;;; (message "Current time zone: %s" (current-time-zone)) + ;; Use this form so as not to rely on system tz database. + ;; Eg hydra.nixos.org. (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") - (message "Current time zone: %s" (current-time-zone)) +;;; (message "Current time zone: %s" (current-time-zone)) (with-temp-buffer (if (string-match "^BEGIN:VCALENDAR" input) (insert input) ------------------------------------------------------------ revno: 113683 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2013-08-04 08:07:18 +0400 message: * dispnew.c (glyph_matrix_count, glyph_pool_count): Move under GLYPH_DEBUG and ENABLE_CHECKING. (new_glyph_matrix, free_glyph_matrix, new_glyph_pool) (free_glyph_pool, check_glyph_memory): Likewise for all users. Adjust comments where appropriate. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-03 21:09:57 +0000 +++ src/ChangeLog 2013-08-04 04:07:18 +0000 @@ -1,3 +1,11 @@ +2013-08-04 Dmitry Antipov + + * dispnew.c (glyph_matrix_count, glyph_pool_count): + Move under GLYPH_DEBUG and ENABLE_CHECKING. + (new_glyph_matrix, free_glyph_matrix, new_glyph_pool) + (free_glyph_pool, check_glyph_memory): Likewise for + all users. Adjust comments where appropriate. + 2013-08-03 Paul Eggert * composite.h: Minor fixups. === modified file 'src/dispnew.c' --- src/dispnew.c 2013-07-23 08:08:57 +0000 +++ src/dispnew.c 2013-08-04 04:07:18 +0000 @@ -148,12 +148,16 @@ struct glyph space_glyph; +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING + /* Counts of allocated structures. These counts serve to diagnose memory leaks and double frees. */ static int glyph_matrix_count; static int glyph_pool_count; +#endif /* GLYPH_DEBUG and ENABLE_CHECKING */ + /* If non-null, the frame whose frame matrices are manipulated. If null, window matrices are worked on. */ @@ -307,9 +311,11 @@ { struct glyph_matrix *result = xzalloc (sizeof *result); +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING /* Increment number of allocated matrices. This count is used to detect memory leaks. */ ++glyph_matrix_count; +#endif /* Set pool and return. */ result->pool = pool; @@ -319,10 +325,10 @@ /* Free glyph matrix MATRIX. Passing in a null MATRIX is allowed. - The global counter glyph_matrix_count is decremented when a matrix - is freed. If the count gets negative, more structures were freed - than allocated, i.e. one matrix was freed more than once or a bogus - pointer was passed to this function. + If GLYPH_DEBUG and ENABLE_CHECKING are in effect, the global counter + glyph_matrix_count is decremented when a matrix is freed. If the count + gets negative, more structures were freed than allocated, i.e. one matrix + was freed more than once or a bogus pointer was passed to this function. If MATRIX->pool is null, this means that the matrix manages its own glyph memory---this is done for matrices on X frames. Freeing the @@ -335,10 +341,12 @@ { int i; +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING /* Detect the case that more matrices are freed than were allocated. */ - if (--glyph_matrix_count < 0) - emacs_abort (); + --glyph_matrix_count; + eassert (glyph_matrix_count >= 0); +#endif /* Free glyph memory if MATRIX owns it. */ if (matrix->pool == NULL) @@ -1310,38 +1318,41 @@ See dispextern.h for an overall explanation of glyph pools. ***********************************************************************/ -/* Allocate a glyph_pool structure. The structure returned is - initialized with zeros. The global variable glyph_pool_count is - incremented for each pool allocated. */ +/* Allocate a glyph_pool structure. The structure returned is initialized + with zeros. If GLYPH_DEBUG and ENABLE_CHECKING are in effect, the global + variable glyph_pool_count is incremented for each pool allocated. */ static struct glyph_pool * new_glyph_pool (void) { struct glyph_pool *result = xzalloc (sizeof *result); +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING /* For memory leak and double deletion checking. */ ++glyph_pool_count; +#endif return result; } /* Free a glyph_pool structure POOL. The function may be called with - a null POOL pointer. The global variable glyph_pool_count is - decremented with every pool structure freed. If this count gets - negative, more structures were freed than allocated, i.e. one - structure must have been freed more than once or a bogus pointer - was passed to free_glyph_pool. */ + a null POOL pointer. If GLYPH_DEBUG and ENABLE_CHECKING are in effect, + global variable glyph_pool_count is decremented with every pool structure + freed. If this count gets negative, more structures were freed than + allocated, i.e. one structure must have been freed more than once or + a bogus pointer was passed to free_glyph_pool. */ static void free_glyph_pool (struct glyph_pool *pool) { if (pool) { +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING /* More freed than allocated? */ --glyph_pool_count; eassert (glyph_pool_count >= 0); - +#endif xfree (pool->glyphs); xfree (pool); } @@ -2254,11 +2265,11 @@ FOR_EACH_FRAME (tail, frame) free_glyphs (XFRAME (frame)); +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING /* Check that nothing is left allocated. */ - if (glyph_matrix_count) - emacs_abort (); - if (glyph_pool_count) - emacs_abort (); + eassert (glyph_matrix_count == 0); + eassert (glyph_pool_count == 0); +#endif } ------------------------------------------------------------ revno: 113682 [merge] committer: Xue Fuqiao branch nick: trunk timestamp: Sun 2013-08-04 11:01:42 +0800 message: Merge: cleanup for vc-ignore. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-04 02:57:45 +0000 +++ lisp/ChangeLog 2013-08-04 03:01:42 +0000 @@ -11,6 +11,30 @@ interactively and desktop-restore-frames is non-nil. Doc fix. (desktop-read): Set desktop-saved-frameset to nil. +2013-08-04 Xue Fuqiao + + * vc/vc.el (vc-ignore): Rewrite. + (vc-default-ignore-completion-table): + (vc--read-lines): + (vc--add-line, vc--remove-regexp): New functions. + + * vc/vc-svn.el (vc-svn-ignore): Doc fix. + (vc-svn-ignore-completion-table): New function. + + * vc/vc-hg.el (vc-hg-ignore): Rewrite. + (vc-hg-ignore-completion-table): + (vc-hg-find-ignore-file): New functions. + + * vc/vc-git.el (vc-git-ignore): Rewrite. + (vc-git-ignore-completion-table): + (vc-git-find-ignore-file): New functions. + + * vc/vc-dir.el (vc-dir-menu-map): Add menu for vc-dir-ignore. + + * vc/vc-bzr.el (vc-bzr-ignore): Rewrite. + (vc-bzr-ignore-completion-table): + (vc-bzr-find-ignore-file): New functions. + 2013-08-03 Juanma Barranquero * frameset.el (frameset-prop): New function and setter. === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2013-07-30 03:46:06 +0000 +++ lisp/vc/vc-bzr.el 2013-08-04 02:55:45 +0000 @@ -651,9 +651,25 @@ (vc-bzr-command "cat" t 0 file "-r" rev) (vc-bzr-command "cat" t 0 file)))) -(defun vc-bzr-ignore (file) - "Ignore FILE under Bazaar." - (vc-bzr-command "ignore" t 0 file)) +(defun vc-bzr-ignore (file &optional directory remove) + "Ignore FILE under Bazaar. +If DIRECTORY is non-nil, the repository to use will be deduced by +DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." + (if remove + (if directory + (vc--remove-regexp file (vc-bzr-find-ignore-file directory)) + (vc--remove-regexp file + (vc-bzr-find-ignore-file default-directory))) + (vc-bzr-command "ignore" t 0 file))) + +(defun vc-bzr-ignore-completion-table (file) + "Return the list of ignored files." + (vc--read-lines (vc-bzr-find-ignore-file file))) + +(defun vc-bzr-find-ignore-file (file) + "Return the root directory of the repository of FILE." + (expand-file-name ".bzrignore" + (vc-bzr-root file))) (defun vc-bzr-checkout (_file &optional _editable rev) (if rev (error "Operation not supported") === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2013-07-30 14:29:14 +0000 +++ lisp/vc/vc-dir.el 2013-08-04 02:59:08 +0000 @@ -215,6 +215,9 @@ (define-key map [register] '(menu-item "Register" vc-register :help "Register file set into the version control system")) + (define-key map [ignore] + '(menu-item "Ignore Current File" vc-dir-ignore + :help "Ignore the current file under current version control system")) map) "Menu for VC dir.") === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2013-07-30 03:46:06 +0000 +++ lisp/vc/vc-git.el 2013-08-04 02:55:45 +0000 @@ -680,16 +680,26 @@ nil "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname)))) -(defun vc-git-ignore (file) - "Ignore FILE under Git." - (with-temp-buffer - (insert-file-contents - (let ((gitignore (concat (file-name-as-directory (vc-git-root - default-directory)) ".gitignore"))) - (unless (search-forward (concat "\n" file "\n") nil t) - (goto-char (point-max)) - (insert (concat "\n" file "\n")) - (write-region (point-min) (point-max) gitignore)))))) +(defun vc-git-ignore (file &optional directory remove) + "Ignore FILE under Git. +If DIRECTORY is non-nil, the repository to use will be deduced by +DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." + (let (gitignore) + (if directory + (setq gitignore (vc-git-find-ignore-file directory)) + (setq gitignore (vc-git-find-ignore-file default-directory))) + (if remove + (vc--remove-regexp file gitignore) + (vc--add-line file gitignore)))) + +(defun vc-git-ignore-completion-table (file) + "Return the list of ignored files." + (vc--read-lines (vc-git-find-ignore-file file))) + +(defun vc-git-find-ignore-file (file) + "Return the root directory of the repository of FILE." + (expand-file-name ".gitignore" + (vc-git-root file))) (defun vc-git-checkout (file &optional _editable rev) (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) === modified file 'lisp/vc/vc-hg.el' --- lisp/vc/vc-hg.el 2013-07-30 03:46:06 +0000 +++ lisp/vc/vc-hg.el 2013-08-04 02:55:45 +0000 @@ -459,16 +459,26 @@ (vc-hg-command buffer 0 file "cat" "-r" rev) (vc-hg-command buffer 0 file "cat")))) -(defun vc-hg-ignore (file) - "Ignore FILE under Mercurial." - (with-temp-buffer - (insert-file-contents - (let ((hgignore (concat (file-name-as-directory (vc-hg-root - default-directory)) ".hgignore"))) - (unless (search-forward (concat "\n" file "\n") nil t) - (goto-char (point-max)) - (insert (concat "\n" file "\n")) - (write-region (point-min) (point-max) hgignore)))))) +(defun vc-hg-ignore (file &optional directory remove) + "Ignore FILE under Mercurial. +If DIRECTORY is non-nil, the repository to use will be deduced by +DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." + (let (hgignore) + (if directory + (setq hgignore (vc-hg-find-ignore-file directory)) + (setq hgignore (vc-hg-find-ignore-file default-directory))) + (if remove + (vc--remove-regexp file hgignore) + (vc--add-line file hgignore)))) + +(defun vc-hg-ignore-completion-table (file) + "Return the list of ignored files." + (vc--read-lines (vc-hg-find-ignore-file file))) + +(defun vc-hg-find-ignore-file (file) + "Return the root directory of the repository of FILE." + (expand-file-name ".hgignore" + (vc-hg-root file))) ;; Modeled after the similar function in vc-bzr.el (defun vc-hg-checkout (file &optional _editable rev) === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2013-07-30 03:46:06 +0000 +++ lisp/vc/vc-svn.el 2013-08-04 02:55:45 +0000 @@ -352,10 +352,16 @@ (concat "-r" rev)) (vc-switches 'SVN 'checkout)))) -(defun vc-svn-ignore (file) - "Ignore FILE under Subversion." +(defun vc-svn-ignore (file &optional directory remove) + "Ignore FILE under Subversion. +If DIRECTORY is non-nil, the repository to use will be deduced by +DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." (vc-svn-command t 0 file "propedit" "svn:ignore")) +(defun vc-svn-ignore-completion-table (file) + "Return the list of ignored files." + ) + (defun vc-svn-checkout (file &optional editable rev) (message "Checking out %s..." file) (with-current-buffer (or (get-file-buffer file) (current-buffer)) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-07-30 00:25:31 +0000 +++ lisp/vc/vc.el 2013-08-04 02:55:45 +0000 @@ -486,6 +486,7 @@ ;; default implementation always returns nil. ;; ;; - root (file) +;; ;; Return the root of the VC controlled hierarchy for file. ;; ;; - repository-hostname (dirname) @@ -496,6 +497,18 @@ ;; This function is used in `vc-stay-local-p' which backends can use ;; for their convenience. ;; +;; - ignore (file &optional remove) +;; +;; Ignore FILE under the current VCS. When called interactively and +;; with a prefix argument, remove an ignored file. When called from +;; Lisp code, if REMOVE is non-nil, remove FILE from ignored files." +;; +;; - ignore-completion-table +;; +;; Return the completion table for files ignored by the current +;; version control system, e.g., the entries in `.gitignore' and +;; `.bzrignore'. +;; ;; - previous-revision (file rev) ;; ;; Return the revision number that precedes REV for FILE, or nil if no such @@ -576,9 +589,6 @@ ;; ;; - deal with push/pull operations. ;; -;; - add a mechanism for editing the underlying VCS's list of files -;; to be ignored, when that's possible. -;; ;;;; Primitives that need changing: ;; ;; - vc-update/vc-merge should deal with VC systems that don't @@ -1332,11 +1342,57 @@ (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) -(defun vc-ignore (file) - "Ignore FILE under the current VCS." - (interactive "fIgnore file: ") - (let ((backend (vc-backend file))) - (vc-call-backend backend 'ignore file))) +(defun vc-ignore (file &optional directory remove) + "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). +When called interactively and with a prefix argument, remove FILE +from ignored files. +When called from Lisp code, if DIRECTORY is non-nil, the +repository to use will be deduced by DIRECTORY; if REMOVE is +non-nil, remove FILE from ignored files." + (interactive + (if (null current-prefix-arg) + (list (read-file-name "The file to ignore: ")) + (list + (completing-read + "The file to remove: " + (vc-call-backend + (vc-backend default-directory) + 'ignore-completion-table default-directory))))) + (let (backend) + (if directory + (progn (setq backend (vc-backend default-directory)) + (vc-call-backend backend 'ignore file directory remove)) + (setq backend (vc-backend directory)) + (vc-call-backend backend 'ignore file default-directory remove)))) + +(defun vc-default-ignore-completion-table (file) + "Return the list of ignored files." + ;; Unused lexical argument `file' + nil) + +(defun vc--read-lines (file) + "Return a list of lines of FILE." + (with-temp-buffer + (insert-file-contents file) + (split-string (buffer-string) "\n" t))) + +;; Subroutine for `vc-git-ignore' and `vc-hg-ignore'. +(defun vc--add-line (string file) + "Add STRING as a line to FILE." + (with-temp-buffer + (insert-file-contents file) + (unless (re-search-forward (concat "^" (regexp-quote string) "$") nil t) + (goto-char (point-max)) + (insert (concat "\n" string)) + (write-region (point-min) (point-max) file)))) + +(defun vc--remove-regexp (regexp file) + "Remove all matching for REGEXP in FILE." + (with-temp-buffer + (insert-file-contents file) + (while (re-search-forward regexp nil t) + (replace-match "")) + (write-region (point-min) (point-max) file))) (defun vc-checkout (file &optional writable rev) "Retrieve a copy of the revision REV of FILE. ------------------------------------------------------------ revno: 113681 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-04 04:57:45 +0200 message: lisp/frameset.el (frameset--reuse-frame): Use correct frame-id to find frame. (frameset--set-id, frameset--process-minibuffer-frames) (frameset-restore): Rename parameter `frameset-id' to `frame-id'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-04 00:58:32 +0000 +++ lisp/ChangeLog 2013-08-04 02:57:45 +0000 @@ -3,6 +3,9 @@ * frameset.el (frameset-p, frameset-save): Fix autoload cookies. (frameset-filter-minibuffer): Doc fix. (frameset-restore): Fix autoload cookie. Fix typo in docstring. + (frameset--set-id, frameset--process-minibuffer-frames) + (frameset-restore): Rename parameter `frameset-id' to `frame-id'. + (frameset--reuse-frame): Pass correct frame-id to frameset--find-frame. * desktop.el (desktop-clear): Only delete frames when called interactively and desktop-restore-frames is non-nil. Doc fix. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-04 00:58:32 +0000 +++ lisp/frameset.el 2013-08-04 02:57:45 +0000 @@ -265,11 +265,11 @@ ;; Saving framesets (defun frameset--set-id (frame) - "Set FRAME's `frameset-id' if not yet set. + "Set FRAME's `frame-id' if not yet set. Internal use only." - (unless (frame-parameter frame 'frameset-id) + (unless (frame-parameter frame 'frame-id) (set-frame-parameter frame - 'frameset-id + 'frame-id (mapconcat (lambda (n) (format "%04X" n)) (cl-loop repeat 4 collect (random 65536)) "-")))) @@ -292,11 +292,11 @@ (unless (frame-parameter frame 'frameset--mini) (frameset--set-id frame) (let* ((mb-frame (window-frame (minibuffer-window frame))) - (id (and mb-frame (frame-parameter mb-frame 'frameset-id)))) + (id (and mb-frame (frame-parameter mb-frame 'frame-id)))) (if (null id) (error "Minibuffer frame %S for %S is excluded" mb-frame frame) ;; For minibufferless frames, frameset--mini is a cons - ;; (nil . FRAME-ID), where FRAME-ID is the frameset-id of + ;; (nil . FRAME-ID), where FRAME-ID is the frame-id of ;; the frame containing its minibuffer window. (set-frame-parameter frame 'frameset--mini @@ -430,8 +430,8 @@ ;; M-x desktop-read). (setq frame (frameset--find-frame (lambda (f id) - (string= (frame-parameter f 'frameset-id) id)) - display (cdr mini))) + (string= (frame-parameter f 'frame-id) id)) + display (cdr (assq 'frame-id frame-cfg)))) ;; If it has not been loaded, and it is not a minibuffer-only frame, ;; let's look for an existing non-minibuffer-only frame to reuse. (unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only)) @@ -446,12 +446,12 @@ ;; For minibufferless frames, check whether they already exist, ;; and that they are linked to the right minibuffer frame. (setq frame (frameset--find-frame - (lambda (f id mini-id) - (and (string= (frame-parameter f 'frameset-id) id) - (string= (frame-parameter (window-frame (minibuffer-window f)) - 'frameset-id) - mini-id))) - display (cdr (assq 'frameset-id frame-cfg)) (cdr mini)))) + (lambda (f id mini-id) + (and (string= (frame-parameter f 'frame-id) id) + (string= (frame-parameter (window-frame (minibuffer-window f)) + 'frame-id) + mini-id))) + display (cdr (assq 'frame-id frame-cfg)) (cdr mini)))) (t ;; Default to just finding a frame in the same display. (setq frame (frameset--find-frame nil display)))) @@ -647,7 +647,7 @@ (t ;; Frame depends on other frame's minibuffer window. (let* ((mb-frame (or (cl-find-if (lambda (f) - (string= (frame-parameter f 'frameset-id) + (string= (frame-parameter f 'frame-id) mb-id)) (frame-list)) (error "Minibuffer frame %S not found" mb-id))) ------------------------------------------------------------ revno: 113680 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-08-03 19:30:11 -0700 message: * test/automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): Try more precise TZ specification. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-03 16:44:18 +0000 +++ test/ChangeLog 2013-08-04 02:30:11 +0000 @@ -1,3 +1,8 @@ +2013-08-04 Glenn Morris + + * automated/icalendar-tests.el (icalendar-tests--test-export) + (icalendar-tests--test-import): Try more precise TZ specification. + 2013-08-03 Glenn Morris * automated/core-elisp-tests.el (core-elisp-tests): Fix defcustom. === modified file 'test/automated/icalendar-tests.el' --- test/automated/icalendar-tests.el 2013-08-03 16:44:18 +0000 +++ test/automated/icalendar-tests.el 2013-08-04 02:30:11 +0000 @@ -434,7 +434,7 @@ (unwind-protect (progn (message "Current time zone: %s" (current-time-zone)) - (setenv "TZ" "CET") + (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") (message "Current time zone: %s" (current-time-zone)) (when input-iso (let ((calendar-month-name-array @@ -677,7 +677,7 @@ (unwind-protect (progn (message "Current time zone: %s" (current-time-zone)) - (setenv "TZ" "CET") + (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") (message "Current time zone: %s" (current-time-zone)) (with-temp-buffer (if (string-match "^BEGIN:VCALENDAR" input) ------------------------------------------------------------ revno: 113679 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-04 03:43:26 +0200 message: etc/NEWS: Fix description of frame-restoring options. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-08-03 15:10:13 +0000 +++ etc/NEWS 2013-08-04 01:43:26 +0000 @@ -274,8 +274,8 @@ *** `desktop-restore-frames', enabled by default, allows saving and restoring the window/frame configuration. Additional options -`desktop-restore-in-current-display' and -`desktop-restoring-reuses-frames' allow further customization. +`desktop-restore-in-current-display', `desktop-restore-reuses-frames' +and `desktop-restore-forces-onscreen' allow further customization. ** Dired ------------------------------------------------------------ revno: 113678 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-04 02:58:32 +0200 message: lisp/frameset.el: Fix typos and autoload cookies. (frameset-p, frameset-save): Fix autoload cookies. (frameset-filter-minibuffer): Doc fix. (frameset-restore): Fix autoload cookie. Fix typo in docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-04 00:31:33 +0000 +++ lisp/ChangeLog 2013-08-04 00:58:32 +0000 @@ -1,5 +1,9 @@ 2013-08-04 Juanma Barranquero + * frameset.el (frameset-p, frameset-save): Fix autoload cookies. + (frameset-filter-minibuffer): Doc fix. + (frameset-restore): Fix autoload cookie. Fix typo in docstring. + * desktop.el (desktop-clear): Only delete frames when called interactively and desktop-restore-frames is non-nil. Doc fix. (desktop-read): Set desktop-saved-frameset to nil. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-03 13:33:22 +0000 +++ lisp/frameset.el 2013-08-04 00:58:32 +0000 @@ -71,7 +71,7 @@ This is a deep copy done with `copy-tree'." (copy-tree frameset t)) -;;;autoload +;;;###autoload (defun frameset-p (frameset) "If FRAMESET is a frameset, return its :version. Else return nil." @@ -179,7 +179,7 @@ (not (string-match-p "^unspecified-[fb]g$" (cdr current))))) (defun frameset-filter-minibuffer (current _filtered _parameters saving) - "Convert (minibuffer . #) parameter to (minibuffer . t)." + "When saving, convert (minibuffer . #) parameter to (minibuffer . t)." (or (not saving) (if (windowp (cdr current)) '(minibuffer . t) @@ -302,7 +302,7 @@ 'frameset--mini (cons nil id))))))) -;;;autoload +;;;###autoload (cl-defun frameset-save (frame-list &key filters predicate properties) "Return the frameset of FRAME-LIST, a list of frames. If nil, FRAME-LIST defaults to all live frames. @@ -547,11 +547,11 @@ to delete a frame whose minibuffer window is used by another frame." (not (frame-parameter frame1 'minibuffer))) -;;;autoload +;;;###autoload (cl-defun frameset-restore (frameset &key filters reuse-frames force-display force-onscreen) "Restore a FRAMESET into the current display(s). -FILTERS is a list of parameter filters; defaults to `frameset-filter-alist'. +FILTERS is an alist of parameter filters; defaults to `frameset-filter-alist'. REUSE-FRAMES describes how to reuse existing frames while restoring a frameset: t Reuse any existing frame if possible; delete leftover frames. ------------------------------------------------------------ revno: 113677 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-04 02:31:33 +0200 message: lisp/desktop.el (desktop-clear): Be more careful about deleting frames. Do it only when called interactively and desktop-restore-frames is non-nil. Doc fix. (desktop-read): Set desktop-saved-frameset to nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-03 09:57:07 +0000 +++ lisp/ChangeLog 2013-08-04 00:31:33 +0000 @@ -1,3 +1,9 @@ +2013-08-04 Juanma Barranquero + + * desktop.el (desktop-clear): Only delete frames when called + interactively and desktop-restore-frames is non-nil. Doc fix. + (desktop-read): Set desktop-saved-frameset to nil. + 2013-08-03 Juanma Barranquero * frameset.el (frameset-prop): New function and setter. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-08-02 04:33:58 +0000 +++ lisp/desktop.el 2013-08-04 00:31:33 +0000 @@ -643,7 +643,10 @@ "Empty the Desktop. This kills all buffers except for internal ones and those with names matched by a regular expression in the list `desktop-clear-preserve-buffers'. -Furthermore, it clears the variables listed in `desktop-globals-to-clear'." +Furthermore, it clears the variables listed in `desktop-globals-to-clear'. +When called interactively and `desktop-restore-frames' is non-nil, it also +deletes all frames except the selected one (and its minibuffer frame, +if different)." (interactive) (desktop-lazy-abort) (dolist (var desktop-globals-to-clear) @@ -662,16 +665,20 @@ (string-match-p preserve-regexp bufname)) (kill-buffer buffer))))) (delete-other-windows) - (let* ((this (selected-frame)) - (mini (window-frame (minibuffer-window this)))) ; in case they difer - (dolist (frame (sort (frame-list) #'frameset-sort-frames-for-deletion)) - (condition-case err - (unless (or (eq frame this) - (eq frame mini) - (frame-parameter frame 'desktop-dont-clear)) - (delete-frame frame)) - (error - (delay-warning 'desktop (error-message-string err))))))) + (when (and desktop-restore-frames + ;; Non-interactive calls to desktop-clear happen before desktop-read + ;; which already takes care of frame restoration and deletion. + (called-interactively-p 'any)) + (let* ((this (selected-frame)) + (mini (window-frame (minibuffer-window this)))) ; in case they difer + (dolist (frame (sort (frame-list) #'frameset-sort-frames-for-deletion)) + (condition-case err + (unless (or (eq frame this) + (eq frame mini) + (frame-parameter frame 'desktop-dont-clear)) + (delete-frame frame)) + (error + (delay-warning 'desktop (error-message-string err)))))))) ;; ---------------------------------------------------------------------------- (unless noninteractive @@ -1152,6 +1159,7 @@ (walk-window-tree (lambda (window) (set-window-prev-buffers window nil) (set-window-next-buffers window nil)))) + (setq desktop-saved-frameset nil) t)) ;; No desktop file found. (desktop-clear) ------------------------------------------------------------ revno: 113676 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-08-03 14:09:57 -0700 message: * composite.h: Minor fixups. (composition_registered_p): Rename from COMPOSITION_REGISTERD_P to fix a misspelling, and change it to an inline function while we're at it (it need not be a macro). All uses changed. (composition_method, composition_valid_p): Rewrite to avoid assignments in if-conditions. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-03 18:23:23 +0000 +++ src/ChangeLog 2013-08-03 21:09:57 +0000 @@ -1,3 +1,12 @@ +2013-08-03 Paul Eggert + + * composite.h: Minor fixups. + (composition_registered_p): Rename from COMPOSITION_REGISTERD_P + to fix a misspelling, and change it to an inline function while + we're at it (it need not be a macro). All uses changed. + (composition_method, composition_valid_p): + Rewrite to avoid assignments in if-conditions. + 2013-08-03 Dmitry Antipov Do not use global Lisp_Object in composition macros. === modified file 'src/composite.c' --- src/composite.c 2013-08-03 18:16:43 +0000 +++ src/composite.c 2013-08-03 21:09:57 +0000 @@ -1873,7 +1873,7 @@ if (NILP (detail_p)) return list3 (make_number (start), make_number (end), Qt); - if (COMPOSITION_REGISTERD_P (prop)) + if (composition_registered_p (prop)) id = COMPOSITION_ID (prop); else { === modified file 'src/composite.h' --- src/composite.h 2013-08-03 18:23:23 +0000 +++ src/composite.h 2013-08-03 21:09:57 +0000 @@ -49,34 +49,38 @@ /* Maximum number of components a single composition can have. */ #define MAX_COMPOSITION_COMPONENTS 16 -/* These macros access information about a composition that +/* These operations access information about a composition that has `composition' property PROP. PROP is: ((LENGTH . COMPONENTS) . MODIFICATION-FUNC) or (COMPOSITION-ID . (LENGTH COMPONENTS . MODIFICATION-FUNC)) They don't check validity of PROP. */ -/* Return 1 if the composition is already registered. */ -#define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) +/* Return true if PROP is already registered. */ +COMPOSITE_INLINE bool +composition_registered_p (Lisp_Object prop) +{ + return INTEGERP (XCAR (prop)); +} /* Return ID number of the already registered composition. */ #define COMPOSITION_ID(prop) XINT (XCAR (prop)) /* Return length of the composition. */ #define COMPOSITION_LENGTH(prop) \ - (COMPOSITION_REGISTERD_P (prop) \ + (composition_registered_p (prop) \ ? XINT (XCAR (XCDR (prop))) \ : XINT (XCAR (XCAR (prop)))) /* Return components of the composition. */ #define COMPOSITION_COMPONENTS(prop) \ - (COMPOSITION_REGISTERD_P (prop) \ + (composition_registered_p (prop) \ ? XCAR (XCDR (XCDR (prop))) \ : XCDR (XCAR (prop))) /* Return modification function of the composition. */ #define COMPOSITION_MODIFICATION_FUNC(prop) \ - (COMPOSITION_REGISTERD_P (prop) \ + (composition_registered_p (prop) \ ? XCDR (XCDR (XCDR (prop))) \ : CONSP (prop) ? XCDR (prop) : Qnil) @@ -199,43 +203,42 @@ extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object, Lisp_Object); -/* Return the method of composition. */ +/* Return the method of a composition with property PROP. */ + COMPOSITE_INLINE enum composition_method composition_method (Lisp_Object prop) { - Lisp_Object temp; - - return (COMPOSITION_REGISTERD_P (prop) - ? composition_table[COMPOSITION_ID (prop)]->method - : (temp = XCDR (XCAR (prop)), - (NILP (temp) + if (composition_registered_p (prop)) + return composition_table[COMPOSITION_ID (prop)]->method; + else + { + Lisp_Object temp = XCDR (XCAR (prop)); + return (NILP (temp) ? COMPOSITION_RELATIVE - : (INTEGERP (temp) || STRINGP (temp)) + : INTEGERP (temp) || STRINGP (temp) ? COMPOSITION_WITH_ALTCHARS - : COMPOSITION_WITH_RULE_ALTCHARS))); + : COMPOSITION_WITH_RULE_ALTCHARS); + } } -/* Return 1 if the composition is valid. It is valid if - length of the composition equals to (END - START). */ +/* Given offsets START and END, return true if PROP is a valid composition + property with length END - START. */ + COMPOSITE_INLINE bool composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop) { - Lisp_Object temp; - return (CONSP (prop) - && (COMPOSITION_REGISTERD_P (prop) + && (composition_registered_p (prop) ? (COMPOSITION_ID (prop) >= 0 && COMPOSITION_ID (prop) <= n_compositions && CONSP (XCDR (prop))) - : (temp = XCAR (prop), - (CONSP (temp) - && (temp = XCDR (temp), - (NILP (temp) - || STRINGP (temp) - || VECTORP (temp) - || INTEGERP (temp) - || CONSP (temp)))))) - && (end - start) == COMPOSITION_LENGTH (prop)); + : (CONSP (XCAR (prop)) + && (NILP (XCDR (XCAR (prop))) + || STRINGP (XCDR (XCAR (prop))) + || VECTORP (XCDR (XCAR (prop))) + || INTEGERP (XCDR (XCAR (prop))) + || CONSP (XCDR (XCAR (prop)))))) + && COMPOSITION_LENGTH (prop) == end - start); } /* Macros for lispy glyph-string. This is completely different from ------------------------------------------------------------ revno: 113675 committer: Dmitry Antipov branch nick: trunk timestamp: Sat 2013-08-03 22:23:23 +0400 message: * composite.h (compose_region): Remove the leftover. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-03 18:16:43 +0000 +++ src/ChangeLog 2013-08-03 18:23:23 +0000 @@ -4,6 +4,7 @@ * composite.h (composition_temp): Remove declaration. (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with... (composition_method, composition_valid_p): ...inline functions. + (compose_region): Remove the leftover. * composite.c (composition_temp): Remove. (run_composition_function, update_compositions) (composition_compute_stop_pos, composition_adjust_point) === modified file 'src/composite.h' --- src/composite.h 2013-08-03 18:16:43 +0000 +++ src/composite.h 2013-08-03 18:23:23 +0000 @@ -195,8 +195,6 @@ Lisp_Object *, Lisp_Object); extern void update_compositions (ptrdiff_t, ptrdiff_t, int); extern void make_composition_value_copy (Lisp_Object); -extern void compose_region (int, int, Lisp_Object, Lisp_Object, - Lisp_Object); extern void syms_of_composite (void); extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object, Lisp_Object); ------------------------------------------------------------ revno: 113674 committer: Dmitry Antipov branch nick: trunk timestamp: Sat 2013-08-03 22:16:43 +0400 message: Do not use global Lisp_Object in composition macros. * composite.h (composition_temp): Remove declaration. (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with... (composition_method, composition_valid_p): ...inline functions. * composite.c (composition_temp): Remove. (run_composition_function, update_compositions) (composition_compute_stop_pos, composition_adjust_point) (Ffind_composition_internal): * coding.c (handle_composition_annotation): * xdisp.c (handle_composition_prop, check_point_in_composition): Related users changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-03 03:29:03 +0000 +++ src/ChangeLog 2013-08-03 18:16:43 +0000 @@ -1,5 +1,19 @@ 2013-08-03 Dmitry Antipov + Do not use global Lisp_Object in composition macros. + * composite.h (composition_temp): Remove declaration. + (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with... + (composition_method, composition_valid_p): ...inline functions. + * composite.c (composition_temp): Remove. + (run_composition_function, update_compositions) + (composition_compute_stop_pos, composition_adjust_point) + (Ffind_composition_internal): + * coding.c (handle_composition_annotation): + * xdisp.c (handle_composition_prop, check_point_in_composition): + Related users changed. + +2013-08-03 Dmitry Antipov + Drop FRAME_PTR typedef. * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h: * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c: === modified file 'src/coding.c' --- src/coding.c 2013-07-20 11:51:53 +0000 +++ src/coding.c 2013-08-03 18:16:43 +0000 @@ -7497,7 +7497,7 @@ /* We found a composition. Store the corresponding annotation data in BUF. */ int *head = buf; - enum composition_method method = COMPOSITION_METHOD (prop); + enum composition_method method = composition_method (prop); int nchars = COMPOSITION_LENGTH (prop); ADD_COMPOSITION_DATA (buf, nchars, 0, method); === modified file 'src/composite.c' --- src/composite.c 2013-08-03 03:29:03 +0000 +++ src/composite.c 2013-08-03 18:16:43 +0000 @@ -160,10 +160,6 @@ auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 -/* Temporary variable used in macros COMPOSITION_XXX. */ -Lisp_Object composition_temp; - - /* Return COMPOSITION-ID of a composition at buffer position CHARPOS/BYTEPOS and length NCHARS. The `composition' property of the sequence is PROP. STRING, if non-nil, is a string that @@ -478,11 +474,11 @@ valid too. */ if (from > BEGV && find_composition (from - 1, -1, &start, &end, &prop, Qnil) - && !COMPOSITION_VALID_P (start, end, prop)) + && !composition_valid_p (start, end, prop)) from = start; if (to < ZV && find_composition (to, -1, &start, &end, &prop, Qnil) - && !COMPOSITION_VALID_P (start, end, prop)) + && !composition_valid_p (start, end, prop)) to = end; if (!NILP (Ffboundp (func))) call2 (func, make_number (from), make_number (to)); @@ -524,7 +520,7 @@ latter to the copy of it. */ if (from > BEGV && find_composition (from - 1, -1, &start, &end, &prop, Qnil) - && COMPOSITION_VALID_P (start, end, prop)) + && composition_valid_p (start, end, prop)) { min_pos = start; if (end > to) @@ -538,7 +534,7 @@ } else if (from < ZV && find_composition (from, -1, &start, &from, &prop, Qnil) - && COMPOSITION_VALID_P (start, from, prop)) + && composition_valid_p (start, from, prop)) { if (from > to) max_pos = from; @@ -553,7 +549,7 @@ (to - 1). */ while (from < to - 1 && find_composition (from, to, &start, &from, &prop, Qnil) - && COMPOSITION_VALID_P (start, from, prop) + && composition_valid_p (start, from, prop) && from < to - 1) run_composition_function (start, from, prop); } @@ -562,7 +558,7 @@ { if (from < to && find_composition (to - 1, -1, &start, &end, &prop, Qnil) - && COMPOSITION_VALID_P (start, end, prop)) + && composition_valid_p (start, end, prop)) { /* TO should be also at composition boundary. But, insertion or deletion will make two compositions adjacent @@ -580,7 +576,7 @@ } else if (to < ZV && find_composition (to, -1, &start, &end, &prop, Qnil) - && COMPOSITION_VALID_P (start, end, prop)) + && composition_valid_p (start, end, prop)) { run_composition_function (start, end, prop); max_pos = end; @@ -1012,7 +1008,7 @@ if (charpos < endpos && find_composition (charpos, endpos, &start, &end, &prop, string) && start >= charpos - && COMPOSITION_VALID_P (start, end, prop)) + && composition_valid_p (start, end, prop)) { cmp_it->stop_pos = endpos = start; cmp_it->ch = -1; @@ -1672,7 +1668,7 @@ /* At first check the static composition. */ if (get_property_and_range (new_pt, Qcomposition, &val, &beg, &end, Qnil) - && COMPOSITION_VALID_P (beg, end, val)) + && composition_valid_p (beg, end, val)) { if (beg < new_pt /* && end > new_pt <- It's always the case. */ && (last_pt <= beg || last_pt >= end)) @@ -1872,7 +1868,7 @@ && (e <= XINT (pos) ? e > end : s < start)) return list3 (make_number (s), make_number (e), gstring); } - if (!COMPOSITION_VALID_P (start, end, prop)) + if (!composition_valid_p (start, end, prop)) return list3 (make_number (start), make_number (end), Qnil); if (NILP (detail_p)) return list3 (make_number (start), make_number (end), Qt); @@ -1890,7 +1886,7 @@ if (id >= 0) { Lisp_Object components, relative_p, mod_func; - enum composition_method method = COMPOSITION_METHOD (prop); + enum composition_method method = composition_method (prop); int width = composition_table[id]->width; components = Fcopy_sequence (COMPOSITION_COMPONENTS (prop)); === modified file 'src/composite.h' --- src/composite.h 2013-01-01 09:11:05 +0000 +++ src/composite.h 2013-08-03 18:16:43 +0000 @@ -56,9 +56,6 @@ (COMPOSITION-ID . (LENGTH COMPONENTS . MODIFICATION-FUNC)) They don't check validity of PROP. */ -/* Temporary variable used only in the following macros. */ -extern Lisp_Object composition_temp; - /* Return 1 if the composition is already registered. */ #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) @@ -83,35 +80,6 @@ ? XCDR (XCDR (XCDR (prop))) \ : CONSP (prop) ? XCDR (prop) : Qnil) -/* Return the method of composition. */ -#define COMPOSITION_METHOD(prop) \ - (COMPOSITION_REGISTERD_P (prop) \ - ? composition_table[COMPOSITION_ID (prop)]->method \ - : (composition_temp = XCDR (XCAR (prop)), \ - (NILP (composition_temp) \ - ? COMPOSITION_RELATIVE \ - : (INTEGERP (composition_temp) || STRINGP (composition_temp)) \ - ? COMPOSITION_WITH_ALTCHARS \ - : COMPOSITION_WITH_RULE_ALTCHARS))) - -/* Return 1 if the composition is valid. It is valid if length of - the composition equals to (END - START). */ -#define COMPOSITION_VALID_P(start, end, prop) \ - (CONSP (prop) \ - && (COMPOSITION_REGISTERD_P (prop) \ - ? (COMPOSITION_ID (prop) >= 0 \ - && COMPOSITION_ID (prop) <= n_compositions \ - && CONSP (XCDR (prop))) \ - : (composition_temp = XCAR (prop), \ - (CONSP (composition_temp) \ - && (composition_temp = XCDR (composition_temp), \ - (NILP (composition_temp) \ - || STRINGP (composition_temp) \ - || VECTORP (composition_temp) \ - || INTEGERP (composition_temp) \ - || CONSP (composition_temp)))))) \ - && (end - start) == COMPOSITION_LENGTH (prop)) - /* Return the Nth glyph of composition specified by CMP. CMP is a pointer to `struct composition'. */ #define COMPOSITION_GLYPH(cmp, n) \ @@ -233,6 +201,45 @@ extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object, Lisp_Object); +/* Return the method of composition. */ +COMPOSITE_INLINE enum composition_method +composition_method (Lisp_Object prop) +{ + Lisp_Object temp; + + return (COMPOSITION_REGISTERD_P (prop) + ? composition_table[COMPOSITION_ID (prop)]->method + : (temp = XCDR (XCAR (prop)), + (NILP (temp) + ? COMPOSITION_RELATIVE + : (INTEGERP (temp) || STRINGP (temp)) + ? COMPOSITION_WITH_ALTCHARS + : COMPOSITION_WITH_RULE_ALTCHARS))); +} + +/* Return 1 if the composition is valid. It is valid if + length of the composition equals to (END - START). */ +COMPOSITE_INLINE bool +composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop) +{ + Lisp_Object temp; + + return (CONSP (prop) + && (COMPOSITION_REGISTERD_P (prop) + ? (COMPOSITION_ID (prop) >= 0 + && COMPOSITION_ID (prop) <= n_compositions + && CONSP (XCDR (prop))) + : (temp = XCAR (prop), + (CONSP (temp) + && (temp = XCDR (temp), + (NILP (temp) + || STRINGP (temp) + || VECTORP (temp) + || INTEGERP (temp) + || CONSP (temp)))))) + && (end - start) == COMPOSITION_LENGTH (prop)); +} + /* Macros for lispy glyph-string. This is completely different from struct glyph_string. */ === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-03 03:29:03 +0000 +++ src/xdisp.c 2013-08-03 18:16:43 +0000 @@ -5346,7 +5346,7 @@ composition (in the case that the composition is from the current buffer), draw a glyph composed from the composition components. */ if (find_composition (pos, -1, &start, &end, &prop, string) - && COMPOSITION_VALID_P (start, end, prop) + && composition_valid_p (start, end, prop) && (STRINGP (it->string) || (PT <= start || PT >= end))) { if (start < pos) @@ -12852,7 +12852,7 @@ if (prev_pt > BUF_BEGV (buf) && prev_pt < BUF_ZV (buf) && find_composition (prev_pt, -1, &start, &end, &prop, buffer) - && COMPOSITION_VALID_P (start, end, prop) + && composition_valid_p (start, end, prop) && start < prev_pt && end > prev_pt) /* The last point was within the composition. Return 1 iff point moved out of the composition. */ @@ -12862,7 +12862,7 @@ /* Check a composition at the current point. */ return (pt > BUF_BEGV (buf) && pt < BUF_ZV (buf) && find_composition (pt, -1, &start, &end, &prop, buffer) - && COMPOSITION_VALID_P (start, end, prop) + && composition_valid_p (start, end, prop) && start < pt && end > pt); } ------------------------------------------------------------ revno: 113673 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-08-03 09:44:18 -0700 message: * test/automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): Add debug messages. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-03 01:43:30 +0000 +++ test/ChangeLog 2013-08-03 16:44:18 +0000 @@ -4,7 +4,7 @@ * automated/icalendar-tests.el (icalendar-tests--test-export) (icalendar-tests--test-import): - Use getenv/setenv rather than set-time-zone-rule. + Use getenv/setenv rather than set-time-zone-rule. Add debug messages. (icalendar-tests--test-import): Reset zone even if error occurred. 2013-08-02 Stefan Monnier === modified file 'test/automated/icalendar-tests.el' --- test/automated/icalendar-tests.el 2013-08-03 01:02:51 +0000 +++ test/automated/icalendar-tests.el 2013-08-03 16:44:18 +0000 @@ -433,7 +433,9 @@ (icalendar-recurring-start-year 2000)) (unwind-protect (progn + (message "Current time zone: %s" (current-time-zone)) (setenv "TZ" "CET") + (message "Current time zone: %s" (current-time-zone)) (when input-iso (let ((calendar-month-name-array ["January" "February" "March" "April" "May" "June" "July" "August" @@ -674,7 +676,9 @@ (let ((timezone (getenv "TZ"))) (unwind-protect (progn + (message "Current time zone: %s" (current-time-zone)) (setenv "TZ" "CET") + (message "Current time zone: %s" (current-time-zone)) (with-temp-buffer (if (string-match "^BEGIN:VCALENDAR" input) (insert input) ------------------------------------------------------------ revno: 113672 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-03 17:10:13 +0200 message: etc/NEWS: Document new package frameset.el. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-03 02:57:00 +0000 +++ etc/ChangeLog 2013-08-03 15:10:13 +0000 @@ -1,3 +1,7 @@ +2013-08-03 Juanma Barranquero + + * NEWS: Document new package frameset.el. + 2013-08-03 Xue Fuqiao * TODO: Adjust entry about bug reporting. === modified file 'etc/NEWS' --- etc/NEWS 2013-08-02 21:16:33 +0000 +++ etc/NEWS 2013-08-03 15:10:13 +0000 @@ -516,6 +516,12 @@ - advice-add/advice-remove to add/remove a piece of advice on a named function, much like `defadvice' does. +** New frameset.el package. +It provides a set of operations to save a frameset (the state of all +or a subset of the existing frames and windows, somewhat similar to a +frame configuration), both in-session and persistently, and restore it +at some point in the future. + +++ ** The package filenotify.el provides an interface for file system notifications. It requires, that Emacs is compiled with one of the ------------------------------------------------------------ revno: 113671 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-03 15:33:22 +0200 message: lisp/frameset.el (frameset-prop): Preserve `setf' semantics in setter. diff: === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-03 09:57:07 +0000 +++ lisp/frameset.el 2013-08-03 13:33:22 +0000 @@ -87,11 +87,13 @@ (setf (frameset-prop FRAMESET PROP) NEW-VALUE)" (plist-get (frameset-properties frameset) prop)) -(gv-define-setter frameset-prop (v fs prop) - `(progn - (cl-assert (not (eq ,prop :version)) t ":version can not be set") - (setf (frameset-properties ,fs) - (plist-put (frameset-properties ,fs) ,prop ,v)))) +(gv-define-setter frameset-prop (val fs prop) + (macroexp-let2 nil v val + `(progn + (cl-assert (not (eq ,prop :version)) t ":version can not be set") + (setf (frameset-properties ,fs) + (plist-put (frameset-properties ,fs) ,prop ,v)) + ,v))) ;; Filtering ------------------------------------------------------------ revno: 113670 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-03 11:57:07 +0200 message: lisp/frameset.el (frameset-prop): New function and setter. (frameset-save): Do not modify frame list passed by the caller. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-03 02:34:22 +0000 +++ lisp/ChangeLog 2013-08-03 09:57:07 +0000 @@ -1,3 +1,8 @@ +2013-08-03 Juanma Barranquero + + * frameset.el (frameset-prop): New function and setter. + (frameset-save): Do not modify frame list passed by the caller. + 2013-08-03 Stefan Monnier * emacs-lisp/package.el (package-desc-from-define): Ignore unknown keys. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-02 16:03:13 +0000 +++ lisp/frameset.el 2013-08-03 09:57:07 +0000 @@ -78,6 +78,21 @@ (and (eq (car-safe frameset) 'frameset) (plist-get (cl-second frameset) :version))) +;; A setf'able accessor to the frameset's properties +(defun frameset-prop (frameset prop) + "Return the value of the PROP property of FRAMESET. + +Properties other than :version can be set with + + (setf (frameset-prop FRAMESET PROP) NEW-VALUE)" + (plist-get (frameset-properties frameset) prop)) + +(gv-define-setter frameset-prop (v fs prop) + `(progn + (cl-assert (not (eq ,prop :version)) t ":version can not be set") + (setf (frameset-properties ,fs) + (plist-put (frameset-properties ,fs) ,prop ,v)))) + ;; Filtering @@ -294,8 +309,9 @@ should be saved; it defaults to saving all frames from FRAME-LIST. PROPERTIES is a user-defined property list to add to the frameset." (let ((frames (cl-delete-if-not #'frame-live-p - (cl-remove-if-not (or predicate #'framep) - (or frame-list (frame-list)))))) + (cl-delete-if-not (or predicate #'framep) + (or (copy-sequence frame-list) + (frame-list)))))) (frameset--process-minibuffer-frames frames) (make-frameset :properties (append '(:version 1) properties) :states (mapcar ------------------------------------------------------------ revno: 113669 committer: Dmitry Antipov branch nick: trunk timestamp: Sat 2013-08-03 07:29:03 +0400 message: Drop FRAME_PTR typedef. * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h: * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c: * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h: * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h: * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h: * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c: * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c: All related users changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-02 21:16:33 +0000 +++ src/ChangeLog 2013-08-03 03:29:03 +0000 @@ -1,3 +1,15 @@ +2013-08-03 Dmitry Antipov + + Drop FRAME_PTR typedef. + * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h: + * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c: + * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h: + * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h: + * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h: + * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c: + * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c: + All related users changed. + 2013-08-02 Stefan Monnier * eval.c (default_toplevel_binding): New function. === modified file 'src/composite.c' --- src/composite.c 2013-07-16 06:39:49 +0000 +++ src/composite.c 2013-08-03 03:29:03 +0000 @@ -901,7 +901,7 @@ Lisp_Object string) { ptrdiff_t count = SPECPDL_INDEX (); - FRAME_PTR f = XFRAME (win->frame); + struct frame *f = XFRAME (win->frame); Lisp_Object pos = make_number (charpos); ptrdiff_t to; ptrdiff_t pt = PT, pt_byte = PT_BYTE; === modified file 'src/font.c' --- src/font.c 2013-08-01 10:33:25 +0000 +++ src/font.c 2013-08-03 03:29:03 +0000 @@ -204,9 +204,9 @@ -static int font_pixel_size (FRAME_PTR f, Lisp_Object); -static Lisp_Object font_open_entity (FRAME_PTR, Lisp_Object, int); -static Lisp_Object font_matching_entity (FRAME_PTR, Lisp_Object *, +static int font_pixel_size (struct frame *f, Lisp_Object); +static Lisp_Object font_open_entity (struct frame *, Lisp_Object, int); +static Lisp_Object font_matching_entity (struct frame *, Lisp_Object *, Lisp_Object); static unsigned font_encode_char (Lisp_Object, int); @@ -269,7 +269,7 @@ /* Return a pixel size of font-spec SPEC on frame F. */ static int -font_pixel_size (FRAME_PTR f, Lisp_Object spec) +font_pixel_size (struct frame *f, Lisp_Object spec) { #ifdef HAVE_WINDOW_SYSTEM Lisp_Object size = AREF (spec, FONT_SIZE_INDEX); @@ -2497,14 +2497,14 @@ is a number frames sharing this cache, and FONT-CACHE-DATA is a cons (FONT-SPEC FONT-ENTITY ...). */ -static void font_prepare_cache (FRAME_PTR, struct font_driver *); -static void font_finish_cache (FRAME_PTR, struct font_driver *); -static Lisp_Object font_get_cache (FRAME_PTR, struct font_driver *); -static void font_clear_cache (FRAME_PTR, Lisp_Object, +static void font_prepare_cache (struct frame *, struct font_driver *); +static void font_finish_cache (struct frame *, struct font_driver *); +static Lisp_Object font_get_cache (struct frame *, struct font_driver *); +static void font_clear_cache (struct frame *, Lisp_Object, struct font_driver *); static void -font_prepare_cache (FRAME_PTR f, struct font_driver *driver) +font_prepare_cache (struct frame *f, struct font_driver *driver) { Lisp_Object cache, val; @@ -2526,7 +2526,7 @@ static void -font_finish_cache (FRAME_PTR f, struct font_driver *driver) +font_finish_cache (struct frame *f, struct font_driver *driver) { Lisp_Object cache, val, tmp; @@ -2547,7 +2547,7 @@ static Lisp_Object -font_get_cache (FRAME_PTR f, struct font_driver *driver) +font_get_cache (struct frame *f, struct font_driver *driver) { Lisp_Object val = driver->get_cache (f); Lisp_Object type = driver->type; @@ -2562,7 +2562,7 @@ static void -font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) +font_clear_cache (struct frame *f, Lisp_Object cache, struct font_driver *driver) { Lisp_Object tail, elt; Lisp_Object tail2, entity; @@ -2760,7 +2760,7 @@ font-related attributes. */ static Lisp_Object -font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) +font_matching_entity (struct frame *f, Lisp_Object *attrs, Lisp_Object spec) { struct font_driver_list *driver_list = f->font_driver_list; Lisp_Object ftype, size, entity; @@ -2806,7 +2806,7 @@ opened font object. */ static Lisp_Object -font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size) +font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size) { struct font_driver_list *driver_list; Lisp_Object objlist, size, val, font_object; @@ -2884,7 +2884,7 @@ /* Close FONT_OBJECT that is opened on frame F. */ static void -font_close_object (FRAME_PTR f, Lisp_Object font_object) +font_close_object (struct frame *f, Lisp_Object font_object) { struct font *font = XFONT_OBJECT (font_object); @@ -2904,7 +2904,7 @@ FONT is a font-entity and it must be opened to check. */ int -font_has_char (FRAME_PTR f, Lisp_Object font, int c) +font_has_char (struct frame *f, Lisp_Object font, int c) { struct font *fontp; @@ -3075,7 +3075,7 @@ character that the entity must support. */ Lisp_Object -font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c) +font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int c) { Lisp_Object work; Lisp_Object entities, val; @@ -3222,7 +3222,7 @@ Lisp_Object -font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_Object spec) +font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Lisp_Object spec) { int size; @@ -3269,7 +3269,7 @@ font-object. */ Lisp_Object -font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) +font_load_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec) { Lisp_Object entity, name; @@ -3298,7 +3298,7 @@ /* Make FACE on frame F ready to use the font opened for FACE. */ void -font_prepare_for_face (FRAME_PTR f, struct face *face) +font_prepare_for_face (struct frame *f, struct face *face) { if (face->font->driver->prepare_face) face->font->driver->prepare_face (f, face); @@ -3308,7 +3308,7 @@ /* Make FACE on frame F stop using the font opened for FACE. */ void -font_done_for_face (FRAME_PTR f, struct face *face) +font_done_for_face (struct frame *f, struct face *face) { if (face->font->driver->done_face) face->font->driver->done_face (f, face); @@ -3320,7 +3320,7 @@ font is found, return Qnil. */ Lisp_Object -font_open_by_spec (FRAME_PTR f, Lisp_Object spec) +font_open_by_spec (struct frame *f, Lisp_Object spec) { Lisp_Object attrs[LFACE_VECTOR_SIZE]; @@ -3344,7 +3344,7 @@ found, return Qnil. */ Lisp_Object -font_open_by_name (FRAME_PTR f, Lisp_Object name) +font_open_by_name (struct frame *f, Lisp_Object name) { Lisp_Object args[2]; Lisp_Object spec, ret; @@ -3374,7 +3374,7 @@ (e.g. syms_of_xfont). */ void -register_font_driver (struct font_driver *driver, FRAME_PTR f) +register_font_driver (struct font_driver *driver, struct frame *f) { struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; struct font_driver_list *prev, *list; @@ -3402,7 +3402,7 @@ } void -free_font_driver_list (FRAME_PTR f) +free_font_driver_list (struct frame *f) { struct font_driver_list *list, *next; @@ -3424,7 +3424,7 @@ F. */ Lisp_Object -font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers) +font_update_drivers (struct frame *f, Lisp_Object new_drivers) { Lisp_Object active_drivers = Qnil; struct font_driver_list *list; @@ -3513,7 +3513,7 @@ } int -font_put_frame_data (FRAME_PTR f, struct font_driver *driver, void *data) +font_put_frame_data (struct frame *f, struct font_driver *driver, void *data) { struct font_data_list *list, *prev; @@ -3547,7 +3547,7 @@ void * -font_get_frame_data (FRAME_PTR f, struct font_driver *driver) +font_get_frame_data (struct frame *f, struct font_driver *driver) { struct font_data_list *list; @@ -3621,7 +3621,7 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w, Lisp_Object string) { - FRAME_PTR f; + struct frame *f; bool multibyte; Lisp_Object font_object; @@ -4234,7 +4234,7 @@ FOR_EACH_FRAME (list, frame) { - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); struct font_driver_list *driver_list = f->font_driver_list; for (; driver_list; driver_list = driver_list->next) @@ -4782,7 +4782,7 @@ (Lisp_Object font_object, Lisp_Object string) { Lisp_Object frame = selected_frame; - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); struct font *font; struct face *face; int i, len, width; === modified file 'src/font.h' --- src/font.h 2013-08-01 10:33:25 +0000 +++ src/font.h 2013-08-03 03:29:03 +0000 @@ -504,7 +504,7 @@ /* Return a cache of font-entities on frame F. The cache must be a cons whose cdr part is the actual cache area. */ - Lisp_Object (*get_cache) (FRAME_PTR F); + Lisp_Object (*get_cache) (struct frame *f); /* List fonts exactly matching with FONT_SPEC on FRAME. The value is a list of font-entities. The font properties to be considered @@ -549,21 +549,21 @@ /* Open a font specified by FONT_ENTITY on frame F. If the font is scalable, open it with PIXEL_SIZE. */ - Lisp_Object (*open) (FRAME_PTR f, Lisp_Object font_entity, + Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity, int pixel_size); /* Close FONT on frame F. */ - void (*close) (FRAME_PTR f, struct font *font); + void (*close) (struct frame *f, struct font *font); /* Optional (if FACE->extra is not used). Prepare FACE for displaying characters by FONT on frame F by storing some data in FACE->extra. If successful, return 0. Otherwise, return -1. */ - int (*prepare_face) (FRAME_PTR f, struct face *face); + int (*prepare_face) (struct frame *f, struct face *face); /* Optional. Done FACE for displaying characters by FACE->font on frame F. */ - void (*done_face) (FRAME_PTR f, struct face *face); + void (*done_face) (struct frame *f, struct face *face); /* Optional. If FONT (FONT-ENTITY or FONT-OBJECT) has a glyph for character C @@ -646,12 +646,12 @@ Make the font driver ready for frame F. Usually this function makes some data specific to F and stores it in F by calling font_put_frame_data (). */ - int (*start_for_frame) (FRAME_PTR f); + int (*start_for_frame) (struct frame *f); /* Optional. End using the driver for frame F. Usually this function free some data stored for F. */ - int (*end_for_frame) (FRAME_PTR f); + int (*end_for_frame) (struct frame *f); /* Optional. @@ -674,7 +674,7 @@ If FONT is usable on frame F, return 0. Otherwise return -1. This method is used only for debugging. If this method is NULL, Emacs assumes that the font is usable on any frame. */ - int (*check) (FRAME_PTR F, struct font *font); + int (*check) (struct frame *f, struct font *font); /* Optional. @@ -698,8 +698,8 @@ /* Chain of font drivers. There's one global font driver list - (font_driver_list in font.c). In addition, each frame has its own - font driver list at FRAME_PTR->font_driver_list. */ + (font_driver_list in font.c). In addition, each frame has + its own font driver list at F->font_driver_list. */ struct font_driver_list { @@ -713,8 +713,8 @@ }; -/* Chain of arbitrary data specific to each font driver. Each frame - has its own font data list at FRAME_PTR->font_data_list. */ +/* Chain of arbitrary data specific to each font driver. + Each frame has its own font data list at F->font_data_list. */ struct font_data_list { @@ -747,22 +747,22 @@ extern Lisp_Object font_get_name (Lisp_Object font_object); extern Lisp_Object font_spec_from_name (Lisp_Object font_name); extern Lisp_Object font_get_frame (Lisp_Object font_object); -extern int font_has_char (FRAME_PTR, Lisp_Object, int); +extern int font_has_char (struct frame *, Lisp_Object, int); extern void font_clear_prop (Lisp_Object *attrs, enum font_property_index prop); -extern Lisp_Object font_find_for_lface (FRAME_PTR f, Lisp_Object *lface, +extern Lisp_Object font_find_for_lface (struct frame *f, Lisp_Object *lface, Lisp_Object spec, int c); -extern Lisp_Object font_open_for_lface (FRAME_PTR f, Lisp_Object entity, +extern Lisp_Object font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *lface, Lisp_Object spec); -extern Lisp_Object font_load_for_lface (FRAME_PTR f, Lisp_Object *lface, +extern Lisp_Object font_load_for_lface (struct frame *f, Lisp_Object *lface, Lisp_Object spec); -extern void font_prepare_for_face (FRAME_PTR f, struct face *face); -extern void font_done_for_face (FRAME_PTR f, struct face *face); +extern void font_prepare_for_face (struct frame *f, struct face *face); +extern void font_done_for_face (struct frame *f, struct face *face); -extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); -extern Lisp_Object font_open_by_name (FRAME_PTR f, Lisp_Object name); +extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec); +extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name); extern Lisp_Object font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol); @@ -777,9 +777,9 @@ char *name, int bytes); extern int font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int bytes); -extern void register_font_driver (struct font_driver *driver, FRAME_PTR f); -extern void free_font_driver_list (FRAME_PTR f); -extern Lisp_Object font_update_drivers (FRAME_PTR f, Lisp_Object list); +extern void register_font_driver (struct font_driver *driver, struct frame *f); +extern void free_font_driver_list (struct frame *f); +extern Lisp_Object font_update_drivers (struct frame *f, Lisp_Object list); extern Lisp_Object font_range (ptrdiff_t, ptrdiff_t, ptrdiff_t *, struct window *, struct face *, Lisp_Object); @@ -788,10 +788,10 @@ extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val); -extern int font_put_frame_data (FRAME_PTR f, +extern int font_put_frame_data (struct frame *f, struct font_driver *driver, void *data); -extern void *font_get_frame_data (FRAME_PTR f, +extern void *font_get_frame_data (struct frame *f, struct font_driver *driver); extern void font_filter_properties (Lisp_Object font, === modified file 'src/fontset.c' --- src/fontset.c 2013-07-16 06:39:49 +0000 +++ src/fontset.c 2013-08-03 03:29:03 +0000 @@ -539,8 +539,9 @@ { Lisp_Object vec, font_group; int i, charset_matched = 0, found_index; - FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset)) - ? XFRAME (FONTSET_FRAME (fontset)) : XFRAME (selected_frame)); + struct frame *f = (FRAMEP (FONTSET_FRAME (fontset)) + ? XFRAME (FONTSET_FRAME (fontset)) + : XFRAME (selected_frame)); Lisp_Object rfont_def; font_group = fontset_get_font_group (fontset, fallback ? -1 : c); @@ -859,7 +860,7 @@ } static void -free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) +free_realized_fontset (struct frame *f, Lisp_Object fontset) { #if 0 Lisp_Object tail; @@ -877,7 +878,7 @@ free_realized_face. */ void -free_face_fontset (FRAME_PTR f, struct face *face) +free_face_fontset (struct frame *f, struct face *face) { Lisp_Object fontset; @@ -930,7 +931,7 @@ the macro FACE_FOR_CHAR. */ int -face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object object) +face_for_char (struct frame *f, struct face *face, int c, int pos, Lisp_Object object) { Lisp_Object fontset, rfont_def, charset; int face_id; @@ -1048,7 +1049,7 @@ Called from realize_x_face. */ int -make_fontset_for_ascii_face (FRAME_PTR f, int base_fontset_id, struct face *face) +make_fontset_for_ascii_face (struct frame *f, int base_fontset_id, struct face *face) { Lisp_Object base_fontset, fontset, frame; @@ -1227,7 +1228,7 @@ /* Return a list of base fontset names matching PATTERN on frame F. */ Lisp_Object -list_fontsets (FRAME_PTR f, Lisp_Object pattern, int size) +list_fontsets (struct frame *f, Lisp_Object pattern, int size) { Lisp_Object frame, regexp, val; int id; @@ -1284,7 +1285,7 @@ for (tail = FONTSET_FACE_ALIST (this); CONSP (tail); tail = XCDR (tail)) { - FRAME_PTR f = XFRAME (FONTSET_FRAME (this)); + struct frame *f = XFRAME (FONTSET_FRAME (this)); int face_id = XINT (XCDR (XCAR (tail))); struct face *face = FACE_FROM_ID (f, face_id); @@ -1612,7 +1613,7 @@ name = FONTSET_NAME (fontset); FOR_EACH_FRAME (tail, fr) { - FRAME_PTR f = XFRAME (fr); + struct frame *f = XFRAME (fr); Lisp_Object font_object; struct face *face; @@ -2140,7 +2141,7 @@ frame = FONTSET_FRAME (fontset); if (FRAMEP (frame)) { - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); if (FRAME_LIVE_P (f)) ASET (vec, 1, === modified file 'src/fontset.h' --- src/fontset.h 2013-04-05 14:07:02 +0000 +++ src/fontset.h 2013-08-03 03:29:03 +0000 @@ -28,12 +28,12 @@ struct face; -extern void free_face_fontset (FRAME_PTR, struct face *); -extern int face_for_char (FRAME_PTR, struct face *, int, +extern void free_face_fontset (struct frame *, struct face *); +extern int face_for_char (struct frame *, struct face *, int, int, Lisp_Object); extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object); -extern int make_fontset_for_ascii_face (FRAME_PTR, int, struct face *); +extern int make_fontset_for_ascii_face (struct frame *, int, struct face *); extern int fontset_from_font (Lisp_Object); extern int fs_query_fontset (Lisp_Object, int); extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int); === modified file 'src/frame.c' --- src/frame.c 2013-08-01 06:38:49 +0000 +++ src/frame.c 2013-08-03 03:29:03 +0000 @@ -1093,7 +1093,7 @@ (Exception: if F is the terminal frame, and we are using X, return 1.) */ static int -other_visible_frames (FRAME_PTR f) +other_visible_frames (struct frame *f) { Lisp_Object frames, this; @@ -1467,7 +1467,7 @@ and returns whatever that function returns. */) (void) { - FRAME_PTR f; + struct frame *f; Lisp_Object lispy_dummy; Lisp_Object x, y, retval; struct gcpro gcpro1; @@ -1513,7 +1513,7 @@ and nil for X and Y. */) (void) { - FRAME_PTR f; + struct frame *f; Lisp_Object lispy_dummy; Lisp_Object x, y; @@ -2610,7 +2610,7 @@ to store the new value in the parameter alist. */ void -x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) +x_set_frame_parameters (struct frame *f, Lisp_Object alist) { Lisp_Object tail; @@ -3348,7 +3348,7 @@ /* Return non-nil if frame F wants a bitmap icon. */ Lisp_Object -x_icon_type (FRAME_PTR f) +x_icon_type (struct frame *f) { Lisp_Object tem; === modified file 'src/frame.h' --- src/frame.h 2013-08-01 14:54:29 +0000 +++ src/frame.h 2013-08-03 03:29:03 +0000 @@ -591,8 +591,6 @@ /* Return a pointer to the image cache of frame F. */ #define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache) -typedef struct frame *FRAME_PTR; - #define XFRAME(p) \ (eassert (FRAMEP (p)), (struct frame *) XUNTAG (p, Lisp_Vectorlike)) #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) @@ -1206,7 +1204,7 @@ extern void x_set_scroll_bar_default_width (struct frame *); extern void x_set_offset (struct frame *, int, int, int); -extern void x_wm_set_size_hint (FRAME_PTR f, long flags, bool user_position); +extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position); extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); === modified file 'src/ftfont.c' --- src/ftfont.c 2013-08-01 10:33:25 +0000 +++ src/ftfont.c 2013-08-03 03:29:03 +0000 @@ -493,12 +493,12 @@ } #endif /* HAVE_LIBOTF */ -static Lisp_Object ftfont_get_cache (FRAME_PTR); +static Lisp_Object ftfont_get_cache (struct frame *); static Lisp_Object ftfont_list (struct frame *, Lisp_Object); static Lisp_Object ftfont_match (struct frame *, Lisp_Object); static Lisp_Object ftfont_list_family (struct frame *); -static Lisp_Object ftfont_open (FRAME_PTR, Lisp_Object, int); -static void ftfont_close (FRAME_PTR, struct font *); +static Lisp_Object ftfont_open (struct frame *, Lisp_Object, int); +static void ftfont_close (struct frame *, struct font *); static int ftfont_has_char (Lisp_Object, int); static unsigned ftfont_encode_char (struct font *, int); static int ftfont_text_extents (struct font *, unsigned *, int, @@ -568,7 +568,7 @@ }; static Lisp_Object -ftfont_get_cache (FRAME_PTR f) +ftfont_get_cache (struct frame *f) { return freetype_font_cache; } @@ -1173,7 +1173,7 @@ static Lisp_Object -ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) +ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) { struct ftfont_info *ftfont_info; struct font *font; @@ -1317,7 +1317,7 @@ } static void -ftfont_close (FRAME_PTR f, struct font *font) +ftfont_close (struct frame *f, struct font *font) { struct ftfont_info *ftfont_info = (struct ftfont_info *) font; Lisp_Object val, cache; === modified file 'src/ftxfont.c' --- src/ftxfont.c 2013-08-01 10:33:25 +0000 +++ src/ftxfont.c 2013-08-03 03:29:03 +0000 @@ -57,7 +57,7 @@ /* Return an array of 6 GCs for antialiasing. */ static GC * -ftxfont_get_gcs (FRAME_PTR f, long unsigned int foreground, long unsigned int background) +ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned int background) { XColor color; XGCValues xgcv; @@ -134,7 +134,7 @@ } static int -ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, +ftxfont_draw_bitmap (struct frame *f, GC gc_fore, GC *gcs, struct font *font, unsigned int code, int x, int y, XPoint *p, int size, int *n, bool flush) { @@ -212,7 +212,7 @@ } static void -ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y, +ftxfont_draw_background (struct frame *f, struct font *font, GC gc, int x, int y, int width) { XGCValues xgcv; @@ -246,7 +246,7 @@ } static Lisp_Object -ftxfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) +ftxfont_open (struct frame *f, Lisp_Object entity, int pixel_size) { Lisp_Object font_object; struct font *font; @@ -260,7 +260,7 @@ } static void -ftxfont_close (FRAME_PTR f, struct font *font) +ftxfont_close (struct frame *f, struct font *font) { ftfont_driver.close (f, font); } @@ -269,7 +269,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) { - FRAME_PTR f = s->f; + struct frame *f = s->f; struct face *face = s->face; struct font *font = s->font; XPoint p[0x700]; @@ -338,7 +338,7 @@ } static int -ftxfont_end_for_frame (FRAME_PTR f) +ftxfont_end_for_frame (struct frame *f) { struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-07-16 21:35:45 +0000 +++ src/gtkutil.c 2013-08-03 03:29:03 +0000 @@ -136,7 +136,7 @@ W can be a GtkMenu or a GtkWindow widget. */ static void -xg_set_screen (GtkWidget *w, FRAME_PTR f) +xg_set_screen (GtkWidget *w, struct frame *f) { if (FRAME_X_DISPLAY (f) != DEFAULT_GDK_DISPLAY ()) { @@ -280,7 +280,7 @@ } static GdkPixbuf * -xg_get_pixbuf_from_pixmap (FRAME_PTR f, Pixmap pix) +xg_get_pixbuf_from_pixmap (struct frame *f, Pixmap pix) { int iunused; GdkPixbuf *tmp_buf; @@ -311,7 +311,7 @@ /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ static GdkPixbuf * -xg_get_pixbuf_from_pix_and_mask (FRAME_PTR f, +xg_get_pixbuf_from_pix_and_mask (struct frame *f, Pixmap pix, Pixmap mask) { @@ -387,7 +387,7 @@ If OLD_WIDGET is not NULL, that widget is modified. */ static GtkWidget * -xg_get_image_for_pixmap (FRAME_PTR f, +xg_get_image_for_pixmap (struct frame *f, struct image *img, GtkWidget *widget, GtkImage *old_widget) @@ -641,7 +641,7 @@ GtkWidget *previous_toplevel, gpointer user_data) { - FRAME_PTR f = (FRAME_PTR) user_data; + struct frame *f = (struct frame *) user_data; struct x_output *x = f->output_data.x; GtkWidget *top = gtk_widget_get_toplevel (x->ttip_lbl); @@ -663,7 +663,7 @@ GtkTooltip *tooltip, gpointer user_data) { - FRAME_PTR f = (FRAME_PTR) user_data; + struct frame *f = (struct frame *) user_data; struct x_output *x = f->output_data.x; if (x->ttip_widget == NULL) { @@ -707,7 +707,7 @@ Return true if a system tooltip is available. */ bool -xg_prepare_tooltip (FRAME_PTR f, +xg_prepare_tooltip (struct frame *f, Lisp_Object string, int *width, int *height) @@ -764,7 +764,7 @@ xg_prepare_tooltip must have been called before this function. */ void -xg_show_tooltip (FRAME_PTR f, int root_x, int root_y) +xg_show_tooltip (struct frame *f, int root_x, int root_y) { #ifdef USE_GTK_TOOLTIP struct x_output *x = f->output_data.x; @@ -783,7 +783,7 @@ system tooltips). */ bool -xg_hide_tooltip (FRAME_PTR f) +xg_hide_tooltip (struct frame *f) { bool ret = 0; #ifdef USE_GTK_TOOLTIP @@ -827,7 +827,7 @@ F is the frame we shall set geometry for. */ static void -xg_set_geometry (FRAME_PTR f) +xg_set_geometry (struct frame *f) { if (f->size_hint_flags & (USPosition | PPosition)) { @@ -865,7 +865,7 @@ and use a GtkFixed widget, this doesn't happen automatically. */ static void -xg_clear_under_internal_border (FRAME_PTR f) +xg_clear_under_internal_border (struct frame *f) { if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) { @@ -903,7 +903,7 @@ PIXELWIDTH, PIXELHEIGHT is the new size in pixels. */ void -xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight) +xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight) { int rows, columns; @@ -939,7 +939,7 @@ COLUMNS/ROWS is the size the edit area shall have after the resize. */ void -xg_frame_set_char_size (FRAME_PTR f, int cols, int rows) +xg_frame_set_char_size (struct frame *f, int cols, int rows) { int pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); @@ -1002,7 +1002,7 @@ The policy is to keep the number of editable lines. */ static void -xg_height_or_width_changed (FRAME_PTR f) +xg_height_or_width_changed (struct frame *f) { gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), FRAME_TOTAL_PIXEL_WIDTH (f), @@ -1042,7 +1042,7 @@ /* Set the background of widget W to PIXEL. */ static void -xg_set_widget_bg (FRAME_PTR f, GtkWidget *w, long unsigned int pixel) +xg_set_widget_bg (struct frame *f, GtkWidget *w, long unsigned int pixel) { #ifdef HAVE_GTK3 GdkRGBA bg; @@ -1093,7 +1093,7 @@ Lisp_Object rest, frame; FOR_EACH_FRAME (rest, frame) { - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); if (FRAME_LIVE_P (f) && FRAME_X_P (f) && FRAME_X_DISPLAY (f) == dpy) @@ -1115,7 +1115,7 @@ #ifdef HAVE_GTK3 /* The event doesn't arrive in the normal event loop. Send event here. */ - FRAME_PTR f = (FRAME_PTR) user_data; + struct frame *f = (struct frame *) user_data; struct input_event ie; EVENT_INIT (ie); @@ -1131,7 +1131,7 @@ Return true if creation succeeded. */ bool -xg_create_frame_widgets (FRAME_PTR f) +xg_create_frame_widgets (struct frame *f) { GtkWidget *wtop; GtkWidget *wvbox, *whbox; @@ -1300,7 +1300,7 @@ } void -xg_free_frame_widgets (FRAME_PTR f) +xg_free_frame_widgets (struct frame *f) { if (FRAME_GTK_OUTER_WIDGET (f)) { @@ -1332,7 +1332,7 @@ flag (this is useful when FLAGS is 0). */ void -x_wm_set_size_hint (FRAME_PTR f, long int flags, bool user_position) +x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) { /* Must use GTK routines here, otherwise GTK resets the size hints to its own defaults. */ @@ -1432,7 +1432,7 @@ BG is the pixel value to change to. */ void -xg_set_background_color (FRAME_PTR f, long unsigned int bg) +xg_set_background_color (struct frame *f, long unsigned int bg) { if (FRAME_GTK_WIDGET (f)) { @@ -1447,7 +1447,7 @@ functions so GTK does not overwrite the icon. */ void -xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask) +xg_set_frame_icon (struct frame *f, Pixmap icon_pixmap, Pixmap icon_mask) { GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (f, icon_pixmap, @@ -1693,7 +1693,7 @@ The dialog W is not destroyed when this function returns. */ static int -xg_dialog_run (FRAME_PTR f, GtkWidget *w) +xg_dialog_run (struct frame *f, GtkWidget *w) { ptrdiff_t count = SPECPDL_INDEX (); struct xg_dialog_data dd; @@ -1813,7 +1813,7 @@ Returns the created widget. */ static GtkWidget * -xg_get_file_with_chooser (FRAME_PTR f, +xg_get_file_with_chooser (struct frame *f, char *prompt, char *default_filename, bool mustmatch_p, bool only_dir_p, @@ -1935,7 +1935,7 @@ Returns the created widget. */ static GtkWidget * -xg_get_file_with_selection (FRAME_PTR f, +xg_get_file_with_selection (struct frame *f, char *prompt, char *default_filename, bool mustmatch_p, bool only_dir_p, @@ -1977,7 +1977,7 @@ The returned string must be freed by the caller. */ char * -xg_get_file_name (FRAME_PTR f, +xg_get_file_name (struct frame *f, char *prompt, char *default_filename, bool mustmatch_p, @@ -2051,7 +2051,7 @@ DEFAULT_NAME, if non-zero, is the default font name. */ Lisp_Object -xg_get_font (FRAME_PTR f, const char *default_name) +xg_get_font (struct frame *f, const char *default_name) { GtkWidget *w; int done = 0; @@ -2169,7 +2169,7 @@ allocated xg_menu_cb_data if CL_DATA is NULL. */ static xg_menu_cb_data * -make_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb) +make_cl_data (xg_menu_cb_data *cl_data, struct frame *f, GCallback highlight_cb) { if (! cl_data) { @@ -2201,7 +2201,7 @@ static void update_cl_data (xg_menu_cb_data *cl_data, - FRAME_PTR f, + struct frame *f, GCallback highlight_cb) { if (cl_data) @@ -2251,7 +2251,7 @@ FOR_EACH_FRAME (rest, frame) { - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_GTK_OUTER_WIDGET (f)) { @@ -2480,7 +2480,7 @@ static GtkWidget * xg_create_one_menuitem (widget_value *item, - FRAME_PTR f, + struct frame *f, GCallback select_cb, GCallback highlight_cb, xg_menu_cb_data *cl_data, @@ -2551,7 +2551,7 @@ static GtkWidget * create_menus (widget_value *data, - FRAME_PTR f, + struct frame *f, GCallback select_cb, GCallback deactivate_cb, GCallback highlight_cb, @@ -2694,9 +2694,9 @@ Returns the widget created. */ GtkWidget * -xg_create_widget (const char *type, const char *name, FRAME_PTR f, widget_value *val, - GCallback select_cb, GCallback deactivate_cb, - GCallback highlight_cb) +xg_create_widget (const char *type, const char *name, struct frame *f, + widget_value *val, GCallback select_cb, + GCallback deactivate_cb, GCallback highlight_cb) { GtkWidget *w = 0; bool menu_bar_p = strcmp (type, "menubar") == 0; @@ -2802,7 +2802,7 @@ static void xg_update_menubar (GtkWidget *menubar, - FRAME_PTR f, + struct frame *f, GList **list, GList *iter, int pos, @@ -3119,7 +3119,7 @@ static GtkWidget * xg_update_submenu (GtkWidget *submenu, - FRAME_PTR f, + struct frame *f, widget_value *val, GCallback select_cb, GCallback deactivate_cb, @@ -3261,8 +3261,8 @@ HIGHLIGHT_CB is the callback to call when entering/leaving menu items. */ void -xg_modify_menubar_widgets (GtkWidget *menubar, FRAME_PTR f, widget_value *val, - bool deep_p, +xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f, + widget_value *val, bool deep_p, GCallback select_cb, GCallback deactivate_cb, GCallback highlight_cb) { @@ -3336,7 +3336,7 @@ menubar_map_cb (GtkWidget *w, gpointer user_data) { GtkRequisition req; - FRAME_PTR f = (FRAME_PTR) user_data; + struct frame *f = (struct frame *) user_data; gtk_widget_get_preferred_size (w, NULL, &req); if (FRAME_MENUBAR_HEIGHT (f) != req.height) { @@ -3349,7 +3349,7 @@ changed. */ void -xg_update_frame_menubar (FRAME_PTR f) +xg_update_frame_menubar (struct frame *f) { struct x_output *x = f->output_data.x; GtkRequisition req; @@ -3387,7 +3387,7 @@ This is used when deleting a frame, and when turning off the menu bar. */ void -free_frame_menubar (FRAME_PTR f) +free_frame_menubar (struct frame *f) { struct x_output *x = f->output_data.x; @@ -3406,7 +3406,7 @@ } bool -xg_event_is_for_menubar (FRAME_PTR f, XEvent *event) +xg_event_is_for_menubar (struct frame *f, XEvent *event) { struct x_output *x = f->output_data.x; GList *iter; @@ -3619,7 +3619,7 @@ to set resources for the widget. */ void -xg_create_scroll_bar (FRAME_PTR f, +xg_create_scroll_bar (struct frame *f, struct scroll_bar *bar, GCallback scroll_callback, GCallback end_callback, @@ -3681,7 +3681,7 @@ /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */ void -xg_remove_scroll_bar (FRAME_PTR f, ptrdiff_t scrollbar_id) +xg_remove_scroll_bar (struct frame *f, ptrdiff_t scrollbar_id) { GtkWidget *w = xg_get_widget_from_map (scrollbar_id); if (w) @@ -3699,7 +3699,7 @@ WIDTH, HEIGHT is the size in pixels the bar shall have. */ void -xg_update_scrollbar_pos (FRAME_PTR f, +xg_update_scrollbar_pos (struct frame *f, ptrdiff_t scrollbar_id, int top, int left, @@ -3781,7 +3781,7 @@ { GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window); - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); if (wscroll && NILP (bar->dragging)) { @@ -3861,7 +3861,7 @@ frame. This function does additional checks. */ bool -xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event) +xg_event_is_for_scrollbar (struct frame *f, XEvent *event) { bool retval = 0; @@ -3946,7 +3946,8 @@ gpointer gmod = g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); intptr_t mod = (intptr_t) gmod; - FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); + struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), + XG_FRAME_DATA); Lisp_Object key, frame; struct input_event event; EVENT_INIT (event); @@ -4149,7 +4150,7 @@ GtkWidget *w, gpointer client_data) { - FRAME_PTR f = (FRAME_PTR) client_data; + struct frame *f = (struct frame *) client_data; g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, NULL); @@ -4186,7 +4187,7 @@ GtkWidget *w, gpointer client_data) { - FRAME_PTR f = (FRAME_PTR) client_data; + struct frame *f = (struct frame *) client_data; g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); if (f) @@ -4224,7 +4225,8 @@ gpointer client_data) { intptr_t idx = (intptr_t) client_data; - FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); + struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), + XG_FRAME_DATA); Lisp_Object help, frame; if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) @@ -4297,7 +4299,7 @@ /* Attach a tool bar to frame F. */ static void -xg_pack_tool_bar (FRAME_PTR f, Lisp_Object pos) +xg_pack_tool_bar (struct frame *f, Lisp_Object pos) { struct x_output *x = f->output_data.x; bool into_hbox = EQ (pos, Qleft) || EQ (pos, Qright); @@ -4354,7 +4356,7 @@ x->toolbar_is_packed = true; } -static bool xg_update_tool_bar_sizes (FRAME_PTR f); +static bool xg_update_tool_bar_sizes (struct frame *f); static void tb_size_cb (GtkWidget *widget, @@ -4364,7 +4366,7 @@ /* When tool bar is created it has one preferred size. But when size is allocated between widgets, it may get another. So we must update size hints if tool bar size changes. Seen on Fedora 18 at least. */ - FRAME_PTR f = (FRAME_PTR) user_data; + struct frame *f = (struct frame *) user_data; if (xg_update_tool_bar_sizes (f)) x_wm_set_size_hint (f, 0, 0); } @@ -4372,7 +4374,7 @@ /* Create a tool bar for frame F. */ static void -xg_create_tool_bar (FRAME_PTR f) +xg_create_tool_bar (struct frame *f) { struct x_output *x = f->output_data.x; #if GTK_CHECK_VERSION (3, 3, 6) @@ -4415,7 +4417,7 @@ Returns IMAGE if RTL is not found. */ static Lisp_Object -find_rtl_image (FRAME_PTR f, Lisp_Object image, Lisp_Object rtl) +find_rtl_image (struct frame *f, Lisp_Object image, Lisp_Object rtl) { int i; Lisp_Object file, rtl_name; @@ -4443,7 +4445,7 @@ } static GtkToolItem * -xg_make_tool_item (FRAME_PTR f, +xg_make_tool_item (struct frame *f, GtkWidget *wimage, GtkWidget **wbutton, const char *label, @@ -4606,7 +4608,7 @@ } static bool -xg_update_tool_bar_sizes (FRAME_PTR f) +xg_update_tool_bar_sizes (struct frame *f) { struct x_output *x = f->output_data.x; GtkRequisition req; @@ -4654,7 +4656,7 @@ /* Update the tool bar for frame F. Add new buttons and remove old. */ void -update_frame_tool_bar (FRAME_PTR f) +update_frame_tool_bar (struct frame *f) { int i, j; struct x_output *x = f->output_data.x; @@ -4929,7 +4931,7 @@ Remove the tool bar. */ void -free_frame_tool_bar (FRAME_PTR f) +free_frame_tool_bar (struct frame *f) { struct x_output *x = f->output_data.x; @@ -4976,7 +4978,7 @@ } void -xg_change_toolbar_position (FRAME_PTR f, Lisp_Object pos) +xg_change_toolbar_position (struct frame *f, Lisp_Object pos) { struct x_output *x = f->output_data.x; GtkWidget *top_widget = TOOLBAR_TOP_WIDGET (x); === modified file 'src/gtkutil.h' --- src/gtkutil.h 2013-01-01 09:11:05 +0000 +++ src/gtkutil.h 2013-08-03 03:29:03 +0000 @@ -55,7 +55,7 @@ { xg_list_node ptrs; - FRAME_PTR f; + struct frame *f; Lisp_Object menu_bar_vector; int menu_bar_items_used; GCallback highlight_cb; @@ -81,46 +81,46 @@ extern bool xg_uses_old_file_dialog (void) ATTRIBUTE_CONST; -extern char *xg_get_file_name (FRAME_PTR f, +extern char *xg_get_file_name (struct frame *f, char *prompt, char *default_filename, bool mustmatch_p, bool only_dir_p); -extern Lisp_Object xg_get_font (FRAME_PTR f, const char *); +extern Lisp_Object xg_get_font (struct frame *f, const char *); extern GtkWidget *xg_create_widget (const char *type, const char *name, - FRAME_PTR f, + struct frame *f, struct _widget_value *val, GCallback select_cb, GCallback deactivate_cb, GCallback highlight_cb); extern void xg_modify_menubar_widgets (GtkWidget *menubar, - FRAME_PTR f, + struct frame *f, struct _widget_value *val, bool deep_p, GCallback select_cb, GCallback deactivate_cb, GCallback highlight_cb); -extern void xg_update_frame_menubar (FRAME_PTR f); +extern void xg_update_frame_menubar (struct frame *f); -extern bool xg_event_is_for_menubar (FRAME_PTR f, XEvent *event); +extern bool xg_event_is_for_menubar (struct frame *f, XEvent *event); extern bool xg_have_tear_offs (void); extern ptrdiff_t xg_get_scroll_id_for_window (Display *dpy, Window wid); -extern void xg_create_scroll_bar (FRAME_PTR f, +extern void xg_create_scroll_bar (struct frame *f, struct scroll_bar *bar, GCallback scroll_callback, GCallback end_callback, const char *scroll_bar_name); -extern void xg_remove_scroll_bar (FRAME_PTR f, ptrdiff_t scrollbar_id); +extern void xg_remove_scroll_bar (struct frame *f, ptrdiff_t scrollbar_id); -extern void xg_update_scrollbar_pos (FRAME_PTR f, +extern void xg_update_scrollbar_pos (struct frame *f, ptrdiff_t scrollbar_id, int top, int left, @@ -131,40 +131,40 @@ int portion, int position, int whole); -extern bool xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event); +extern bool xg_event_is_for_scrollbar (struct frame *f, XEvent *event); extern int xg_get_default_scrollbar_width (void); -extern void update_frame_tool_bar (FRAME_PTR f); -extern void free_frame_tool_bar (FRAME_PTR f); -extern void xg_change_toolbar_position (FRAME_PTR f, Lisp_Object pos); +extern void update_frame_tool_bar (struct frame *f); +extern void free_frame_tool_bar (struct frame *f); +extern void xg_change_toolbar_position (struct frame *f, Lisp_Object pos); -extern void xg_frame_resized (FRAME_PTR f, +extern void xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight); -extern void xg_frame_set_char_size (FRAME_PTR f, int cols, int rows); +extern void xg_frame_set_char_size (struct frame *f, int cols, int rows); extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc); extern void xg_display_open (char *display_name, Display **dpy); extern void xg_display_close (Display *dpy); extern GdkCursor * xg_create_default_cursor (Display *dpy); -extern bool xg_create_frame_widgets (FRAME_PTR f); -extern void xg_free_frame_widgets (FRAME_PTR f); -extern void xg_set_background_color (FRAME_PTR f, unsigned long bg); +extern bool xg_create_frame_widgets (struct frame *f); +extern void xg_free_frame_widgets (struct frame *f); +extern void xg_set_background_color (struct frame *f, unsigned long bg); extern bool xg_check_special_colors (struct frame *f, const char *color_name, XColor *color); -extern void xg_set_frame_icon (FRAME_PTR f, +extern void xg_set_frame_icon (struct frame *f, Pixmap icon_pixmap, Pixmap icon_mask); -extern bool xg_prepare_tooltip (FRAME_PTR f, +extern bool xg_prepare_tooltip (struct frame *f, Lisp_Object string, int *width, int *height); -extern void xg_show_tooltip (FRAME_PTR f, int root_x, int root_y); -extern bool xg_hide_tooltip (FRAME_PTR f); +extern void xg_show_tooltip (struct frame *f, int root_x, int root_y); +extern bool xg_hide_tooltip (struct frame *f); /* Mark all callback data that are Lisp_object:s during GC. */ === modified file 'src/image.c' --- src/image.c 2013-07-20 19:20:33 +0000 +++ src/image.c 2013-08-03 03:29:03 +0000 @@ -164,20 +164,20 @@ /* Functions to access the contents of a bitmap, given an id. */ int -x_bitmap_height (FRAME_PTR f, ptrdiff_t id) +x_bitmap_height (struct frame *f, ptrdiff_t id) { return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; } int -x_bitmap_width (FRAME_PTR f, ptrdiff_t id) +x_bitmap_width (struct frame *f, ptrdiff_t id) { return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; } #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) ptrdiff_t -x_bitmap_pixmap (FRAME_PTR f, ptrdiff_t id) +x_bitmap_pixmap (struct frame *f, ptrdiff_t id) { /* HAVE_NTGUI needs the explicit cast here. */ return (ptrdiff_t) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; @@ -186,7 +186,7 @@ #ifdef HAVE_X_WINDOWS int -x_bitmap_mask (FRAME_PTR f, ptrdiff_t id) +x_bitmap_mask (struct frame *f, ptrdiff_t id) { return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; } @@ -195,7 +195,7 @@ /* Allocate a new bitmap record. Returns index of new record. */ static ptrdiff_t -x_allocate_bitmap_record (FRAME_PTR f) +x_allocate_bitmap_record (struct frame *f) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); ptrdiff_t i; @@ -216,7 +216,7 @@ /* Add one reference to the reference count of the bitmap with id ID. */ void -x_reference_bitmap (FRAME_PTR f, ptrdiff_t id) +x_reference_bitmap (struct frame *f, ptrdiff_t id) { ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; } @@ -384,7 +384,7 @@ /* Remove reference to bitmap with id number ID. */ void -x_destroy_bitmap (FRAME_PTR f, ptrdiff_t id) +x_destroy_bitmap (struct frame *f, ptrdiff_t id) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); === modified file 'src/keyboard.c' --- src/keyboard.c 2013-07-19 10:55:36 +0000 +++ src/keyboard.c 2013-08-03 03:29:03 +0000 @@ -1281,7 +1281,7 @@ #endif bool ignore_mouse_drag_p; -static FRAME_PTR +static struct frame * some_mouse_moved (void) { Lisp_Object tail, frame; @@ -2163,7 +2163,7 @@ This causes trouble if we are trying to read a mouse motion event (i.e., if we are inside a `track-mouse' form), so we restore the mouse_moved flag. */ - FRAME_PTR f = NILP (do_mouse_tracking) ? NULL : some_mouse_moved (); + struct frame *f = NILP (do_mouse_tracking) ? NULL : some_mouse_moved (); help = call1 (Qmouse_fixup_help_message, help); if (f) f->mouse_moved = 1; @@ -4152,7 +4152,7 @@ /* Try generating a mouse motion event. */ else if (!NILP (do_mouse_tracking) && some_mouse_moved ()) { - FRAME_PTR f = some_mouse_moved (); + struct frame *f = some_mouse_moved (); Lisp_Object bar_window; enum scroll_bar_part part; Lisp_Object x, y; @@ -5898,7 +5898,7 @@ case DRAG_N_DROP_EVENT: { - FRAME_PTR f; + struct frame *f; Lisp_Object head, position; Lisp_Object files; @@ -5977,7 +5977,7 @@ #ifdef HAVE_GPM case GPM_CLICK_EVENT: { - FRAME_PTR f = XFRAME (event->frame_or_window); + struct frame *f = XFRAME (event->frame_or_window); Lisp_Object head, position; Lisp_Object *start_pos_ptr; Lisp_Object start_pos; @@ -6031,7 +6031,7 @@ } static Lisp_Object -make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, +make_lispy_movement (struct frame *frame, Lisp_Object bar_window, enum scroll_bar_part part, Lisp_Object x, Lisp_Object y, Time t) { /* Is it a scroll bar movement? */ === modified file 'src/menu.c' --- src/menu.c 2013-07-16 21:35:45 +0000 +++ src/menu.c 2013-08-03 03:29:03 +0000 @@ -867,7 +867,8 @@ VECTOR is an array of menu events for the whole menu. */ void -find_and_call_menu_selection (FRAME_PTR f, int menu_bar_items_used, Lisp_Object vector, void *client_data) +find_and_call_menu_selection (struct frame *f, int menu_bar_items_used, + Lisp_Object vector, void *client_data) { Lisp_Object prefix, entry; Lisp_Object *subprefix_stack; @@ -950,7 +951,7 @@ /* As above, but return the menu selection instead of storing in kb buffer. If KEYMAPS, return full prefixes to selection. */ Lisp_Object -find_and_return_menu_selection (FRAME_PTR f, bool keymaps, void *client_data) +find_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data) { Lisp_Object prefix, entry; int i; @@ -1060,7 +1061,7 @@ Lisp_Object title; const char *error_name = NULL; Lisp_Object selection = Qnil; - FRAME_PTR f = NULL; + struct frame *f = NULL; Lisp_Object x, y, window; bool keymaps = 0; bool for_click = 0; @@ -1116,7 +1117,7 @@ if (get_current_pos_p) { /* Use the mouse's current position. */ - FRAME_PTR new_f = SELECTED_FRAME (); + struct frame *new_f = SELECTED_FRAME (); #ifdef HAVE_X_WINDOWS /* Can't use mouse_position_hook for X since it returns coordinates relative to the window the mouse is in, === modified file 'src/menu.h' --- src/menu.h 2013-01-01 09:11:05 +0000 +++ src/menu.h 2013-08-03 03:29:03 +0000 @@ -35,20 +35,20 @@ || defined (HAVE_NS) extern void free_menubar_widget_value_tree (widget_value *); extern void update_submenu_strings (widget_value *); -extern void find_and_call_menu_selection (FRAME_PTR, int, +extern void find_and_call_menu_selection (struct frame *, int, Lisp_Object, void *); extern widget_value *xmalloc_widget_value (void); extern widget_value *digest_single_submenu (int, int, bool); #endif #ifdef HAVE_X_WINDOWS -extern void mouse_position_for_popup (FRAME_PTR f, int *x, int *y); +extern void mouse_position_for_popup (struct frame *f, int *x, int *y); #endif -extern Lisp_Object w32_menu_show (FRAME_PTR, int, int, int, int, +extern Lisp_Object w32_menu_show (struct frame *, int, int, int, int, Lisp_Object, const char **); -extern Lisp_Object ns_menu_show (FRAME_PTR, int, int, bool, bool, +extern Lisp_Object ns_menu_show (struct frame *, int, int, bool, bool, Lisp_Object, const char **); -extern Lisp_Object xmenu_show (FRAME_PTR, int, int, bool, bool, +extern Lisp_Object xmenu_show (struct frame *, int, int, bool, bool, Lisp_Object, const char **, Time); #endif /* MENU_H */ === modified file 'src/msdos.c' --- src/msdos.c 2013-07-31 12:50:59 +0000 +++ src/msdos.c 2013-08-03 03:29:03 +0000 @@ -298,7 +298,7 @@ } void -mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window, +mouse_get_pos (struct frame **f, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *time) { @@ -1158,7 +1158,7 @@ to put the cursor at the end of the text displayed there. */ static void -IT_cmgoto (FRAME_PTR f) +IT_cmgoto (struct frame *f) { /* Only set the cursor to where it should be if the display is already in sync with the window contents. */ @@ -1760,7 +1760,7 @@ } } -extern void init_frame_faces (FRAME_PTR); +extern void init_frame_faces (struct frame *); #endif /* !HAVE_X_WINDOWS */ === modified file 'src/nsfns.m' --- src/nsfns.m 2013-07-31 12:50:59 +0000 +++ src/nsfns.m 2013-08-03 03:29:03 +0000 @@ -143,7 +143,7 @@ dpyinfo = ns_display_info_for_name (object); else { - FRAME_PTR f = decode_window_system_frame (object); + struct frame *f = decode_window_system_frame (object); dpyinfo = FRAME_NS_DISPLAY_INFO (f); } @@ -431,7 +431,7 @@ } static void -ns_set_name_internal (FRAME_PTR f, Lisp_Object name) +ns_set_name_internal (struct frame *f, Lisp_Object name) { struct gcpro gcpro1; Lisp_Object encoded_name, encoded_icon_name; @@ -503,7 +503,7 @@ specified a name for the frame; the name will override any set by the redisplay code. */ static void -x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_explicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { NSTRACE (x_explicitly_set_name); ns_set_name (f, arg, 1); @@ -514,7 +514,7 @@ name; names set this way will never override names set by the user's lisp code. */ void -x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_implicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { NSTRACE (x_implicitly_set_name); @@ -857,7 +857,7 @@ /* This is the same as the xfns.c definition. */ static void -x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); === modified file 'src/nsfont.m' --- src/nsfont.m 2013-08-01 10:33:25 +0000 +++ src/nsfont.m 2013-08-03 03:29:03 +0000 @@ -619,13 +619,13 @@ ========================================================================== */ -static Lisp_Object nsfont_get_cache (FRAME_PTR frame); +static Lisp_Object nsfont_get_cache (struct frame *frame); static Lisp_Object nsfont_list (struct frame *, Lisp_Object); static Lisp_Object nsfont_match (struct frame *, Lisp_Object); static Lisp_Object nsfont_list_family (struct frame *); -static Lisp_Object nsfont_open (FRAME_PTR f, Lisp_Object font_entity, +static Lisp_Object nsfont_open (struct frame *f, Lisp_Object font_entity, int pixel_size); -static void nsfont_close (FRAME_PTR f, struct font *font); +static void nsfont_close (struct frame *f, struct font *font); static int nsfont_has_char (Lisp_Object entity, int c); static unsigned int nsfont_encode_char (struct font *font, int c); static int nsfont_text_extents (struct font *font, unsigned int *code, @@ -659,7 +659,7 @@ /* Return a cache of font-entities on FRAME. The cache must be a cons whose cdr part is the actual cache area. */ static Lisp_Object -nsfont_get_cache (FRAME_PTR frame) +nsfont_get_cache (struct frame *frame) { Display_Info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame); return (dpyinfo->name_list_element); @@ -724,7 +724,7 @@ /* Open a font specified by FONT_ENTITY on frame F. If the font is scalable, open it with PIXEL_SIZE. */ static Lisp_Object -nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) +nsfont_open (struct frame *f, Lisp_Object font_entity, int pixel_size) { BOOL synthItal; unsigned int traits = 0; @@ -931,7 +931,7 @@ /* Close FONT on frame F. */ static void -nsfont_close (FRAME_PTR f, struct font *font) +nsfont_close (struct frame *f, struct font *font) { struct nsfont_info *font_info = (struct nsfont_info *)font; int i; === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-07-16 21:35:45 +0000 +++ src/nsmenu.m 2013-08-03 03:29:03 +0000 @@ -806,7 +806,7 @@ ========================================================================== */ Lisp_Object -ns_menu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, +ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, Lisp_Object title, const char **error) { EmacsMenu *pmenu; @@ -1028,7 +1028,7 @@ ========================================================================== */ void -free_frame_tool_bar (FRAME_PTR f) +free_frame_tool_bar (struct frame *f) /* -------------------------------------------------------------------------- Under NS we just hide the toolbar until it might be needed again. -------------------------------------------------------------------------- */ @@ -1040,7 +1040,7 @@ } void -update_frame_tool_bar (FRAME_PTR f) +update_frame_tool_bar (struct frame *f) /* -------------------------------------------------------------------------- Update toolbar contents -------------------------------------------------------------------------- */ === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-02 09:42:23 +0000 +++ src/nsterm.h 2013-08-03 03:29:03 +0000 @@ -781,7 +781,7 @@ /* Implemented in nsterm, published in or needed from nsfns. */ extern Lisp_Object Qfontsize; -extern Lisp_Object ns_list_fonts (FRAME_PTR f, Lisp_Object pattern, +extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, int size, int maxnames); extern void ns_clear_frame (struct frame *f); @@ -827,11 +827,11 @@ extern const char *ns_get_defaults_value (const char *key); /* in nsmenu */ -extern void update_frame_tool_bar (FRAME_PTR f); -extern void free_frame_tool_bar (FRAME_PTR f); -extern void find_and_call_menu_selection (FRAME_PTR f, +extern void update_frame_tool_bar (struct frame *f); +extern void free_frame_tool_bar (struct frame *f); +extern void find_and_call_menu_selection (struct frame *f, int menu_bar_items_used, Lisp_Object vector, void *client_data); -extern Lisp_Object find_and_return_menu_selection (FRAME_PTR f, +extern Lisp_Object find_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data); extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-02 09:42:23 +0000 +++ src/nsterm.m 2013-08-03 03:29:03 +0000 @@ -1353,7 +1353,7 @@ static void -ns_fullscreen_hook (FRAME_PTR f) +ns_fullscreen_hook (struct frame *f) { EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); === modified file 'src/scroll.c' --- src/scroll.c 2013-03-08 21:37:41 +0000 +++ src/scroll.c 2013-08-03 03:29:03 +0000 @@ -86,7 +86,7 @@ new contents appears. */ static void -calculate_scrolling (FRAME_PTR frame, +calculate_scrolling (struct frame *frame, /* matrix is of size window_size + 1 on each side. */ struct matrix_elt *matrix, int window_size, int lines_below, @@ -422,7 +422,7 @@ is the equivalent of draw_cost for the old line contents */ static void -calculate_direct_scrolling (FRAME_PTR frame, +calculate_direct_scrolling (struct frame *frame, /* matrix is of size window_size + 1 on each side. */ struct matrix_elt *matrix, int window_size, int lines_below, @@ -793,7 +793,7 @@ void -scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top, +scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top, int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, int *old_hash, int *new_hash, int free_at_end) { @@ -883,7 +883,7 @@ overhead and multiply factor values */ static void -line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, +line_ins_del (struct frame *frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) { register int i; @@ -901,7 +901,7 @@ } static void -ins_del_costs (FRAME_PTR frame, +ins_del_costs (struct frame *frame, const char *one_line_string, const char *multi_string, const char *setup_string, const char *cleanup_string, int *costvec, int *ncostvec, @@ -957,7 +957,7 @@ */ void -do_line_insertion_deletion_costs (FRAME_PTR frame, +do_line_insertion_deletion_costs (struct frame *frame, const char *ins_line_string, const char *multi_ins_string, const char *del_line_string, === modified file 'src/term.c' --- src/term.c 2013-08-02 21:16:33 +0000 +++ src/term.c 2013-08-03 03:29:03 +0000 @@ -2522,7 +2522,7 @@ } static bool -term_mouse_movement (FRAME_PTR frame, Gpm_Event *event) +term_mouse_movement (struct frame *frame, Gpm_Event *event) { /* Has the mouse moved off the glyph it was on at the last sighting? */ if (event->x != last_mouse_x || event->y != last_mouse_y) @@ -2563,7 +2563,7 @@ This clears mouse_moved until the next motion event arrives. */ static void -term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, +term_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *timeptr) { === modified file 'src/w32fns.c' --- src/w32fns.c 2013-08-01 06:38:49 +0000 +++ src/w32fns.c 2013-08-03 03:29:03 +0000 @@ -285,7 +285,7 @@ return x_display_info_for_name (frame); else { - FRAME_PTR f; + struct frame *f; CHECK_LIVE_FRAME (frame); f = XFRAME (frame); @@ -344,7 +344,7 @@ not Emacs's own window. */ void -x_real_positions (FRAME_PTR f, int *xptr, int *yptr) +x_real_positions (struct frame *f, int *xptr, int *yptr) { POINT pt; RECT rect; @@ -1019,7 +1019,7 @@ } void -w32_regenerate_palette (FRAME_PTR f) +w32_regenerate_palette (struct frame *f) { struct w32_palette_entry * list; LOGPALETTE * log_palette; @@ -1069,7 +1069,7 @@ #if 0 /* Keep these around in case we ever want to track color usage. */ void -w32_map_color (FRAME_PTR f, COLORREF color) +w32_map_color (struct frame *f, COLORREF color) { struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list; @@ -1100,7 +1100,7 @@ } void -w32_unmap_color (FRAME_PTR f, COLORREF color) +w32_unmap_color (struct frame *f, COLORREF color) { struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list; struct w32_palette_entry **prev = &FRAME_W32_DISPLAY_INFO (f)->color_list; @@ -1153,7 +1153,7 @@ If ALLOC is nonzero, allocate a new colormap cell. */ int -w32_defined_color (FRAME_PTR f, const char *color, XColor *color_def, int alloc) +w32_defined_color (struct frame *f, const char *color, XColor *color_def, int alloc) { register Lisp_Object tem; COLORREF w32_color_ref; @@ -1224,7 +1224,7 @@ ARG says. */ int -x_decode_color (FRAME_PTR f, Lisp_Object arg, int def) +x_decode_color (struct frame *f, Lisp_Object arg, int def) { XColor cdef; @@ -1525,7 +1525,7 @@ void -x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); @@ -1787,7 +1787,7 @@ specified a name for the frame; the name will override any set by the redisplay code. */ void -x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_explicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { x_set_name (f, arg, 1); } @@ -1796,7 +1796,7 @@ name; names set this way will never override names set by the user's lisp code. */ void -x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_implicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { x_set_name (f, arg, 0); } @@ -4645,7 +4645,7 @@ (Lisp_Object color, Lisp_Object frame) { XColor foo; - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHECK_STRING (color); @@ -4660,7 +4660,7 @@ (Lisp_Object color, Lisp_Object frame) { XColor foo; - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHECK_STRING (color); @@ -6610,7 +6610,7 @@ If optional parameter FRAME is not specified, use selected frame. */) (Lisp_Object command, Lisp_Object frame) { - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHECK_NUMBER (command); === modified file 'src/w32font.c' --- src/w32font.c 2013-08-01 10:33:25 +0000 +++ src/w32font.c 2013-08-03 03:29:03 +0000 @@ -99,7 +99,7 @@ /* Font spacing symbols - defined in font.c. */ extern Lisp_Object Qc, Qp, Qm; -static void fill_in_logfont (FRAME_PTR, LOGFONT *, Lisp_Object); +static void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); static BYTE w32_antialias_type (Lisp_Object); static Lisp_Object lispy_antialias_type (BYTE); @@ -297,7 +297,7 @@ Return a cache of font-entities on FRAME. The cache must be a cons whose cdr part is the actual cache area. */ Lisp_Object -w32font_get_cache (FRAME_PTR f) +w32font_get_cache (struct frame *f) { struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); @@ -355,7 +355,7 @@ Open a font specified by FONT_ENTITY on frame F. If the font is scalable, open it with PIXEL_SIZE. */ static Lisp_Object -w32font_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) +w32font_open (struct frame *f, Lisp_Object font_entity, int pixel_size) { Lisp_Object font_object = font_make_object (VECSIZE (struct w32font_info), @@ -379,7 +379,7 @@ /* w32 implementation of close for font_backend. Close FONT on frame F. */ void -w32font_close (FRAME_PTR f, struct font *font) +w32font_close (struct frame *f, struct font *font) { int i; struct w32font_info *w32_font = (struct w32font_info *) font; @@ -731,13 +731,13 @@ storing some data in FACE->extra. If successful, return 0. Otherwise, return -1. static int -w32font_prepare_face (FRAME_PTR f, struct face *face); +w32font_prepare_face (struct frame *f, struct face *face); */ /* w32 implementation of done_face for font backend. Optional. Done FACE for displaying characters by FACE->font on frame F. static void -w32font_done_face (FRAME_PTR f, struct face *face); */ +w32font_done_face (struct frame *f, struct face *face); */ /* w32 implementation of get_bitmap for font backend. Optional. @@ -889,7 +889,7 @@ } int -w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, +w32font_open_internal (struct frame *f, Lisp_Object font_entity, int pixel_size, Lisp_Object font_object) { int len, size; @@ -1961,7 +1961,7 @@ /* Fill in all the available details of LOGFONT from FONT_SPEC. */ static void -fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec) +fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec) { Lisp_Object tmp, extra; int dpi = FRAME_RES_Y (f); @@ -2464,7 +2464,7 @@ in the font selection dialog. */) (Lisp_Object frame, Lisp_Object exclude_proportional) { - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHOOSEFONT cf; LOGFONT lf; TEXTMETRIC tm; === modified file 'src/w32font.h' --- src/w32font.h 2013-08-01 16:09:20 +0000 +++ src/w32font.h 2013-08-03 03:29:03 +0000 @@ -63,16 +63,16 @@ #define CACHE_BLOCKSIZE 128 -Lisp_Object w32font_get_cache (FRAME_PTR fe); +Lisp_Object w32font_get_cache (struct frame *fe); Lisp_Object w32font_list_internal (struct frame *f, Lisp_Object font_spec, int opentype_only); Lisp_Object w32font_match_internal (struct frame *f, Lisp_Object font_spec, int opentype_only); -int w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, +int w32font_open_internal (struct frame *f, Lisp_Object font_entity, int pixel_size, Lisp_Object font_object); -void w32font_close (FRAME_PTR f, struct font *font); +void w32font_close (struct frame *f, struct font *font); int w32font_has_char (Lisp_Object entity, int c); int w32font_text_extents (struct font *font, unsigned *code, int nglyphs, struct font_metrics *metrics); === modified file 'src/w32inevt.c' --- src/w32inevt.c 2013-06-03 19:06:09 +0000 +++ src/w32inevt.c 2013-08-03 03:29:03 +0000 @@ -103,10 +103,10 @@ } /* In a generic, multi-frame world this should take a console handle - and return the frame for it + and return the frame for it. Right now, there's only one frame so return it. */ -static FRAME_PTR +static struct frame * get_frame (void) { return SELECTED_FRAME (); @@ -394,7 +394,7 @@ /* Mouse position hook. */ void -w32_console_mouse_position (FRAME_PTR *f, +w32_console_mouse_position (struct frame **f, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, @@ -461,7 +461,7 @@ if (event->dwEventFlags == MOUSE_MOVED) { - FRAME_PTR f = SELECTED_FRAME (); + struct frame *f = SELECTED_FRAME (); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); int mx = event->dwMousePosition.X, my = event->dwMousePosition.Y; @@ -555,7 +555,7 @@ static void resize_event (WINDOW_BUFFER_SIZE_RECORD *event) { - FRAME_PTR f = get_frame (); + struct frame *f = get_frame (); change_frame_size (f, event->dwSize.Y, event->dwSize.X, 0, 1, 0); SET_FRAME_GARBAGED (f); @@ -565,7 +565,7 @@ maybe_generate_resize_event (void) { CONSOLE_SCREEN_BUFFER_INFO info; - FRAME_PTR f = get_frame (); + struct frame *f = get_frame (); GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); === modified file 'src/w32inevt.h' --- src/w32inevt.h 2013-01-01 09:11:05 +0000 +++ src/w32inevt.h 2013-08-03 03:29:03 +0000 @@ -23,7 +23,7 @@ extern int w32_console_read_socket (struct terminal *term, struct input_event *hold_quit); -extern void w32_console_mouse_position (FRAME_PTR *f, int insist, +extern void w32_console_mouse_position (struct frame **f, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, === modified file 'src/w32menu.c' --- src/w32menu.c 2013-07-31 12:50:59 +0000 +++ src/w32menu.c 2013-08-03 03:29:03 +0000 @@ -100,13 +100,13 @@ Lisp_Object Qdebug_on_next_call; -void set_frame_menubar (FRAME_PTR, bool, bool); +void set_frame_menubar (struct frame *, bool, bool); #ifdef HAVE_DIALOGS -static Lisp_Object w32_dialog_show (FRAME_PTR, int, Lisp_Object, char**); +static Lisp_Object w32_dialog_show (struct frame *, int, Lisp_Object, char**); #else static int is_simple_dialog (Lisp_Object); -static Lisp_Object simple_dialog_show (FRAME_PTR, Lisp_Object, Lisp_Object); +static Lisp_Object simple_dialog_show (struct frame *, Lisp_Object, Lisp_Object); #endif static void utf8to16 (unsigned char *, int, WCHAR *); @@ -137,7 +137,7 @@ otherwise it is "Question". */) (Lisp_Object position, Lisp_Object contents, Lisp_Object header) { - FRAME_PTR f = NULL; + struct frame *f = NULL; Lisp_Object window; /* Decode the first argument: find the window or frame to use. */ @@ -147,7 +147,7 @@ { #if 0 /* Using the frame the mouse is on may not be right. */ /* Use the mouse's current position. */ - FRAME_PTR new_f = SELECTED_FRAME (); + struct frame *new_f = SELECTED_FRAME (); Lisp_Object bar_window; enum scroll_bar_part part; Time time; @@ -252,7 +252,7 @@ This way we can safely execute Lisp code. */ void -x_activate_menubar (FRAME_PTR f) +x_activate_menubar (struct frame *f) { set_frame_menubar (f, 0, 1); @@ -269,7 +269,7 @@ and put the appropriate events into the keyboard buffer. */ void -menubar_selection_callback (FRAME_PTR f, void * client_data) +menubar_selection_callback (struct frame *f, void * client_data) { Lisp_Object prefix, entry; Lisp_Object vector; @@ -361,7 +361,7 @@ it is set the first time this is called, from initialize_frame_menubar. */ void -set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p) +set_frame_menubar (struct frame *f, bool first_time, bool deep_p) { HMENU menubar_widget = f->output_data.w32->menubar_widget; Lisp_Object items; @@ -613,7 +613,7 @@ is visible. */ void -initialize_frame_menubar (FRAME_PTR f) +initialize_frame_menubar (struct frame *f) { /* This function is called before the first chance to redisplay the frame. It has to be, so the frame will have the right size. */ @@ -625,7 +625,7 @@ This is used when deleting a frame, and when turning off the menu bar. */ void -free_frame_menubar (FRAME_PTR f) +free_frame_menubar (struct frame *f) { block_input (); @@ -656,7 +656,7 @@ (We return nil on failure, but the value doesn't actually matter.) */ Lisp_Object -w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, +w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, Lisp_Object title, const char **error) { int i; @@ -983,7 +983,7 @@ "button6", "button7", "button8", "button9", "button10" }; static Lisp_Object -w32_dialog_show (FRAME_PTR f, int keymaps, +w32_dialog_show (struct frame *f, int keymaps, Lisp_Object title, Lisp_Object header, char **error) { @@ -1219,7 +1219,7 @@ } static Lisp_Object -simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) +simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header) { int answer; UINT type; @@ -1699,7 +1699,7 @@ (void) { #ifdef HAVE_MENUS - FRAME_PTR f; + struct frame *f; f = SELECTED_FRAME (); return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil; #else === modified file 'src/w32notify.c' --- src/w32notify.c 2013-07-02 16:32:03 +0000 +++ src/w32notify.c 2013-08-03 03:29:03 +0000 @@ -129,7 +129,7 @@ volatile int *terminate) { int done = 0; - FRAME_PTR f = SELECTED_FRAME (); + struct frame *f = SELECTED_FRAME (); /* A single buffer is used to communicate all notifications to the main thread. Since both the main thread and several watcher === modified file 'src/w32term.c' --- src/w32term.c 2013-08-02 04:21:51 +0000 +++ src/w32term.c 2013-08-03 03:29:03 +0000 @@ -181,7 +181,7 @@ /* Where the mouse was last time we reported a mouse event. */ static RECT last_mouse_glyph; -static FRAME_PTR last_mouse_glyph_frame; +static struct frame *last_mouse_glyph_frame; /* The scroll bar in which the last motion event occurred. @@ -249,7 +249,7 @@ #endif static void my_set_foreground_window (HWND); static void my_destroy_window (struct frame *, HWND); -static void w32fullscreen_hook (FRAME_PTR); +static void w32fullscreen_hook (struct frame *); #ifdef GLYPH_DEBUG static void x_check_font (struct frame *, struct font *); @@ -450,7 +450,7 @@ /* Draw a filled rectangle at the specified position. */ void -w32_fill_rect (FRAME_PTR f, HDC hdc, COLORREF pix, RECT *lprect) +w32_fill_rect (struct frame *f, HDC hdc, COLORREF pix, RECT *lprect) { HBRUSH hb; @@ -460,7 +460,7 @@ } void -w32_clear_window (FRAME_PTR f) +w32_clear_window (struct frame *f) { RECT rect; HDC hdc = get_frame_dc (f); @@ -3370,7 +3370,7 @@ static Lisp_Object last_mouse_motion_frame; static int -note_mouse_movement (FRAME_PTR frame, MSG *msg) +note_mouse_movement (struct frame *frame, MSG *msg) { int mouse_x = LOWORD (msg->lParam); int mouse_y = HIWORD (msg->lParam); @@ -3419,7 +3419,7 @@ ************************************************************************/ static struct scroll_bar *x_window_to_scroll_bar (Window); -static void x_scroll_bar_report_motion (FRAME_PTR *, Lisp_Object *, +static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *, enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, unsigned long *); @@ -3461,11 +3461,11 @@ movement. */ static void -w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, +w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, unsigned long *time) { - FRAME_PTR f1; + struct frame *f1; block_input (); @@ -3696,7 +3696,7 @@ /*#define ATTACH_THREADS*/ static BOOL -my_show_window (FRAME_PTR f, HWND hwnd, int how) +my_show_window (struct frame *f, HWND hwnd, int how) { #ifndef ATTACH_THREADS return SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SHOWWINDOW, @@ -3816,7 +3816,7 @@ static void x_scroll_bar_remove (struct scroll_bar *bar) { - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); block_input (); @@ -3979,7 +3979,7 @@ `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ static void -w32_condemn_scroll_bars (FRAME_PTR frame) +w32_condemn_scroll_bars (struct frame *frame) { /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ while (! NILP (FRAME_SCROLL_BARS (frame))) @@ -4047,7 +4047,7 @@ last call to `*condemn_scroll_bars_hook'. */ static void -w32_judge_scroll_bars (FRAME_PTR f) +w32_judge_scroll_bars (struct frame *f) { Lisp_Object bar, next; @@ -4185,14 +4185,14 @@ on the scroll bar. */ static void -x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, +x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, unsigned long *time) { struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); Window w = SCROLL_BAR_W32_WINDOW (bar); - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); int pos; int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); SCROLLINFO si; @@ -4244,7 +4244,7 @@ redraw them. */ void -x_scroll_bar_clear (FRAME_PTR f) +x_scroll_bar_clear (struct frame *f) { Lisp_Object bar; @@ -4974,7 +4974,7 @@ if (f) { extern void menubar_selection_callback - (FRAME_PTR f, void * client_data); + (struct frame *f, void * client_data); menubar_selection_callback (f, (void *)msg.msg.wParam); } @@ -5071,7 +5071,7 @@ FOR_EACH_FRAME (tail, frame) { - FRAME_PTR f = XFRAME (frame); + struct frame *f = XFRAME (frame); /* The tooltip has been drawn already. Avoid the SET_FRAME_GARBAGED below. */ if (EQ (frame, tip_frame)) @@ -5692,7 +5692,7 @@ } static void -w32fullscreen_hook (FRAME_PTR f) +w32fullscreen_hook (struct frame *f) { if (FRAME_VISIBLE_P (f)) { @@ -5964,7 +5964,7 @@ } static void -w32_frame_raise_lower (FRAME_PTR f, int raise_flag) +w32_frame_raise_lower (struct frame *f, int raise_flag) { if (! FRAME_W32_P (f)) return; === modified file 'src/w32term.h' --- src/w32term.h 2013-07-31 12:50:59 +0000 +++ src/w32term.h 2013-08-03 03:29:03 +0000 @@ -205,7 +205,7 @@ extern struct w32_display_info *w32_term_init (Lisp_Object, char *, char *); -extern int w32_defined_color (FRAME_PTR f, const char *color, +extern int w32_defined_color (struct frame *f, const char *color, XColor *color_def, int alloc); extern void x_set_window_size (struct frame *f, int change_grav, int cols, int rows); === modified file 'src/w32uniscribe.c' --- src/w32uniscribe.c 2013-08-01 16:09:20 +0000 +++ src/w32uniscribe.c 2013-08-03 03:29:03 +0000 @@ -106,7 +106,7 @@ } static Lisp_Object -uniscribe_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) +uniscribe_open (struct frame *f, Lisp_Object font_entity, int pixel_size) { Lisp_Object font_object = font_make_object (VECSIZE (struct uniscribe_font_info), @@ -135,7 +135,7 @@ } static void -uniscribe_close (FRAME_PTR f, struct font *font) +uniscribe_close (struct frame *f, struct font *font) { struct uniscribe_font_info *uniscribe_font = (struct uniscribe_font_info *) font; @@ -599,8 +599,8 @@ int x, int y, int with_background); Unused: - int uniscribe_prepare_face (FRAME_PTR f, struct face *face); - void uniscribe_done_face (FRAME_PTR f, struct face *face); + int uniscribe_prepare_face (struct frame *f, struct face *face); + void uniscribe_done_face (struct frame *f, struct face *face); int uniscribe_get_bitmap (struct font *font, unsigned code, struct font_bitmap *bitmap, int bits_per_pixel); void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap); @@ -608,8 +608,8 @@ void uniscribe_free_outline (struct font *font, void *outline); int uniscribe_anchor_point (struct font *font, unsigned code, int index, int *x, int *y); - int uniscribe_start_for_frame (FRAME_PTR f); - int uniscribe_end_for_frame (FRAME_PTR f); + int uniscribe_start_for_frame (struct frame *f); + int uniscribe_end_for_frame (struct frame *f); */ === modified file 'src/w32xfns.c' --- src/w32xfns.c 2013-01-02 16:13:04 +0000 +++ src/w32xfns.c 2013-08-03 03:29:03 +0000 @@ -90,7 +90,7 @@ } void -select_palette (FRAME_PTR f, HDC hdc) +select_palette (struct frame *f, HDC hdc) { struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); @@ -117,7 +117,7 @@ } void -deselect_palette (FRAME_PTR f, HDC hdc) +deselect_palette (struct frame *f, HDC hdc) { if (f->output_data.w32->old_palette) SelectPalette (hdc, f->output_data.w32->old_palette, FALSE); @@ -126,7 +126,7 @@ /* Get a DC for frame and select palette for drawing; force an update of all frames if palette's mapping changes. */ HDC -get_frame_dc (FRAME_PTR f) +get_frame_dc (struct frame *f) { HDC hdc; @@ -146,7 +146,7 @@ } int -release_frame_dc (FRAME_PTR f, HDC hdc) +release_frame_dc (struct frame *f, HDC hdc) { int ret; === modified file 'src/widget.c' --- src/widget.c 2013-08-02 13:22:23 +0000 +++ src/widget.c 2013-08-03 03:29:03 +0000 @@ -806,7 +806,7 @@ widget_store_internal_border (Widget widget) { EmacsFrame ew = (EmacsFrame) widget; - FRAME_PTR f = ew->emacs_frame.frame; + struct frame *f = ew->emacs_frame.frame; ew->emacs_frame.internal_border_width = f->internal_border_width; } === modified file 'src/window.c' --- src/window.c 2013-07-30 05:56:18 +0000 +++ src/window.c 2013-08-03 03:29:03 +0000 @@ -3019,7 +3019,7 @@ minimum allowable size. */ void -check_frame_size (FRAME_PTR frame, int *rows, int *cols) +check_frame_size (struct frame *frame, int *rows, int *cols) { /* For height, we have to see: how many windows the frame has at minimum (one or two), @@ -5516,7 +5516,7 @@ struct Lisp_Vector *saved_windows; Lisp_Object new_current_buffer; Lisp_Object frame; - FRAME_PTR f; + struct frame *f; ptrdiff_t old_point = -1; CHECK_WINDOW_CONFIGURATION (configuration); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-07-24 17:36:42 +0000 +++ src/xdisp.c 2013-08-03 03:29:03 +0000 @@ -1854,7 +1854,7 @@ not force the value into range. */ void -pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y, +pixel_to_glyph_coords (struct frame *f, register int pix_x, register int pix_y, int *x, int *y, NativeRectangle *bounds, int noclip) { @@ -11449,7 +11449,7 @@ /* Where the mouse was last time we reported a mouse event. */ -FRAME_PTR last_mouse_frame; +struct frame *last_mouse_frame; /* Tool-bar item index of the item on which a mouse button was pressed or -1. */ === modified file 'src/xfaces.c' --- src/xfaces.c 2013-08-01 10:33:25 +0000 +++ src/xfaces.c 2013-08-03 03:29:03 +0000 @@ -869,7 +869,7 @@ if these pointers are not null. */ static ptrdiff_t -load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, +load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr) { ptrdiff_t bitmap_id; @@ -3075,7 +3075,7 @@ { if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) { - FRAME_PTR f; + struct frame *f; old_value = LFACE_FONT (lface); if (! FONTP (value)) === modified file 'src/xfns.c' --- src/xfns.c 2013-08-02 13:22:23 +0000 +++ src/xfns.c 2013-08-03 03:29:03 +0000 @@ -176,7 +176,7 @@ dpyinfo = x_display_info_for_name (object); else { - FRAME_PTR f = decode_window_system_frame (object); + struct frame *f = decode_window_system_frame (object); dpyinfo = FRAME_X_DISPLAY_INFO (f); } @@ -369,7 +369,7 @@ not Emacs's own window. */ void -x_real_positions (FRAME_PTR f, int *xptr, int *yptr) +x_real_positions (struct frame *f, int *xptr, int *yptr) { int win_x, win_y, outer_x IF_LINT (= 0), outer_y IF_LINT (= 0); int real_x = 0, real_y = 0; @@ -565,7 +565,7 @@ Signal an error if color can't be allocated. */ static int -x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color) +x_decode_color (struct frame *f, Lisp_Object color_name, int mono_color) { XColor cdef; @@ -626,7 +626,7 @@ may be any format that GdkPixbuf knows about, i.e. not just bitmaps. */ int -xg_set_icon (FRAME_PTR f, Lisp_Object file) +xg_set_icon (struct frame *f, Lisp_Object file) { int result = 0; Lisp_Object found; @@ -660,7 +660,7 @@ } int -xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data) +xg_set_icon_from_xpm_data (struct frame *f, const char **data) { GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); @@ -1050,7 +1050,7 @@ static void -x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); @@ -1449,7 +1449,7 @@ icon name to NAME. */ static void -x_set_name_internal (FRAME_PTR f, Lisp_Object name) +x_set_name_internal (struct frame *f, Lisp_Object name) { if (FRAME_X_WINDOW (f)) { @@ -1608,7 +1608,7 @@ specified a name for the frame; the name will override any set by the redisplay code. */ static void -x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_explicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { x_set_name (f, arg, 1); } @@ -1617,7 +1617,7 @@ name; names set this way will never override names set by the user's lisp code. */ void -x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) +x_implicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { x_set_name (f, arg, 0); } @@ -1730,7 +1730,7 @@ for example, but Xt doesn't). */ static void -hack_wm_protocols (FRAME_PTR f, Widget widget) +hack_wm_protocols (struct frame *f, Widget widget) { Display *dpy = XtDisplay (widget); Window w = XtWindow (widget); @@ -2538,7 +2538,7 @@ #else /* not USE_X_TOOLKIT */ #ifdef USE_GTK static void -x_window (FRAME_PTR f) +x_window (struct frame *f) { if (! xg_create_frame_widgets (f)) error ("Unable to create window"); @@ -3485,7 +3485,7 @@ (Lisp_Object color, Lisp_Object frame) { XColor foo; - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHECK_STRING (color); @@ -3500,7 +3500,7 @@ (Lisp_Object color, Lisp_Object frame) { XColor foo; - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); CHECK_STRING (color); @@ -4586,7 +4586,7 @@ /* Wait for responses to all X commands issued so far for frame F. */ void -x_sync (FRAME_PTR f) +x_sync (struct frame *f) { block_input (); XSync (FRAME_X_DISPLAY (f), False); @@ -5770,7 +5770,8 @@ This function is only defined on NS, MS Windows, and X Windows with the Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored. Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) - (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) + (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, + Lisp_Object mustmatch, Lisp_Object only_dir_p) { int result; struct frame *f = SELECTED_FRAME (); @@ -5943,7 +5944,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) { - FRAME_PTR f = SELECTED_FRAME (); + struct frame *f = SELECTED_FRAME (); char *fn; Lisp_Object file = Qnil; Lisp_Object decoded_file; @@ -6006,7 +6007,7 @@ nil, it defaults to the selected frame. */) (Lisp_Object frame, Lisp_Object ignored) { - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); Lisp_Object font; Lisp_Object font_param; char *default_name = NULL; === modified file 'src/xfont.c' --- src/xfont.c 2013-08-01 10:33:25 +0000 +++ src/xfont.c 2013-08-03 03:29:03 +0000 @@ -114,19 +114,19 @@ ? NULL : pcm); } -static Lisp_Object xfont_get_cache (FRAME_PTR); +static Lisp_Object xfont_get_cache (struct frame *); static Lisp_Object xfont_list (struct frame *, Lisp_Object); static Lisp_Object xfont_match (struct frame *, Lisp_Object); static Lisp_Object xfont_list_family (struct frame *); -static Lisp_Object xfont_open (FRAME_PTR, Lisp_Object, int); -static void xfont_close (FRAME_PTR, struct font *); -static int xfont_prepare_face (FRAME_PTR, struct face *); +static Lisp_Object xfont_open (struct frame *, Lisp_Object, int); +static void xfont_close (struct frame *, struct font *); +static int xfont_prepare_face (struct frame *, struct face *); static int xfont_has_char (Lisp_Object, int); static unsigned xfont_encode_char (struct font *, int); static int xfont_text_extents (struct font *, unsigned *, int, struct font_metrics *); static int xfont_draw (struct glyph_string *, int, int, int, int, bool); -static int xfont_check (FRAME_PTR, struct font *); +static int xfont_check (struct frame *, struct font *); struct font_driver xfont_driver = { @@ -152,7 +152,7 @@ }; static Lisp_Object -xfont_get_cache (FRAME_PTR f) +xfont_get_cache (struct frame *f) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); @@ -676,7 +676,7 @@ } static Lisp_Object -xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) +xfont_open (struct frame *f, Lisp_Object entity, int pixel_size) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); Display *display = dpyinfo->display; @@ -892,7 +892,7 @@ } static void -xfont_close (FRAME_PTR f, struct font *font) +xfont_close (struct frame *f, struct font *font) { block_input (); XFreeFont (FRAME_X_DISPLAY (f), ((struct xfont_info *) font)->xfont); @@ -900,7 +900,7 @@ } static int -xfont_prepare_face (FRAME_PTR f, struct face *face) +xfont_prepare_face (struct frame *f, struct face *face) { block_input (); XSetFont (FRAME_X_DISPLAY (f), face->gc, @@ -1089,7 +1089,7 @@ } static int -xfont_check (FRAME_PTR f, struct font *font) +xfont_check (struct frame *f, struct font *font) { struct xfont_info *xfont = (struct xfont_info *) font; === modified file 'src/xftfont.c' --- src/xftfont.c 2013-08-01 10:33:25 +0000 +++ src/xftfont.c 2013-08-03 03:29:03 +0000 @@ -70,7 +70,7 @@ XftColor xft_bg; /* color for face->background */ }; -static void xftfont_get_colors (FRAME_PTR, struct face *, GC gc, +static void xftfont_get_colors (struct frame *, struct face *, GC gc, struct xftface_info *, XftColor *fg, XftColor *bg); @@ -80,7 +80,9 @@ may be NULL. */ static void -xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info *xftface_info, XftColor *fg, XftColor *bg) +xftfont_get_colors (struct frame *f, struct face *face, GC gc, + struct xftface_info *xftface_info, + XftColor *fg, XftColor *bg) { if (xftface_info && face->gc == gc) { @@ -262,7 +264,7 @@ } static Lisp_Object -xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) +xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) { FcResult result; Display *display = FRAME_X_DISPLAY (f); @@ -484,7 +486,7 @@ } static void -xftfont_close (FRAME_PTR f, struct font *font) +xftfont_close (struct frame *f, struct font *font) { struct xftfont_info *xftfont_info = (struct xftfont_info *) font; @@ -499,7 +501,7 @@ } static int -xftfont_prepare_face (FRAME_PTR f, struct face *face) +xftfont_prepare_face (struct frame *f, struct face *face) { struct xftface_info *xftface_info; @@ -522,7 +524,7 @@ } static void -xftfont_done_face (FRAME_PTR f, struct face *face) +xftfont_done_face (struct frame *f, struct face *face) { struct xftface_info *xftface_info; @@ -595,7 +597,7 @@ } static XftDraw * -xftfont_get_xft_draw (FRAME_PTR f) +xftfont_get_xft_draw (struct frame *f) { XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver); @@ -617,7 +619,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) { - FRAME_PTR f = s->f; + struct frame *f = s->f; struct face *face = s->face; struct xftfont_info *xftfont_info = (struct xftfont_info *) s->font; struct xftface_info *xftface_info = NULL; @@ -677,7 +679,7 @@ #endif static int -xftfont_end_for_frame (FRAME_PTR f) +xftfont_end_for_frame (struct frame *f) { XftDraw *xft_draw; === modified file 'src/xmenu.c' --- src/xmenu.c 2013-08-02 03:55:24 +0000 +++ src/xmenu.c 2013-08-03 03:29:03 +0000 @@ -111,7 +111,7 @@ static Lisp_Object Qdebug_on_next_call; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) -static Lisp_Object xdialog_show (FRAME_PTR, bool, Lisp_Object, Lisp_Object, +static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object, Lisp_Object, const char **); #endif @@ -130,7 +130,7 @@ menubar_id_to_frame (LWLIB_ID id) { Lisp_Object tail, frame; - FRAME_PTR f; + struct frame *f; FOR_EACH_FRAME (tail, frame) { @@ -154,7 +154,7 @@ the scroll bar or the edit window. Fx_popup_menu needs to be sure it is the edit window. */ void -mouse_position_for_popup (FRAME_PTR f, int *x, int *y) +mouse_position_for_popup (struct frame *f, int *x, int *y) { Window root, dummy_window; int dummy; @@ -219,7 +219,7 @@ `x-popup-dialog' does not return. */) (Lisp_Object position, Lisp_Object contents, Lisp_Object header) { - FRAME_PTR f = NULL; + struct frame *f = NULL; Lisp_Object window; /* Decode the first argument: find the window or frame to use. */ @@ -229,7 +229,7 @@ { #if 0 /* Using the frame the mouse is on may not be right. */ /* Use the mouse's current position. */ - FRAME_PTR new_f = SELECTED_FRAME (); + struct frame *new_f = SELECTED_FRAME (); Lisp_Object bar_window; enum scroll_bar_part part; Time time; @@ -481,7 +481,7 @@ (Lisp_Object frame) { XEvent ev; - FRAME_PTR f = decode_window_system_frame (frame); + struct frame *f = decode_window_system_frame (frame); Widget menubar; block_input (); @@ -559,10 +559,7 @@ (Lisp_Object frame) { GtkWidget *menubar; - FRAME_PTR f; - - /* gcc 2.95 doesn't accept the FRAME_PTR declaration after - block_input (). */ + struct frame *f; block_input (); f = decode_window_system_frame (frame); @@ -620,7 +617,7 @@ execute Lisp code. */ void -x_activate_menubar (FRAME_PTR f) +x_activate_menubar (struct frame *f) { eassert (FRAME_X_P (f)); @@ -682,7 +679,7 @@ for that widget. F is the frame if known, or NULL if not known. */ static void -show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) +show_help_event (struct frame *f, xt_or_gtk_widget widget, Lisp_Object help) { Lisp_Object frame; @@ -815,7 +812,7 @@ static void menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { - FRAME_PTR f; + struct frame *f; f = menubar_id_to_frame (id); if (!f) @@ -829,7 +826,7 @@ changed. */ static void -update_frame_menubar (FRAME_PTR f) +update_frame_menubar (struct frame *f) { #ifdef USE_GTK xg_update_frame_menubar (f); @@ -911,7 +908,7 @@ it is set the first time this is called, from initialize_frame_menubar. */ void -set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p) +set_frame_menubar (struct frame *f, bool first_time, bool deep_p) { xt_or_gtk_widget menubar_widget; #ifdef USE_X_TOOLKIT @@ -1263,7 +1260,7 @@ is visible. */ void -initialize_frame_menubar (FRAME_PTR f) +initialize_frame_menubar (struct frame *f) { /* This function is called before the first chance to redisplay the frame. It has to be, so the frame will have the right size. */ @@ -1278,7 +1275,7 @@ #ifndef USE_GTK void -free_frame_menubar (FRAME_PTR f) +free_frame_menubar (struct frame *f) { Widget menubar_widget; @@ -1355,7 +1352,7 @@ create_and_show_popup_menu below. */ struct next_popup_x_y { - FRAME_PTR f; + struct frame *f; int x; int y; }; @@ -1413,7 +1410,7 @@ menu pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, +create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int y, bool for_click, Time timestamp) { int i; @@ -1522,7 +1519,7 @@ menu pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, +create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int y, bool for_click, Time timestamp) { int i; @@ -1601,7 +1598,7 @@ } Lisp_Object -xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, +xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, Lisp_Object title, const char **error_name, Time timestamp) { int i; @@ -1894,7 +1891,7 @@ dialog pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) +create_and_show_dialog (struct frame *f, widget_value *first_wv) { GtkWidget *menu; @@ -1940,7 +1937,7 @@ dialog pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) +create_and_show_dialog (struct frame *f, widget_value *first_wv) { LWLIB_ID dialog_id; @@ -1984,7 +1981,7 @@ "button6", "button7", "button8", "button9", "button10" }; static Lisp_Object -xdialog_show (FRAME_PTR f, +xdialog_show (struct frame *f, bool keymaps, Lisp_Object title, Lisp_Object header, @@ -2214,7 +2211,7 @@ static void pop_down_menu (Lisp_Object arg) { - FRAME_PTR f = XSAVE_POINTER (arg, 0); + struct frame *f = XSAVE_POINTER (arg, 0); XMenu *menu = XSAVE_POINTER (arg, 1); block_input (); @@ -2242,7 +2239,7 @@ Lisp_Object -xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, +xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, Lisp_Object title, const char **error_name, Time timestamp) { Window root; === modified file 'src/xselect.c' --- src/xselect.c 2013-07-30 05:56:18 +0000 +++ src/xselect.c 2013-08-03 03:29:03 +0000 @@ -993,7 +993,7 @@ We do this when about to delete a frame. */ void -x_clear_frame_selections (FRAME_PTR f) +x_clear_frame_selections (struct frame *f) { Lisp_Object frame; Lisp_Object rest; @@ -2377,7 +2377,7 @@ /* Get the mouse position in frame relative coordinates. */ static void -mouse_position_for_drop (FRAME_PTR f, int *x, int *y) +mouse_position_for_drop (struct frame *f, int *x, int *y) { Window root, dummy_window; int dummy; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-02 13:22:23 +0000 +++ src/xterm.c 2013-08-03 03:29:03 +0000 @@ -212,7 +212,7 @@ /* Where the mouse was last time we reported a mouse event. */ static XRectangle last_mouse_glyph; -static FRAME_PTR last_mouse_glyph_frame; +static struct frame *last_mouse_glyph_frame; /* The scroll bar in which the last X motion event occurred. @@ -3188,7 +3188,7 @@ static void -XTtoggle_invisible_pointer (FRAME_PTR f, int invisible) +XTtoggle_invisible_pointer (struct frame *f, int invisible) { block_input (); if (invisible) @@ -3797,7 +3797,7 @@ static Lisp_Object last_mouse_motion_frame; static int -note_mouse_movement (FRAME_PTR frame, XMotionEvent *event) +note_mouse_movement (struct frame *frame, XMotionEvent *event) { last_mouse_movement_time = event->time; last_mouse_motion_event = *event; @@ -3873,11 +3873,11 @@ movement. */ static void -XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, +XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *timestamp) { - FRAME_PTR f1; + struct frame *f1; block_input (); @@ -4416,7 +4416,8 @@ gdouble position; int part = -1, whole = 0, portion = 0; GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); - FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); + struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (range), + XG_FRAME_DATA); if (xg_ignore_gtk_scrollbar) return FALSE; position = gtk_adjustment_get_value (adj); @@ -5033,7 +5034,7 @@ { int dragging = ! NILP (bar->dragging); Window w = bar->x_window; - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); GC gc = f->output_data.x->normal_gc; /* If the display is already accurate, do nothing. */ @@ -5374,7 +5375,7 @@ `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ static void -XTcondemn_scroll_bars (FRAME_PTR frame) +XTcondemn_scroll_bars (struct frame *frame) { /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ while (! NILP (FRAME_SCROLL_BARS (frame))) @@ -5442,7 +5443,7 @@ last call to `*condemn_scroll_bars_hook'. */ static void -XTjudge_scroll_bars (FRAME_PTR f) +XTjudge_scroll_bars (struct frame *f) { Lisp_Object bar, next; @@ -5478,7 +5479,7 @@ x_scroll_bar_expose (struct scroll_bar *bar, XEvent *event) { Window w = bar->x_window; - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); GC gc = f->output_data.x->normal_gc; int width_trim = VERTICAL_SCROLL_BAR_WIDTH_TRIM; @@ -5577,7 +5578,7 @@ static void x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event) { - FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame); + struct frame *f = XFRAME (XWINDOW (bar->window)->frame); last_mouse_movement_time = event->xmotion.time; @@ -5605,13 +5606,13 @@ on the scroll bar. */ static void -x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, +x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *timestamp) { struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); Window w = bar->x_window; - FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); int win_x, win_y; Window dummy_window; int dummy_coord; @@ -5679,7 +5680,7 @@ redraw them. */ static void -x_scroll_bar_clear (FRAME_PTR f) +x_scroll_bar_clear (struct frame *f) { #ifndef USE_TOOLKIT_SCROLL_BARS Lisp_Object bar; @@ -8524,7 +8525,7 @@ } static void -XTfullscreen_hook (FRAME_PTR f) +XTfullscreen_hook (struct frame *f) { if (FRAME_VISIBLE_P (f)) { @@ -8925,7 +8926,7 @@ /* Request focus with XEmbed */ void -xembed_request_focus (FRAME_PTR f) +xembed_request_focus (struct frame *f) { /* See XEmbed Protocol Specification at http://freedesktop.org/wiki/Specifications/xembed-spec */ @@ -8937,7 +8938,7 @@ /* Activate frame with Extended Window Manager Hints */ void -x_ewmh_activate_frame (FRAME_PTR f) +x_ewmh_activate_frame (struct frame *f) { /* See Window Manager Specification/Extended Window Manager Hints at http://freedesktop.org/wiki/Specifications/wm-spec */ @@ -8955,7 +8956,7 @@ } static void -XTframe_raise_lower (FRAME_PTR f, int raise_flag) +XTframe_raise_lower (struct frame *f, int raise_flag) { if (raise_flag) x_raise_frame (f); ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.