diff options
| author | Joakim Verona | 2012-05-31 19:54:01 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-31 19:54:01 +0200 |
| commit | fc1f1f2ea1ceac41f81855e14a490db107d88681 (patch) | |
| tree | 853798b1704f9de86e02ad87d77f2b1e8d56dda8 | |
| parent | 664e085984f192584c5b3c61495784a11d2ba6c1 (diff) | |
| parent | 32d72c2f5d7554ee2f1d37bb8aa210ee07165f25 (diff) | |
| download | emacs-fc1f1f2ea1ceac41f81855e14a490db107d88681.tar.gz emacs-fc1f1f2ea1ceac41f81855e14a490db107d88681.zip | |
upstream
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | etc/NEWS | 14 | ||||
| -rw-r--r-- | etc/PROBLEMS | 10 | ||||
| -rw-r--r-- | lib-src/ChangeLog | 6 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 45 | ||||
| -rw-r--r-- | lisp/desktop.el | 12 | ||||
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 127 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 173 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 7 | ||||
| -rw-r--r-- | lisp/image.el | 96 | ||||
| -rw-r--r-- | lwlib/ChangeLog | 7 | ||||
| -rw-r--r-- | lwlib/xlwmenu.c | 16 | ||||
| -rw-r--r-- | nt/ChangeLog | 17 | ||||
| -rwxr-xr-x | nt/configure.bat | 39 | ||||
| -rw-r--r-- | nt/gmake.defs | 2 | ||||
| -rw-r--r-- | nt/nmake.defs | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 54 | ||||
| -rw-r--r-- | src/charset.c | 9 | ||||
| -rw-r--r-- | src/doc.c | 21 | ||||
| -rw-r--r-- | src/image.c | 6 | ||||
| -rw-r--r-- | src/keymap.c | 8 | ||||
| -rw-r--r-- | src/keymap.h | 2 | ||||
| -rw-r--r-- | src/ralloc.c | 7 | ||||
| -rw-r--r-- | src/s/hpux10-20.h | 6 | ||||
| -rw-r--r-- | src/search.c | 20 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | src/xfns.c | 8 | ||||
| -rw-r--r-- | src/xterm.c | 9 | ||||
| -rw-r--r-- | src/xterm.h | 2 |
31 files changed, 513 insertions, 232 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index ffd9f7d31f6..167910f782f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * PROBLEMS: Remove obsolete '#define static' cruft. | ||
| 4 | |||
| 1 | 2012-05-07 Glenn Morris <rgm@gnu.org> | 5 | 2012-05-07 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * forms/forms-d2.el, forms/forms-pass.el: Move here from ../lisp. | 7 | * forms/forms-d2.el, forms/forms-pass.el: Move here from ../lisp. |
| @@ -60,12 +60,16 @@ name, group names known to the system (where possible). | |||
| 60 | ** ImageMagick support, if available, is automatically enabled. | 60 | ** ImageMagick support, if available, is automatically enabled. |
| 61 | It is no longer necessary to call `imagemagick-register-types' | 61 | It is no longer necessary to call `imagemagick-register-types' |
| 62 | explicitly to install ImageMagick image types; that function is called | 62 | explicitly to install ImageMagick image types; that function is called |
| 63 | automatically at startup or when customizing `imagemagick-types-inhibit'. | 63 | automatically at startup, or when customizing imagemagick-types-enable |
| 64 | or imagemagick-types-inhibit. | ||
| 64 | 65 | ||
| 65 | *** Setting `imagemagick-types-inhibit' to t now disables the use of | 66 | *** Setting `imagemagick-types-inhibit' to t now disables the use of |
| 66 | ImageMagick to view images. You must call imagemagick-register-types | 67 | ImageMagick to view images. You must call imagemagick-register-types |
| 67 | afterwards if you do not use customize to change this. | 68 | afterwards if you do not use customize to change this. |
| 68 | 69 | ||
| 70 | *** The new variable `imagemagick-types-enable' also affects which | ||
| 71 | ImageMagick types are treated as images. | ||
| 72 | |||
| 69 | ** String values for `initial-buffer-choice' also apply to emacsclient | 73 | ** String values for `initial-buffer-choice' also apply to emacsclient |
| 70 | frames, if emacsclient is only told to open a new frame without | 74 | frames, if emacsclient is only told to open a new frame without |
| 71 | specifying any file to visit or expression to evaluate. | 75 | specifying any file to visit or expression to evaluate. |
| @@ -118,6 +122,9 @@ The variable `diff-use-changed-face' defines whether to use | |||
| 118 | the face `diff-changed', or `diff-removed' and `diff-added' | 122 | the face `diff-changed', or `diff-removed' and `diff-added' |
| 119 | to highlight changes in context diffs. | 123 | to highlight changes in context diffs. |
| 120 | 124 | ||
| 125 | ** Ediff now uses the same color scheme as Diff mode | ||
| 126 | on high color displays. | ||
| 127 | |||
| 121 | ** `sh-script' | 128 | ** `sh-script' |
| 122 | *** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair. | 129 | *** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair. |
| 123 | *** `sh-electric-here-document-mode' now controls auto-insertion of here-docs. | 130 | *** `sh-electric-here-document-mode' now controls auto-insertion of here-docs. |
| @@ -296,6 +303,11 @@ still be supported for Emacs 24.x. | |||
| 296 | 303 | ||
| 297 | * Lisp changes in Emacs 24.2 | 304 | * Lisp changes in Emacs 24.2 |
| 298 | 305 | ||
| 306 | ** `defun' also accepts a (declare DECLS) form, like `defmacro'. | ||
| 307 | The interpretation of the DECLS is determined by `defun-declarations-alist'. | ||
| 308 | |||
| 309 | ** `macro-declaration-function' is obsolete, use `macro-declarations-alist'. | ||
| 310 | |||
| 299 | ** New function `set-temporary-overlay-map'. | 311 | ** New function `set-temporary-overlay-map'. |
| 300 | 312 | ||
| 301 | ** New macros `setq-local' and `defvar-local'. | 313 | ** New macros `setq-local' and `defvar-local'. |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index cc591d6e1fe..6d5ee0498c7 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -2778,19 +2778,11 @@ build Emacs in a directory on a local disk. | |||
| 2778 | 2778 | ||
| 2779 | *** The dumped Emacs crashes when run, trying to write pure data. | 2779 | *** The dumped Emacs crashes when run, trying to write pure data. |
| 2780 | 2780 | ||
| 2781 | Two causes have been seen for such problems. | 2781 | On a system where getpagesize is not a system call, it is defined |
| 2782 | |||
| 2783 | 1) On a system where getpagesize is not a system call, it is defined | ||
| 2784 | as a macro. If the definition (in both unex*.c and malloc.c) is wrong, | 2782 | as a macro. If the definition (in both unex*.c and malloc.c) is wrong, |
| 2785 | it can cause problems like this. You might be able to find the correct | 2783 | it can cause problems like this. You might be able to find the correct |
| 2786 | value in the man page for a.out (5). | 2784 | value in the man page for a.out (5). |
| 2787 | 2785 | ||
| 2788 | 2) Some systems allocate variables declared static among the | ||
| 2789 | initialized variables. Emacs makes all initialized variables in most | ||
| 2790 | of its files pure after dumping, but the variables declared static and | ||
| 2791 | not initialized are not supposed to be pure. On these systems you | ||
| 2792 | may need to add "#define static" to config.h. | ||
| 2793 | |||
| 2794 | * Runtime problems on legacy systems | 2786 | * Runtime problems on legacy systems |
| 2795 | 2787 | ||
| 2796 | This section covers bugs reported on very old hardware or software. | 2788 | This section covers bugs reported on very old hardware or software. |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index d95137852e0..ff631d09fcd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * makefile.w32-in ($(BLD)/emacsclientw.exe): Use $(MWINDOWS) | ||
| 4 | instead of a literal -mwindows, which is not supported by MSVC. | ||
| 5 | (Bug#11405) | ||
| 6 | |||
| 1 | 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * make-docfile.c: Improve comment style. | 9 | * make-docfile.c: Improve comment style. |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 83b818ed6c6..b727288351a 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -65,7 +65,7 @@ $(BLD)/emacsclient.exe: $(ECLIENTOBJS) | |||
| 65 | 65 | ||
| 66 | $(BLD)/emacsclientw.exe: $(ECLIENTOBJS) $(CLIENTRES) | 66 | $(BLD)/emacsclientw.exe: $(ECLIENTOBJS) $(CLIENTRES) |
| 67 | # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib | 67 | # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib |
| 68 | $(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS) | 68 | $(LINK) $(LINK_OUT)$@ $(CLIENTRES) $(MWINDOWS) $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS) |
| 69 | 69 | ||
| 70 | $(BLD)/emacsclient.$(O): emacsclient.c | 70 | $(BLD)/emacsclient.$(O): emacsclient.c |
| 71 | $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c | 71 | $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62405960593..c2c6e0da37b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,50 @@ | |||
| 1 | 2012-05-31 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * image.el: For clarity, call imagemagick-register-types at | ||
| 4 | top-level, rather than relying on a custom :initialize. | ||
| 5 | (imagemagick-types-enable): New option. (Bug#11557) | ||
| 6 | (imagemagick-register-types): Respect imagemagick-types-inhibit. | ||
| 7 | If disabling support, remove elements altogether rather | ||
| 8 | than using an impossible regexp. | ||
| 9 | (imagemagick-types-inhibit): Give it the default init function. | ||
| 10 | |||
| 11 | 2012-05-31 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 12 | |||
| 13 | * emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle | ||
| 14 | arbitrary file name lengths (Bug#11585). | ||
| 15 | |||
| 16 | 2012-05-31 Martin Rudalics <rudalics@gmx.at> | ||
| 17 | |||
| 18 | * desktop.el (desktop-read): Clear previous and next buffers for | ||
| 19 | all windows and bury *Messages* buffer (bug#11556). | ||
| 20 | |||
| 21 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 22 | |||
| 23 | * mail/sendmail.el (mail-yank-region): Recognize | ||
| 24 | rmail-yank-current-message in addition to insert-buffer. Fixes | ||
| 25 | mail-mode's "C-c C-r" that otherwise does nothing when invoked in | ||
| 26 | |||
| 27 | 2012-05-31 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 28 | |||
| 29 | Add `declare' for `defun'. Align `defmacro's with it. | ||
| 30 | * emacs-lisp/easy-mmode.el (define-minor-mode) | ||
| 31 | (define-globalized-minor-mode): Don't autoload the var definitions. | ||
| 32 | * emacs-lisp/byte-run.el: Use lexical-binding. | ||
| 33 | (defun-declarations-alist, macro-declarations-alist): New vars. | ||
| 34 | (defmacro, defun): Use them. | ||
| 35 | (make-obsolete, define-obsolete-function-alias) | ||
| 36 | (make-obsolete-variable, define-obsolete-variable-alias): | ||
| 37 | Use `declare'. | ||
| 38 | (macro-declaration-function): Mark obsolete. | ||
| 39 | * emacs-lisp/autoload.el: Use lexical-binding. | ||
| 40 | (make-autoload): Add `expansion' arg. Rely more on macro expansion. | ||
| 41 | |||
| 1 | 2012-05-30 AgustÃn MartÃn Domingo <agustin.martin@hispalinux.es> | 42 | 2012-05-30 AgustÃn MartÃn Domingo <agustin.martin@hispalinux.es> |
| 2 | 43 | ||
| 3 | * textmodes/ispell.el (ispell-with-no-warnings): | 44 | * textmodes/ispell.el (ispell-with-no-warnings): |
| 4 | Define as a macro. | 45 | Define as a macro. |
| 5 | (ispell-kill-ispell, ispell-change-dictionary): Use | 46 | (ispell-kill-ispell, ispell-change-dictionary): |
| 6 | `called-interactively-p' for Emacs instead of obsolete | 47 | Use `called-interactively-p' for Emacs instead of obsolete |
| 7 | `interactive-p'. | 48 | `interactive-p'. |
| 8 | 49 | ||
| 9 | 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca> | 50 | 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/lisp/desktop.el b/lisp/desktop.el index f7a33f2b05d..5d9982940bf 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -1020,6 +1020,18 @@ Using it may cause conflicts. Use it anyway? " owner))))) | |||
| 1020 | (format ", %d to restore lazily" | 1020 | (format ", %d to restore lazily" |
| 1021 | (length desktop-buffer-args-list)) | 1021 | (length desktop-buffer-args-list)) |
| 1022 | "")) | 1022 | "")) |
| 1023 | ;; Bury the *Messages* buffer to not reshow it when burying | ||
| 1024 | ;; the buffer we switched to above. | ||
| 1025 | (when (buffer-live-p (get-buffer "*Messages*")) | ||
| 1026 | (bury-buffer "*Messages*")) | ||
| 1027 | ;; Clear all windows' previous and next buffers, these have | ||
| 1028 | ;; been corrupted by the `switch-to-buffer' calls in | ||
| 1029 | ;; `desktop-restore-file-buffer' (bug#11556). This is a | ||
| 1030 | ;; brute force fix and should be replaced by a more subtle | ||
| 1031 | ;; strategy eventually. | ||
| 1032 | (walk-window-tree (lambda (window) | ||
| 1033 | (set-window-prev-buffers window nil) | ||
| 1034 | (set-window-next-buffers window nil))) | ||
| 1023 | t)) | 1035 | t)) |
| 1024 | ;; No desktop file found. | 1036 | ;; No desktop file found. |
| 1025 | (desktop-clear) | 1037 | (desktop-clear) |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 921b08b10a8..d9fc0fccf0e 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;; autoload.el --- maintain autoloads in loaddefs.el | 1 | ;; autoload.el --- maintain autoloads in loaddefs.el -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991-1997, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1991-1997, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -86,28 +86,67 @@ that text will be copied verbatim to `generated-autoload-file'.") | |||
| 86 | 86 | ||
| 87 | (defvar autoload-modified-buffers) ;Dynamically scoped var. | 87 | (defvar autoload-modified-buffers) ;Dynamically scoped var. |
| 88 | 88 | ||
| 89 | (defun make-autoload (form file) | 89 | (defun make-autoload (form file &optional expansion) |
| 90 | "Turn FORM into an autoload or defvar for source file FILE. | 90 | "Turn FORM into an autoload or defvar for source file FILE. |
| 91 | Returns nil if FORM is not a special autoload form (i.e. a function definition | 91 | Returns nil if FORM is not a special autoload form (i.e. a function definition |
| 92 | or macro definition or a defcustom)." | 92 | or macro definition or a defcustom). |
| 93 | If EXPANSION is non-nil, we're processing the macro expansion of an | ||
| 94 | expression, in which case we want to handle forms differently." | ||
| 93 | (let ((car (car-safe form)) expand) | 95 | (let ((car (car-safe form)) expand) |
| 94 | (cond | 96 | (cond |
| 97 | ((and expansion (eq car 'defalias)) | ||
| 98 | (pcase-let* | ||
| 99 | ((`(,_ ,_ ,arg . ,rest) form) | ||
| 100 | ;; `type' is non-nil if it defines a macro. | ||
| 101 | ;; `fun' is the function part of `arg' (defaults to `arg'). | ||
| 102 | ((or (and (or `(cons 'macro ,fun) `'(macro . ,fun)) (let type t)) | ||
| 103 | (and (let fun arg) (let type nil))) | ||
| 104 | arg) | ||
| 105 | ;; `lam' is the lambda expression in `fun' (or nil if not | ||
| 106 | ;; recognized). | ||
| 107 | (lam (if (memq (car-safe fun) '(quote function)) (cadr fun))) | ||
| 108 | ;; `args' is the list of arguments (or t if not recognized). | ||
| 109 | ;; `body' is the body of `lam' (or t if not recognized). | ||
| 110 | ((or `(lambda ,args . ,body) | ||
| 111 | (and (let args t) (let body t))) | ||
| 112 | lam) | ||
| 113 | ;; Get the `doc' from `body' or `rest'. | ||
| 114 | (doc (cond ((stringp (car-safe body)) (car body)) | ||
| 115 | ((stringp (car-safe rest)) (car rest)))) | ||
| 116 | ;; Look for an interactive spec. | ||
| 117 | (interactive (pcase body | ||
| 118 | ((or `((interactive . ,_) . ,_) | ||
| 119 | `(,_ (interactive . ,_) . ,_)) t)))) | ||
| 120 | ;; Add the usage form at the end where describe-function-1 | ||
| 121 | ;; can recover it. | ||
| 122 | (when (listp args) (setq doc (help-add-fundoc-usage doc args))) | ||
| 123 | ;; (message "autoload of %S" (nth 1 form)) | ||
| 124 | `(autoload ,(nth 1 form) ,file ,doc ,interactive ,type))) | ||
| 125 | |||
| 126 | ((and expansion (memq car '(progn prog1))) | ||
| 127 | (let ((end (memq :autoload-end form))) | ||
| 128 | (when end ;Cut-off anything after the :autoload-end marker. | ||
| 129 | (setq form (copy-sequence form)) | ||
| 130 | (setcdr (memq :autoload-end form) nil)) | ||
| 131 | (let ((exps (delq nil (mapcar (lambda (form) | ||
| 132 | (make-autoload form file expansion)) | ||
| 133 | (cdr form))))) | ||
| 134 | (when exps (cons 'progn exps))))) | ||
| 135 | |||
| 95 | ;; For complex cases, try again on the macro-expansion. | 136 | ;; For complex cases, try again on the macro-expansion. |
| 96 | ((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode | 137 | ((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode |
| 97 | define-globalized-minor-mode | 138 | define-globalized-minor-mode defun defmacro |
| 139 | ;; FIXME: we'd want `defmacro*' here as well, so as | ||
| 140 | ;; to handle its `declare', but when autoload is run | ||
| 141 | ;; CL is not loaded so macroexpand doesn't know how | ||
| 142 | ;; to expand it! | ||
| 98 | easy-mmode-define-minor-mode define-minor-mode)) | 143 | easy-mmode-define-minor-mode define-minor-mode)) |
| 99 | (setq expand (let ((load-file-name file)) (macroexpand form))) | 144 | (setq expand (let ((load-file-name file)) (macroexpand form))) |
| 100 | (eq (car expand) 'progn) | 145 | (memq (car expand) '(progn prog1 defalias))) |
| 101 | (memq :autoload-end expand)) | 146 | (make-autoload expand file 'expansion)) ;Recurse on the expansion. |
| 102 | (let ((end (memq :autoload-end expand))) | ||
| 103 | ;; Cut-off anything after the :autoload-end marker. | ||
| 104 | (setcdr end nil) | ||
| 105 | (cons 'progn | ||
| 106 | (mapcar (lambda (form) (make-autoload form file)) | ||
| 107 | (cdr expand))))) | ||
| 108 | 147 | ||
| 109 | ;; For special function-like operators, use the `autoload' function. | 148 | ;; For special function-like operators, use the `autoload' function. |
| 110 | ((memq car '(defun define-skeleton defmacro define-derived-mode | 149 | ((memq car '(define-skeleton define-derived-mode |
| 111 | define-compilation-mode define-generic-mode | 150 | define-compilation-mode define-generic-mode |
| 112 | easy-mmode-define-global-mode define-global-minor-mode | 151 | easy-mmode-define-global-mode define-global-minor-mode |
| 113 | define-globalized-minor-mode | 152 | define-globalized-minor-mode |
| @@ -124,40 +163,21 @@ or macro definition or a defcustom)." | |||
| 124 | (t))) | 163 | (t))) |
| 125 | (body (nthcdr (get car 'doc-string-elt) form)) | 164 | (body (nthcdr (get car 'doc-string-elt) form)) |
| 126 | (doc (if (stringp (car body)) (pop body)))) | 165 | (doc (if (stringp (car body)) (pop body)))) |
| 127 | (when (listp args) | 166 | ;; Add the usage form at the end where describe-function-1 |
| 128 | ;; Add the usage form at the end where describe-function-1 | 167 | ;; can recover it. |
| 129 | ;; can recover it. | 168 | (when (listp args) (setq doc (help-add-fundoc-usage doc args))) |
| 130 | (setq doc (help-add-fundoc-usage doc args))) | 169 | ;; `define-generic-mode' quotes the name, so take care of that |
| 131 | (let ((exp | 170 | (list 'autoload (if (listp name) name (list 'quote name)) |
| 132 | ;; `define-generic-mode' quotes the name, so take care of that | 171 | file doc |
| 133 | (list 'autoload (if (listp name) name (list 'quote name)) | 172 | (or (and (memq car '(define-skeleton define-derived-mode |
| 134 | file doc | 173 | define-generic-mode |
| 135 | (or (and (memq car '(define-skeleton define-derived-mode | 174 | easy-mmode-define-global-mode |
| 136 | define-generic-mode | 175 | define-global-minor-mode |
| 137 | easy-mmode-define-global-mode | 176 | define-globalized-minor-mode |
| 138 | define-global-minor-mode | 177 | easy-mmode-define-minor-mode |
| 139 | define-globalized-minor-mode | 178 | define-minor-mode)) t) |
| 140 | easy-mmode-define-minor-mode | 179 | (eq (car-safe (car body)) 'interactive)) |
| 141 | define-minor-mode)) t) | 180 | (if macrop (list 'quote 'macro) nil)))) |
| 142 | (eq (car-safe (car body)) 'interactive)) | ||
| 143 | (if macrop (list 'quote 'macro) nil)))) | ||
| 144 | (when macrop | ||
| 145 | ;; Special case to autoload some of the macro's declarations. | ||
| 146 | (let ((decls (nth (if (stringp (nth 3 form)) 4 3) form)) | ||
| 147 | (exps '())) | ||
| 148 | (when (eq (car-safe decls) 'declare) | ||
| 149 | ;; FIXME: We'd like to reuse macro-declaration-function, | ||
| 150 | ;; but we can't since it doesn't return anything. | ||
| 151 | (dolist (decl decls) | ||
| 152 | (case (car-safe decl) | ||
| 153 | (indent | ||
| 154 | (push `(put ',name 'lisp-indent-function ',(cadr decl)) | ||
| 155 | exps)) | ||
| 156 | (doc-string | ||
| 157 | (push `(put ',name 'doc-string-elt ',(cadr decl)) exps)))) | ||
| 158 | (when exps | ||
| 159 | (setq exp `(progn ,exp ,@exps)))))) | ||
| 160 | exp))) | ||
| 161 | 181 | ||
| 162 | ;; For defclass forms, use `eieio-defclass-autoload'. | 182 | ;; For defclass forms, use `eieio-defclass-autoload'. |
| 163 | ((eq car 'defclass) | 183 | ((eq car 'defclass) |
| @@ -190,6 +210,11 @@ or macro definition or a defcustom)." | |||
| 190 | (if (member ',file loads) nil | 210 | (if (member ',file loads) nil |
| 191 | (put ',groupname 'custom-loads (cons ',file loads)))))) | 211 | (put ',groupname 'custom-loads (cons ',file loads)))))) |
| 192 | 212 | ||
| 213 | ;; When processing a macro expansion, any expression | ||
| 214 | ;; before a :autoload-end should be included. These are typically (put | ||
| 215 | ;; 'fun 'prop val) and things like that. | ||
| 216 | ((and expansion (consp form)) form) | ||
| 217 | |||
| 193 | ;; nil here indicates that this is not a special autoload form. | 218 | ;; nil here indicates that this is not a special autoload form. |
| 194 | (t nil)))) | 219 | (t nil)))) |
| 195 | 220 | ||
| @@ -481,7 +506,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE | |||
| 481 | (search-forward generate-autoload-cookie) | 506 | (search-forward generate-autoload-cookie) |
| 482 | (skip-chars-forward " \t") | 507 | (skip-chars-forward " \t") |
| 483 | (if (eolp) | 508 | (if (eolp) |
| 484 | (condition-case err | 509 | (condition-case-unless-debug err |
| 485 | ;; Read the next form and make an autoload. | 510 | ;; Read the next form and make an autoload. |
| 486 | (let* ((form (prog1 (read (current-buffer)) | 511 | (let* ((form (prog1 (read (current-buffer)) |
| 487 | (or (bolp) (forward-line 1)))) | 512 | (or (bolp) (forward-line 1)))) |
| @@ -671,9 +696,9 @@ file binds `generated-autoload-file' as a file-local variable, | |||
| 671 | write its autoloads into the specified file instead." | 696 | write its autoloads into the specified file instead." |
| 672 | (interactive "DUpdate autoloads from directory: ") | 697 | (interactive "DUpdate autoloads from directory: ") |
| 673 | (let* ((files-re (let ((tmp nil)) | 698 | (let* ((files-re (let ((tmp nil)) |
| 674 | (dolist (suf (get-load-suffixes) | 699 | (dolist (suf (get-load-suffixes)) |
| 675 | (concat "^[^=.].*" (regexp-opt tmp t) "\\'")) | 700 | (unless (string-match "\\.elc" suf) (push suf tmp))) |
| 676 | (unless (string-match "\\.elc" suf) (push suf tmp))))) | 701 | (concat "^[^=.].*" (regexp-opt tmp t) "\\'"))) |
| 677 | (files (apply 'nconc | 702 | (files (apply 'nconc |
| 678 | (mapcar (lambda (dir) | 703 | (mapcar (lambda (dir) |
| 679 | (directory-files (expand-file-name dir) | 704 | (directory-files (expand-file-name dir) |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 9b04e9889dd..df8f588ce01 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; byte-run.el --- byte-compiler support for inlining | 1 | ;;; byte-run.el --- byte-compiler support for inlining -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -30,9 +30,8 @@ | |||
| 30 | 30 | ||
| 31 | ;;; Code: | 31 | ;;; Code: |
| 32 | 32 | ||
| 33 | ;; We define macro-declaration-function here because it is needed to | 33 | ;; `macro-declaration-function' are both obsolete (as marked at the end of this |
| 34 | ;; handle declarations in macro definitions and this is the first file | 34 | ;; file) but used in many .elc files. |
| 35 | ;; loaded by loadup.el that uses declarations in macros. | ||
| 36 | 35 | ||
| 37 | (defvar macro-declaration-function #'macro-declaration-function | 36 | (defvar macro-declaration-function #'macro-declaration-function |
| 38 | "Function to process declarations in a macro definition. | 37 | "Function to process declarations in a macro definition. |
| @@ -66,6 +65,45 @@ The return value of this function is not used." | |||
| 66 | (message "Unknown declaration %s" d))) | 65 | (message "Unknown declaration %s" d))) |
| 67 | (message "Invalid declaration %s" d)))))) | 66 | (message "Invalid declaration %s" d)))))) |
| 68 | 67 | ||
| 68 | ;; We define macro-declaration-alist here because it is needed to | ||
| 69 | ;; handle declarations in macro definitions and this is the first file | ||
| 70 | ;; loaded by loadup.el that uses declarations in macros. | ||
| 71 | |||
| 72 | (defvar defun-declarations-alist | ||
| 73 | ;; FIXME: Should we also add an `obsolete' property? | ||
| 74 | (list | ||
| 75 | ;; Too bad we can't use backquote yet at this stage of the bootstrap. | ||
| 76 | (list 'advertised-calling-convention | ||
| 77 | #'(lambda (f arglist when) | ||
| 78 | (list 'set-advertised-calling-convention | ||
| 79 | (list 'quote f) (list 'quote arglist) (list 'quote when)))) | ||
| 80 | (list 'doc-string | ||
| 81 | #'(lambda (f pos) | ||
| 82 | (list 'put (list 'quote f) ''doc-string-elt (list 'quote pos)))) | ||
| 83 | (list 'indent | ||
| 84 | #'(lambda (f val) | ||
| 85 | (list 'put (list 'quote f) | ||
| 86 | ''lisp-indent-function (list 'quote val))))) | ||
| 87 | "List associating function properties to their macro expansion. | ||
| 88 | Each element of the list takes the form (PROP FUN) where FUN is | ||
| 89 | a function. For each (PROP . VALUES) in a function's declaration, | ||
| 90 | the FUN corresponding to PROP is called with the function name | ||
| 91 | and the VALUES and should return the code to use to set this property.") | ||
| 92 | |||
| 93 | (defvar macro-declarations-alist | ||
| 94 | (cons | ||
| 95 | (list 'debug | ||
| 96 | #'(lambda (name spec) | ||
| 97 | (list 'progn :autoload-end | ||
| 98 | (list 'put (list 'quote name) | ||
| 99 | ''edebug-form-spec (list 'quote spec))))) | ||
| 100 | defun-declarations-alist) | ||
| 101 | "List associating properties of macros to their macro expansion. | ||
| 102 | Each element of the list takes the form (PROP FUN) where FUN is | ||
| 103 | a function. For each (PROP . VALUES) in a macro's declaration, | ||
| 104 | the FUN corresponding to PROP is called with the function name | ||
| 105 | and the VALUES and should return the code to use to set this property.") | ||
| 106 | |||
| 69 | (put 'defmacro 'doc-string-elt 3) | 107 | (put 'defmacro 'doc-string-elt 3) |
| 70 | (defalias 'defmacro | 108 | (defalias 'defmacro |
| 71 | (cons | 109 | (cons |
| @@ -76,21 +114,9 @@ When the macro is called, as in (NAME ARGS...), | |||
| 76 | the function (lambda ARGLIST BODY...) is applied to | 114 | the function (lambda ARGLIST BODY...) is applied to |
| 77 | the list ARGS... as it appears in the expression, | 115 | the list ARGS... as it appears in the expression, |
| 78 | and the result should be a form to be evaluated instead of the original. | 116 | and the result should be a form to be evaluated instead of the original. |
| 79 | 117 | DECL is a declaration, optional, of the form (declare DECLS...) where | |
| 80 | DECL is a declaration, optional, which can specify how to indent | 118 | DECLS is a list of elements of the form (PROP . VALUES). These are |
| 81 | calls to this macro, how Edebug should handle it, and which argument | 119 | interpreted according to `macro-declarations-alist'." |
| 82 | should be treated as documentation. It looks like this: | ||
| 83 | (declare SPECS...) | ||
| 84 | The elements can look like this: | ||
| 85 | (indent INDENT) | ||
| 86 | Set NAME's `lisp-indent-function' property to INDENT. | ||
| 87 | |||
| 88 | (debug DEBUG) | ||
| 89 | Set NAME's `edebug-form-spec' property to DEBUG. (This is | ||
| 90 | equivalent to writing a `def-edebug-spec' for the macro.) | ||
| 91 | |||
| 92 | (doc-string ELT) | ||
| 93 | Set NAME's `doc-string-elt' property to ELT." | ||
| 94 | (if (stringp docstring) nil | 120 | (if (stringp docstring) nil |
| 95 | (if decl (setq body (cons decl body))) | 121 | (if decl (setq body (cons decl body))) |
| 96 | (setq decl docstring) | 122 | (setq decl docstring) |
| @@ -104,28 +130,67 @@ The elements can look like this: | |||
| 104 | (let* ((fun (list 'function (cons 'lambda (cons arglist body)))) | 130 | (let* ((fun (list 'function (cons 'lambda (cons arglist body)))) |
| 105 | (def (list 'defalias | 131 | (def (list 'defalias |
| 106 | (list 'quote name) | 132 | (list 'quote name) |
| 107 | (list 'cons ''macro fun)))) | 133 | (list 'cons ''macro fun))) |
| 108 | (if decl | 134 | (declarations |
| 109 | (list 'progn | 135 | (mapcar |
| 110 | (list 'funcall 'macro-declaration-function | 136 | #'(lambda (x) |
| 111 | (list 'quote name) | 137 | (let ((f (cdr (assq (car x) macro-declarations-alist)))) |
| 112 | (list 'quote decl)) | 138 | (if f (apply (car f) name (cdr x)) |
| 113 | def) | 139 | (message "Warning: Unknown macro property %S in %S" |
| 140 | (car x) name)))) | ||
| 141 | (cdr decl)))) | ||
| 142 | (if declarations | ||
| 143 | (cons 'prog1 (cons def declarations)) | ||
| 114 | def))))) | 144 | def))))) |
| 115 | 145 | ||
| 116 | ;; Now that we defined defmacro we can use it! | 146 | ;; Now that we defined defmacro we can use it! |
| 117 | (defmacro defun (name arglist &optional docstring &rest body) | 147 | (defmacro defun (name arglist &optional docstring &rest body) |
| 118 | "Define NAME as a function. | 148 | "Define NAME as a function. |
| 119 | The definition is (lambda ARGLIST [DOCSTRING] BODY...). | 149 | The definition is (lambda ARGLIST [DOCSTRING] BODY...). |
| 120 | See also the function `interactive'." | 150 | See also the function `interactive'. |
| 151 | DECL is a declaration, optional, of the form (declare DECLS...) where | ||
| 152 | DECLS is a list of elements of the form (PROP . VALUES). These are | ||
| 153 | interpreted according to `defun-declarations-alist'. | ||
| 154 | |||
| 155 | \(fn NAME ARGLIST &optional DOCSTRING DECL &rest BODY)" | ||
| 156 | ;; We can't just have `decl' as an &optional argument, because we need | ||
| 157 | ;; to distinguish | ||
| 158 | ;; (defun foo (arg) (toto) nil) | ||
| 159 | ;; from | ||
| 160 | ;; (defun foo (arg) (toto)). | ||
| 121 | (declare (doc-string 3)) | 161 | (declare (doc-string 3)) |
| 122 | (if docstring (setq body (cons docstring body)) | 162 | (let ((decls (cond |
| 123 | (if (null body) (setq body '(nil)))) | 163 | ((eq (car-safe docstring) 'declare) |
| 124 | (list 'defalias | 164 | (prog1 (cdr docstring) (setq docstring nil))) |
| 125 | (list 'quote name) | 165 | ((eq (car-safe (car body)) 'declare) |
| 126 | (list 'function | 166 | (prog1 (cdr (car body)) (setq body (cdr body))))))) |
| 127 | (cons 'lambda | 167 | (if docstring (setq body (cons docstring body)) |
| 128 | (cons arglist body))))) | 168 | (if (null body) (setq body '(nil)))) |
| 169 | (let ((declarations | ||
| 170 | (mapcar | ||
| 171 | #'(lambda (x) | ||
| 172 | (let ((f (cdr (assq (car x) defun-declarations-alist)))) | ||
| 173 | (cond | ||
| 174 | (f (apply (car f) name (cdr x))) | ||
| 175 | ;; Yuck!! | ||
| 176 | ((and (featurep 'cl) | ||
| 177 | (memq (car x) ;C.f. cl-do-proclaim. | ||
| 178 | '(special inline notinline optimize warn))) | ||
| 179 | (if (null (stringp docstring)) | ||
| 180 | (push (list 'declare x) body) | ||
| 181 | (setcdr body (cons (list 'declare x) (cdr body)))) | ||
| 182 | nil) | ||
| 183 | (t (message "Warning: Unknown defun property %S in %S" | ||
| 184 | (car x) name))))) | ||
| 185 | decls)) | ||
| 186 | (def (list 'defalias | ||
| 187 | (list 'quote name) | ||
| 188 | (list 'function | ||
| 189 | (cons 'lambda | ||
| 190 | (cons arglist body)))))) | ||
| 191 | (if declarations | ||
| 192 | (cons 'prog1 (cons def declarations)) | ||
| 193 | def)))) | ||
| 129 | 194 | ||
| 130 | ;; Redefined in byte-optimize.el. | 195 | ;; Redefined in byte-optimize.el. |
| 131 | ;; This is not documented--it's not clear that we should promote it. | 196 | ;; This is not documented--it's not clear that we should promote it. |
| @@ -158,7 +223,6 @@ See also the function `interactive'." | |||
| 158 | ;; (list 'put x ''byte-optimizer nil))) | 223 | ;; (list 'put x ''byte-optimizer nil))) |
| 159 | ;; fns))) | 224 | ;; fns))) |
| 160 | 225 | ||
| 161 | ;; This has a special byte-hunk-handler in bytecomp.el. | ||
| 162 | (defmacro defsubst (name arglist &rest body) | 226 | (defmacro defsubst (name arglist &rest body) |
| 163 | "Define an inline function. The syntax is just like that of `defun'." | 227 | "Define an inline function. The syntax is just like that of `defun'." |
| 164 | (declare (debug defun) (doc-string 3)) | 228 | (declare (debug defun) (doc-string 3)) |
| @@ -172,7 +236,7 @@ See also the function `interactive'." | |||
| 172 | 236 | ||
| 173 | (defvar advertised-signature-table (make-hash-table :test 'eq :weakness 'key)) | 237 | (defvar advertised-signature-table (make-hash-table :test 'eq :weakness 'key)) |
| 174 | 238 | ||
| 175 | (defun set-advertised-calling-convention (function signature when) | 239 | (defun set-advertised-calling-convention (function signature _when) |
| 176 | "Set the advertised SIGNATURE of FUNCTION. | 240 | "Set the advertised SIGNATURE of FUNCTION. |
| 177 | This will allow the byte-compiler to warn the programmer when she uses | 241 | This will allow the byte-compiler to warn the programmer when she uses |
| 178 | an obsolete calling convention. WHEN specifies since when the calling | 242 | an obsolete calling convention. WHEN specifies since when the calling |
| @@ -187,15 +251,15 @@ If CURRENT-NAME is a string, that is the `use instead' message | |||
| 187 | \(it should end with a period, and not start with a capital). | 251 | \(it should end with a period, and not start with a capital). |
| 188 | WHEN should be a string indicating when the function | 252 | WHEN should be a string indicating when the function |
| 189 | was first made obsolete, for example a date or a release number." | 253 | was first made obsolete, for example a date or a release number." |
| 254 | (declare (advertised-calling-convention | ||
| 255 | ;; New code should always provide the `when' argument. | ||
| 256 | (obsolete-name current-name when) "23.1")) | ||
| 190 | (interactive "aMake function obsolete: \nxObsoletion replacement: ") | 257 | (interactive "aMake function obsolete: \nxObsoletion replacement: ") |
| 191 | (put obsolete-name 'byte-obsolete-info | 258 | (put obsolete-name 'byte-obsolete-info |
| 192 | ;; The second entry used to hold the `byte-compile' handler, but | 259 | ;; The second entry used to hold the `byte-compile' handler, but |
| 193 | ;; is not used any more nowadays. | 260 | ;; is not used any more nowadays. |
| 194 | (purecopy (list current-name nil when))) | 261 | (purecopy (list current-name nil when))) |
| 195 | obsolete-name) | 262 | obsolete-name) |
| 196 | (set-advertised-calling-convention | ||
| 197 | ;; New code should always provide the `when' argument. | ||
| 198 | 'make-obsolete '(obsolete-name current-name when) "23.1") | ||
| 199 | 263 | ||
| 200 | (defmacro define-obsolete-function-alias (obsolete-name current-name | 264 | (defmacro define-obsolete-function-alias (obsolete-name current-name |
| 201 | &optional when docstring) | 265 | &optional when docstring) |
| @@ -209,14 +273,13 @@ is equivalent to the following two lines of code: | |||
| 209 | \(make-obsolete 'old-fun 'new-fun \"22.1\") | 273 | \(make-obsolete 'old-fun 'new-fun \"22.1\") |
| 210 | 274 | ||
| 211 | See the docstrings of `defalias' and `make-obsolete' for more details." | 275 | See the docstrings of `defalias' and `make-obsolete' for more details." |
| 212 | (declare (doc-string 4)) | 276 | (declare (doc-string 4) |
| 277 | (advertised-calling-convention | ||
| 278 | ;; New code should always provide the `when' argument. | ||
| 279 | (obsolete-name current-name when &optional docstring) "23.1")) | ||
| 213 | `(progn | 280 | `(progn |
| 214 | (defalias ,obsolete-name ,current-name ,docstring) | 281 | (defalias ,obsolete-name ,current-name ,docstring) |
| 215 | (make-obsolete ,obsolete-name ,current-name ,when))) | 282 | (make-obsolete ,obsolete-name ,current-name ,when))) |
| 216 | (set-advertised-calling-convention | ||
| 217 | ;; New code should always provide the `when' argument. | ||
| 218 | 'define-obsolete-function-alias | ||
| 219 | '(obsolete-name current-name when &optional docstring) "23.1") | ||
| 220 | 283 | ||
| 221 | (defun make-obsolete-variable (obsolete-name current-name &optional when access-type) | 284 | (defun make-obsolete-variable (obsolete-name current-name &optional when access-type) |
| 222 | "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. | 285 | "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. |
| @@ -226,13 +289,13 @@ WHEN should be a string indicating when the variable | |||
| 226 | was first made obsolete, for example a date or a release number. | 289 | was first made obsolete, for example a date or a release number. |
| 227 | ACCESS-TYPE if non-nil should specify the kind of access that will trigger | 290 | ACCESS-TYPE if non-nil should specify the kind of access that will trigger |
| 228 | obsolescence warnings; it can be either `get' or `set'." | 291 | obsolescence warnings; it can be either `get' or `set'." |
| 292 | (declare (advertised-calling-convention | ||
| 293 | ;; New code should always provide the `when' argument. | ||
| 294 | (obsolete-name current-name when &optional access-type) "23.1")) | ||
| 229 | (put obsolete-name 'byte-obsolete-variable | 295 | (put obsolete-name 'byte-obsolete-variable |
| 230 | (purecopy (list current-name access-type when))) | 296 | (purecopy (list current-name access-type when))) |
| 231 | obsolete-name) | 297 | obsolete-name) |
| 232 | (set-advertised-calling-convention | 298 | |
| 233 | ;; New code should always provide the `when' argument. | ||
| 234 | 'make-obsolete-variable | ||
| 235 | '(obsolete-name current-name when &optional access-type) "23.1") | ||
| 236 | 299 | ||
| 237 | (defmacro define-obsolete-variable-alias (obsolete-name current-name | 300 | (defmacro define-obsolete-variable-alias (obsolete-name current-name |
| 238 | &optional when docstring) | 301 | &optional when docstring) |
| @@ -255,7 +318,10 @@ For the benefit of `custom-set-variables', if OBSOLETE-NAME has | |||
| 255 | any of the following properties, they are copied to | 318 | any of the following properties, they are copied to |
| 256 | CURRENT-NAME, if it does not already have them: | 319 | CURRENT-NAME, if it does not already have them: |
| 257 | 'saved-value, 'saved-variable-comment." | 320 | 'saved-value, 'saved-variable-comment." |
| 258 | (declare (doc-string 4)) | 321 | (declare (doc-string 4) |
| 322 | (advertised-calling-convention | ||
| 323 | ;; New code should always provide the `when' argument. | ||
| 324 | (obsolete-name current-name when &optional docstring) "23.1")) | ||
| 259 | `(progn | 325 | `(progn |
| 260 | (defvaralias ,obsolete-name ,current-name ,docstring) | 326 | (defvaralias ,obsolete-name ,current-name ,docstring) |
| 261 | ;; See Bug#4706. | 327 | ;; See Bug#4706. |
| @@ -264,10 +330,6 @@ CURRENT-NAME, if it does not already have them: | |||
| 264 | (null (get ,current-name prop)) | 330 | (null (get ,current-name prop)) |
| 265 | (put ,current-name prop (get ,obsolete-name prop)))) | 331 | (put ,current-name prop (get ,obsolete-name prop)))) |
| 266 | (make-obsolete-variable ,obsolete-name ,current-name ,when))) | 332 | (make-obsolete-variable ,obsolete-name ,current-name ,when))) |
| 267 | (set-advertised-calling-convention | ||
| 268 | ;; New code should always provide the `when' argument. | ||
| 269 | 'define-obsolete-variable-alias | ||
| 270 | '(obsolete-name current-name when &optional docstring) "23.1") | ||
| 271 | 333 | ||
| 272 | ;; FIXME This is only defined in this file because the variable- and | 334 | ;; FIXME This is only defined in this file because the variable- and |
| 273 | ;; function- versions are too. Unlike those two, this one is not used | 335 | ;; function- versions are too. Unlike those two, this one is not used |
| @@ -348,4 +410,9 @@ In interpreted code, this is entirely equivalent to `progn'." | |||
| 348 | ;; (file-format emacs19))" | 410 | ;; (file-format emacs19))" |
| 349 | ;; nil) | 411 | ;; nil) |
| 350 | 412 | ||
| 413 | (make-obsolete-variable 'macro-declaration-function | ||
| 414 | 'macro-declarations-alist "24.2") | ||
| 415 | (make-obsolete 'macro-declaration-function | ||
| 416 | 'macro-declarations-alist "24.2") | ||
| 417 | |||
| 351 | ;;; byte-run.el ends here | 418 | ;;; byte-run.el ends here |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index ce4d5d64ae2..bbf029700a3 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1937,7 +1937,7 @@ and will be removed soon. See (elisp)Backquote in the manual.")) | |||
| 1937 | (byte-compile-fix-header byte-compile-current-file)))) | 1937 | (byte-compile-fix-header byte-compile-current-file)))) |
| 1938 | byte-compile--outbuffer))) | 1938 | byte-compile--outbuffer))) |
| 1939 | 1939 | ||
| 1940 | (defun byte-compile-fix-header (filename) | 1940 | (defun byte-compile-fix-header (_filename) |
| 1941 | "If the current buffer has any multibyte characters, insert a version test." | 1941 | "If the current buffer has any multibyte characters, insert a version test." |
| 1942 | (when (< (point-max) (position-bytes (point-max))) | 1942 | (when (< (point-max) (position-bytes (point-max))) |
| 1943 | (goto-char (point-min)) | 1943 | (goto-char (point-min)) |
| @@ -1962,12 +1962,10 @@ and will be removed soon. See (elisp)Backquote in the manual.")) | |||
| 1962 | ;; don't try to check the version number. | 1962 | ;; don't try to check the version number. |
| 1963 | " (< (aref emacs-version (1- (length emacs-version))) ?A)\n" | 1963 | " (< (aref emacs-version (1- (length emacs-version))) ?A)\n" |
| 1964 | (format " (string-lessp emacs-version \"%s\")\n" minimum-version) | 1964 | (format " (string-lessp emacs-version \"%s\")\n" minimum-version) |
| 1965 | " (error \"`" | 1965 | ;; Because the header must fit in a fixed width, we cannot |
| 1966 | ;; prin1-to-string is used to quote backslashes. | 1966 | ;; insert arbitrary-length file names (Bug#11585). |
| 1967 | (substring (prin1-to-string (file-name-nondirectory filename)) | 1967 | " (error \"`%s' was compiled for " |
| 1968 | 1 -1) | 1968 | (format "Emacs %s or later\" load-file-name))\n\n" minimum-version)) |
| 1969 | (format "' was compiled for Emacs %s or later\"))\n\n" | ||
| 1970 | minimum-version)) | ||
| 1971 | ;; Now compensate for any change in size, to make sure all | 1969 | ;; Now compensate for any change in size, to make sure all |
| 1972 | ;; positions in the file remain valid. | 1970 | ;; positions in the file remain valid. |
| 1973 | (setq delta (- (point-max) old-header-end)) | 1971 | (setq delta (- (point-max) old-header-end)) |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a11f213e646..d522f07249a 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -229,6 +229,7 @@ For example, you could write | |||
| 229 | (variable nil) | 229 | (variable nil) |
| 230 | ((not globalp) | 230 | ((not globalp) |
| 231 | `(progn | 231 | `(progn |
| 232 | :autoload-end | ||
| 232 | (defvar ,mode ,init-value ,(format "Non-nil if %s is enabled. | 233 | (defvar ,mode ,init-value ,(format "Non-nil if %s is enabled. |
| 233 | Use the command `%s' to change this variable." pretty-name mode)) | 234 | Use the command `%s' to change this variable." pretty-name mode)) |
| 234 | (make-variable-buffer-local ',mode))) | 235 | (make-variable-buffer-local ',mode))) |
| @@ -366,8 +367,10 @@ call another major mode in their body." | |||
| 366 | "-mode\\'" "" (symbol-name mode)))))) | 367 | "-mode\\'" "" (symbol-name mode)))))) |
| 367 | 368 | ||
| 368 | `(progn | 369 | `(progn |
| 369 | (defvar ,MODE-major-mode nil) | 370 | (progn |
| 370 | (make-variable-buffer-local ',MODE-major-mode) | 371 | :autoload-end |
| 372 | (defvar ,MODE-major-mode nil) | ||
| 373 | (make-variable-buffer-local ',MODE-major-mode)) | ||
| 371 | ;; The actual global minor-mode | 374 | ;; The actual global minor-mode |
| 372 | (define-minor-mode ,global-mode | 375 | (define-minor-mode ,global-mode |
| 373 | ;; Very short lines to avoid too long lines in the generated | 376 | ;; Very short lines to avoid too long lines in the generated |
diff --git a/lisp/image.el b/lisp/image.el index 087cd148dd6..9da6085ee14 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -692,38 +692,59 @@ The minimum delay between successive frames is 0.01s." | |||
| 692 | This is the extension installed into `auto-mode-alist' and | 692 | This is the extension installed into `auto-mode-alist' and |
| 693 | `image-type-file-name-regexps' by `imagemagick-register-types'.") | 693 | `image-type-file-name-regexps' by `imagemagick-register-types'.") |
| 694 | 694 | ||
| 695 | (defvar imagemagick-types-inhibit) | ||
| 696 | (defvar imagemagick-types-enable) | ||
| 697 | |||
| 695 | ;;;###autoload | 698 | ;;;###autoload |
| 696 | (defun imagemagick-register-types () | 699 | (defun imagemagick-register-types () |
| 697 | "Register file types that can be handled by ImageMagick. | 700 | "Register file types that can be handled by ImageMagick. |
| 698 | This function is called at startup, after loading the init file. | 701 | This function is called at startup, after loading the init file. |
| 699 | It registers the ImageMagick types listed in `imagemagick-types', | 702 | It registers the ImageMagick types returned by `imagemagick-types', |
| 700 | excluding those listed in `imagemagick-types-inhibit'. | 703 | including only those from `imagemagick-types-enable', and excluding |
| 704 | those from `imagemagick-types-inhibit'. | ||
| 701 | 705 | ||
| 702 | Registered image types are added to `auto-mode-alist', so that | 706 | Registered image types are added to `auto-mode-alist', so that |
| 703 | Emacs visits them in Image mode. They are also added to | 707 | Emacs visits them in Image mode. They are also added to |
| 704 | `image-type-file-name-regexps', so that the `image-type' function | 708 | `image-type-file-name-regexps', so that the `image-type' function |
| 705 | recognizes these files as having image type `imagemagick'. | 709 | recognizes these files as having image type `imagemagick'. |
| 706 | 710 | ||
| 707 | If Emacs is compiled without ImageMagick support, do nothing." | 711 | If Emacs is compiled without ImageMagick support, this does nothing." |
| 708 | (when (fboundp 'imagemagick-types) | 712 | (when (fboundp 'imagemagick-types) |
| 709 | (let ((re (if (eq imagemagick-types-inhibit t) | 713 | (let* ((include |
| 710 | ;; Use a bogus regexp to inhibit matches. | 714 | (cond ((null imagemagick-types-enable) nil) |
| 711 | "\\'a" | 715 | ((eq imagemagick-types-inhibit t) nil) |
| 712 | (let ((types)) | 716 | ((eq imagemagick-types-enable t) (imagemagick-types)) |
| 713 | (dolist (type (imagemagick-types)) | 717 | (t |
| 714 | (unless (memq type imagemagick-types-inhibit) | 718 | (delq nil |
| 715 | (push (downcase (symbol-name type)) types))) | 719 | (mapcar |
| 716 | (concat "\\." (regexp-opt types) "\\'")))) | 720 | (lambda (type) |
| 717 | (ama-elt (car (member (cons imagemagick--file-regexp 'image-mode) | 721 | (catch 'found |
| 718 | auto-mode-alist))) | 722 | (dolist (enable imagemagick-types-enable nil) |
| 719 | (itfnr-elt (car (member (cons imagemagick--file-regexp 'imagemagick) | 723 | (if (cond ((symbolp enable) (eq enable type)) |
| 720 | image-type-file-name-regexps)))) | 724 | ((stringp enable) |
| 721 | (if ama-elt | 725 | (string-match enable |
| 722 | (setcar ama-elt re) | 726 | (symbol-name type)))) |
| 723 | (push (cons re 'image-mode) auto-mode-alist)) | 727 | (throw 'found type))))) |
| 724 | (if itfnr-elt | 728 | (imagemagick-types)))))) |
| 725 | (setcar itfnr-elt re) | 729 | (re (let (types) |
| 726 | (push (cons re 'imagemagick) image-type-file-name-regexps)) | 730 | (dolist (type include) |
| 731 | (unless (memq type imagemagick-types-inhibit) | ||
| 732 | (push (downcase (symbol-name type)) types))) | ||
| 733 | (if types (concat "\\." (regexp-opt types) "\\'")))) | ||
| 734 | (ama-elt (car (member (cons imagemagick--file-regexp 'image-mode) | ||
| 735 | auto-mode-alist))) | ||
| 736 | (itfnr-elt (car (member (cons imagemagick--file-regexp 'imagemagick) | ||
| 737 | image-type-file-name-regexps)))) | ||
| 738 | (if (not re) | ||
| 739 | (setq auto-mode-alist (delete ama-elt auto-mode-alist) | ||
| 740 | image-type-file-name-regexps | ||
| 741 | (delete itfnr-elt image-type-file-name-regexps)) | ||
| 742 | (if ama-elt | ||
| 743 | (setcar ama-elt re) | ||
| 744 | (push (cons re 'image-mode) auto-mode-alist)) | ||
| 745 | (if itfnr-elt | ||
| 746 | (setcar itfnr-elt re) | ||
| 747 | (push (cons re 'imagemagick) image-type-file-name-regexps))) | ||
| 727 | (setq imagemagick--file-regexp re)))) | 748 | (setq imagemagick--file-regexp re)))) |
| 728 | 749 | ||
| 729 | (defcustom imagemagick-types-inhibit | 750 | (defcustom imagemagick-types-inhibit |
| @@ -743,12 +764,45 @@ has no effect." | |||
| 743 | :type '(choice (const :tag "Support all ImageMagick types" nil) | 764 | :type '(choice (const :tag "Support all ImageMagick types" nil) |
| 744 | (const :tag "Disable all ImageMagick types" t) | 765 | (const :tag "Disable all ImageMagick types" t) |
| 745 | (repeat symbol)) | 766 | (repeat symbol)) |
| 767 | :initialize 'custom-initialize-default | ||
| 746 | :set (lambda (symbol value) | 768 | :set (lambda (symbol value) |
| 747 | (set-default symbol value) | 769 | (set-default symbol value) |
| 748 | (imagemagick-register-types)) | 770 | (imagemagick-register-types)) |
| 749 | :version "24.1" | 771 | :version "24.1" |
| 750 | :group 'image) | 772 | :group 'image) |
| 751 | 773 | ||
| 774 | (defcustom imagemagick-types-enable | ||
| 775 | '("\\`BMP" DJVU "\\`GIF" "\\`ICO" "P?JPE?G" "P[BNP]M" | ||
| 776 | "\\`[MP]NG" "\\`TIFF") | ||
| 777 | "List of ImageMagick types to treat as images. | ||
| 778 | The list elements are either strings or symbols, and represent | ||
| 779 | types returned by `imagemagick-types'. A string is a regexp that | ||
| 780 | selects all types matching the regexp. | ||
| 781 | |||
| 782 | The value may also be t, meaning all the types that ImageMagick | ||
| 783 | supports; or nil, meaning no types. | ||
| 784 | |||
| 785 | The variable `imagemagick-types-inhibit' overrides this variable. | ||
| 786 | |||
| 787 | If you change this without using customize, you must call | ||
| 788 | `imagemagick-register-types' afterwards. | ||
| 789 | |||
| 790 | If Emacs is compiled without ImageMagick support, this variable | ||
| 791 | has no effect." | ||
| 792 | :type '(choice (const :tag "Support all ImageMagick types" t) | ||
| 793 | (const :tag "Disable all ImageMagick types" nil) | ||
| 794 | (repeat :tag "List of types" | ||
| 795 | (choice (symbol :tag "type") | ||
| 796 | (regexp :tag "regexp")))) | ||
| 797 | :initialize 'custom-initialize-default | ||
| 798 | :set (lambda (symbol value) | ||
| 799 | (set-default symbol value) | ||
| 800 | (imagemagick-register-types)) | ||
| 801 | :version "24.2" | ||
| 802 | :group 'image) | ||
| 803 | |||
| 804 | (imagemagick-register-types) | ||
| 805 | |||
| 752 | (provide 'image) | 806 | (provide 'image) |
| 753 | 807 | ||
| 754 | ;;; image.el ends here | 808 | ;;; image.el ends here |
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 5451fa38001..558b9960213 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Remove obsolete '#define static' cruft. | ||
| 4 | * xlwmenu.c [emacs]: Include "bitmaps/gray.xbm". | ||
| 5 | (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]: | ||
| 6 | Remove; all uses replaced with definiens. | ||
| 7 | |||
| 1 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | configure: new option --enable-gcc-warnings (Bug#11207) | 10 | configure: new option --enable-gcc-warnings (Bug#11207) |
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 0a328f09f1e..4406c505392 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c | |||
| @@ -49,22 +49,12 @@ Boston, MA 02110-1301, USA. */ | |||
| 49 | 49 | ||
| 50 | #ifdef emacs | 50 | #ifdef emacs |
| 51 | 51 | ||
| 52 | /* Defined in xfns.c. When config.h defines `static' as empty, we get | ||
| 53 | redefinition errors when gray_bitmap is included more than once, so | ||
| 54 | we're referring to the one include in xfns.c here. */ | ||
| 55 | |||
| 56 | extern int gray_bitmap_width; | ||
| 57 | extern int gray_bitmap_height; | ||
| 58 | extern char *gray_bitmap_bits; | ||
| 59 | |||
| 60 | #include <xterm.h> | 52 | #include <xterm.h> |
| 53 | #include "bitmaps/gray.xbm" | ||
| 61 | 54 | ||
| 62 | #else /* not emacs */ | 55 | #else /* not emacs */ |
| 63 | 56 | ||
| 64 | #include <X11/bitmaps/gray> | 57 | #include <X11/bitmaps/gray> |
| 65 | #define gray_bitmap_width gray_width | ||
| 66 | #define gray_bitmap_height gray_height | ||
| 67 | #define gray_bitmap_bits gray_bits | ||
| 68 | 58 | ||
| 69 | #endif /* not emacs */ | 59 | #endif /* not emacs */ |
| 70 | 60 | ||
| @@ -1918,8 +1908,8 @@ XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args) | |||
| 1918 | mw->menu.cursor = mw->menu.cursor_shape; | 1908 | mw->menu.cursor = mw->menu.cursor_shape; |
| 1919 | 1909 | ||
| 1920 | mw->menu.gray_pixmap | 1910 | mw->menu.gray_pixmap |
| 1921 | = XCreatePixmapFromBitmapData (display, window, gray_bitmap_bits, | 1911 | = XCreatePixmapFromBitmapData (display, window, gray_bits, |
| 1922 | gray_bitmap_width, gray_bitmap_height, | 1912 | gray_width, gray_height, |
| 1923 | (unsigned long)1, (unsigned long)0, 1); | 1913 | (unsigned long)1, (unsigned long)0, 1); |
| 1924 | 1914 | ||
| 1925 | #ifdef HAVE_XFT | 1915 | #ifdef HAVE_XFT |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 781d5d71559..0687e8be605 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * configure.bat (genmakefiles): Move the redirection away from the | ||
| 4 | end of the command, to avoid excess whitespace at the end of Make | ||
| 5 | variables created at configure time, and also avoid things like | ||
| 6 | "FOO1>>config.settings", where "1" gets interpreted as the file | ||
| 7 | descriptor and eaten up. This fixes breakage introduced by the | ||
| 8 | last change, without reintroducing the bug fixed by that change. | ||
| 9 | |||
| 10 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * nmake.defs (MWINDOWS): Define as | ||
| 13 | "-subsystem:windows -entry:mainCRTStartup". Suggested by Fabrice | ||
| 14 | Popineau <fabrice.popineau@supelec.fr>. (Bug#11405) | ||
| 15 | |||
| 16 | * gmake.defs (MWINDOWS): Define as "-mwindows". | ||
| 17 | |||
| 1 | 2012-05-28 Eli Zaretskii <eliz@gnu.org> | 18 | 2012-05-28 Eli Zaretskii <eliz@gnu.org> |
| 2 | 19 | ||
| 3 | * config.nt (HAVE_SYSINFO): Remove; unused. | 20 | * config.nt (HAVE_SYSINFO): Remove; unused. |
diff --git a/nt/configure.bat b/nt/configure.bat index a60df56fc94..cecf52ee927 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -753,29 +753,36 @@ if %COMPILER% == gcc set MAKECMD=gmake | |||
| 753 | if %COMPILER% == cl set MAKECMD=nmake | 753 | if %COMPILER% == cl set MAKECMD=nmake |
| 754 | 754 | ||
| 755 | rem Pass on chosen settings to makefiles. | 755 | rem Pass on chosen settings to makefiles. |
| 756 | rem NB. Be very careful to not have a space before redirection symbols | ||
| 757 | rem except when there is a preceding digit, when a space is required. | ||
| 758 | rem | 756 | rem |
| 757 | rem The weird place we put the redirection is to make sure no extra | ||
| 758 | rem whitespace winds up at the end of the Make variables, since some | ||
| 759 | rem variables, e.g. INSTALL_DIR, cannot stand that. Yes, echo will | ||
| 760 | rem write the blanks between the end of command arguments and the | ||
| 761 | rem redirection symbol to the file. OTOH, we cannot put the | ||
| 762 | rem redirection immediately after the last character of the command, | ||
| 763 | rem because environment variable expansion can yield a digit there, | ||
| 764 | rem which will then be misinterpreted as the file descriptor to | ||
| 765 | rem redirect... | ||
| 759 | echo # Start of settings from configure.bat >config.settings | 766 | echo # Start of settings from configure.bat >config.settings |
| 760 | echo COMPILER=%COMPILER% >>config.settings | 767 | >>config.settings echo COMPILER=%COMPILER% |
| 761 | if not "(%mf%)" == "()" echo MCPU_FLAG=%mf% >>config.settings | 768 | if not "(%mf%)" == "()" >>config.settings echo MCPU_FLAG=%mf% |
| 762 | if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo% >>config.settings | 769 | if not "(%dbginfo%)" == "()" >>config.settings echo DEBUG_INFO=%dbginfo% |
| 763 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings | 770 | if (%nodebug%) == (Y) >>config.settings echo NODEBUG=1 |
| 764 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings | 771 | if (%noopt%) == (Y) >>config.settings echo NOOPT=1 |
| 765 | if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings | 772 | if (%enablechecking%) == (Y) >>config.settings echo ENABLECHECKS=1 |
| 766 | if (%profile%) == (Y) echo PROFILE=1 >>config.settings | 773 | if (%profile%) == (Y) >>config.settings echo PROFILE=1 |
| 767 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings | 774 | if (%nocygwin%) == (Y) >>config.settings echo NOCYGWIN=1 |
| 768 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix% >>config.settings | 775 | if not "(%prefix%)" == "()" >>config.settings echo INSTALL_DIR=%prefix% |
| 769 | if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles% >>config.settings | 776 | if not "(%distfiles%)" == "()" >>config.settings echo DIST_FILES=%distfiles% |
| 770 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something | 777 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something |
| 771 | rem and the if command cannot cope with this | 778 | rem and the if command cannot cope with this |
| 772 | for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y | 779 | for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y |
| 773 | if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags% >>config.settings | 780 | if (%docflags%)==(Y) >>config.settings echo USER_CFLAGS=%usercflags% |
| 774 | if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags% >>config.settings | 781 | if (%docflags%)==(Y) >>config.settings echo ESC_USER_CFLAGS=%escusercflags% |
| 775 | for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y | 782 | for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y |
| 776 | if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags% >>config.settings | 783 | if (%doldflags%)==(Y) >>config.settings echo USER_LDFLAGS=%userldflags% |
| 777 | for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y | 784 | for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y |
| 778 | if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs% >>config.settings | 785 | if (%doextralibs%)==(Y) >>config.settings echo USER_LIBS=%extrauserlibs% |
| 779 | echo # End of settings from configure.bat>>config.settings | 786 | echo # End of settings from configure.bat>>config.settings |
| 780 | echo. >>config.settings | 787 | echo. >>config.settings |
| 781 | 788 | ||
diff --git a/nt/gmake.defs b/nt/gmake.defs index a669ffd27be..dd96b776363 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs | |||
| @@ -210,6 +210,8 @@ else | |||
| 210 | CHECKING_CFLAGS = | 210 | CHECKING_CFLAGS = |
| 211 | endif | 211 | endif |
| 212 | 212 | ||
| 213 | MWINDOWS = -mwindows | ||
| 214 | |||
| 213 | CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) | 215 | CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) |
| 214 | ESC_CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS) | 216 | ESC_CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS) |
| 215 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 | 217 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 |
diff --git a/nt/nmake.defs b/nt/nmake.defs index 11079b4fb7d..b01e341f2d3 100644 --- a/nt/nmake.defs +++ b/nt/nmake.defs | |||
| @@ -151,6 +151,8 @@ CHECKING_CFLAGS = -DENABLE_CHECKING -DXASSERTS | |||
| 151 | CHECKING_CFLAGS = | 151 | CHECKING_CFLAGS = |
| 152 | !endif | 152 | !endif |
| 153 | 153 | ||
| 154 | MWINDOWS = -subsystem:windows -entry:mainCRTStartup | ||
| 155 | |||
| 154 | CFLAGS = -I. $(ARCH_CFLAGS) \ | 156 | CFLAGS = -I. $(ARCH_CFLAGS) \ |
| 155 | $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) | 157 | $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) |
| 156 | ESC_CFLAGS = -I. $(ARCH_CFLAGS) \ | 158 | ESC_CFLAGS = -I. $(ARCH_CFLAGS) \ |
diff --git a/src/ChangeLog b/src/ChangeLog index 767dfa47036..6d71346dd78 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,53 @@ | |||
| 1 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Pacify gcc -Wdouble-precision when using Xaw. | ||
| 4 | * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb) | ||
| 5 | [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]: | ||
| 6 | Use 'float' consistently, rather than 'float' in most places | ||
| 7 | and 'double' in a couple of places. | ||
| 8 | |||
| 9 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 10 | |||
| 11 | * xdisp.c (handle_stop): Detect whether we have overlay strings | ||
| 12 | loaded by testing it->current.overlay_string_index to be | ||
| 13 | non-negative, instead of checking whether n_overlay_strings is | ||
| 14 | positive. (Bug#11587) | ||
| 15 | |||
| 16 | 2012-05-31 Chong Yidong <cyd@gnu.org> | ||
| 17 | |||
| 18 | * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169). | ||
| 19 | |||
| 20 | * doc.c (Fsubstitute_command_keys): Doc fix. | ||
| 21 | |||
| 22 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 23 | |||
| 24 | * search.c (search_buffer): Remove calls to | ||
| 25 | r_alloc_inhibit_buffer_relocation, as it is now called by | ||
| 26 | maybe_unify_char, which was the cause of relocation of buffer text | ||
| 27 | in bug#11519. | ||
| 28 | |||
| 29 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 30 | |||
| 31 | * charset.c (maybe_unify_char): Inhibit relocation of buffer text | ||
| 32 | for the duration of call to load_charset, to avoid problems with | ||
| 33 | callers of maybe_unify_char that access buffer text through C | ||
| 34 | pointers. | ||
| 35 | |||
| 36 | * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and | ||
| 37 | decrement the inhibition flag, instead of just setting or | ||
| 38 | resetting it. | ||
| 39 | |||
| 40 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | ||
| 41 | |||
| 42 | Remove obsolete '#define static' cruft. | ||
| 43 | * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef. | ||
| 44 | This #undef was "temporary" in 2000; it is no longer needed | ||
| 45 | now that '#define static' has gone away. | ||
| 46 | * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height) | ||
| 47 | (gray_bitmap_bits): Remove; no longer needed. | ||
| 48 | All uses replaced with definiens. | ||
| 49 | * xterm.c: Include "bitmaps/gray.xbm". | ||
| 50 | |||
| 1 | 2012-05-30 Paul Eggert <eggert@cs.ucla.edu> | 51 | 2012-05-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 52 | ||
| 3 | Clean up __executable_start, monstartup when --enable-profiling. | 53 | Clean up __executable_start, monstartup when --enable-profiling. |
| @@ -13,6 +63,10 @@ | |||
| 13 | and not pointers. | 63 | and not pointers. |
| 14 | * lisp.h (__executable_start): New decl. | 64 | * lisp.h (__executable_start): New decl. |
| 15 | 65 | ||
| 66 | 2012-05-31 Glenn Morris <rgm@gnu.org> | ||
| 67 | |||
| 68 | * image.c (Fimagemagick_types): Doc fix. | ||
| 69 | |||
| 16 | 2012-05-30 Jim Meyering <meyering@redhat.com> | 70 | 2012-05-30 Jim Meyering <meyering@redhat.com> |
| 17 | 71 | ||
| 18 | * callproc.c (Fcall_process_region): Include directory component | 72 | * callproc.c (Fcall_process_region): Include directory component |
diff --git a/src/charset.c b/src/charset.c index 6ecc8d2c4d1..8ce972ebf37 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1633,6 +1633,12 @@ maybe_unify_char (int c, Lisp_Object val) | |||
| 1633 | return c; | 1633 | return c; |
| 1634 | 1634 | ||
| 1635 | CHECK_CHARSET_GET_CHARSET (val, charset); | 1635 | CHECK_CHARSET_GET_CHARSET (val, charset); |
| 1636 | #ifdef REL_ALLOC | ||
| 1637 | /* The call to load_charset below can allocate memory, which screws | ||
| 1638 | callers of this function through STRING_CHAR_* macros that hold C | ||
| 1639 | pointers to buffer text, if REL_ALLOC is used. */ | ||
| 1640 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1641 | #endif | ||
| 1636 | load_charset (charset, 1); | 1642 | load_charset (charset, 1); |
| 1637 | if (! inhibit_load_charset_map) | 1643 | if (! inhibit_load_charset_map) |
| 1638 | { | 1644 | { |
| @@ -1648,6 +1654,9 @@ maybe_unify_char (int c, Lisp_Object val) | |||
| 1648 | if (unified > 0) | 1654 | if (unified > 0) |
| 1649 | c = unified; | 1655 | c = unified; |
| 1650 | } | 1656 | } |
| 1657 | #ifdef REL_ALLOC | ||
| 1658 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1659 | #endif | ||
| 1651 | return c; | 1660 | return c; |
| 1652 | } | 1661 | } |
| 1653 | 1662 | ||
| @@ -705,18 +705,23 @@ the same file name is found in the `doc-directory'. */) | |||
| 705 | DEFUN ("substitute-command-keys", Fsubstitute_command_keys, | 705 | DEFUN ("substitute-command-keys", Fsubstitute_command_keys, |
| 706 | Ssubstitute_command_keys, 1, 1, 0, | 706 | Ssubstitute_command_keys, 1, 1, 0, |
| 707 | doc: /* Substitute key descriptions for command names in STRING. | 707 | doc: /* Substitute key descriptions for command names in STRING. |
| 708 | Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke | 708 | Each substring of the form \\=\\[COMMAND] is replaced by either a |
| 709 | sequence that will invoke COMMAND, or "M-x COMMAND" if COMMAND is not | 709 | keystroke sequence that invokes COMMAND, or "M-x COMMAND" if COMMAND |
| 710 | on any keys. | 710 | is not on any keys. |
| 711 | Substrings of the form \\=\\{MAPVAR} are replaced by summaries | 711 | |
| 712 | \(made by `describe-bindings') of the value of MAPVAR, taken as a keymap. | 712 | Each substring of the form \\=\\{MAPVAR} is replaced by a summary of |
| 713 | Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR | 713 | the value of MAPVAR as a keymap. This summary is similar to the one |
| 714 | produced by `describe-bindings'. The summary ends in two newlines | ||
| 715 | \(used by the helper function `help-make-xrefs' to find the end of the | ||
| 716 | summary). | ||
| 717 | |||
| 718 | Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR | ||
| 714 | as the keymap for future \\=\\[COMMAND] substrings. | 719 | as the keymap for future \\=\\[COMMAND] substrings. |
| 715 | \\=\\= quotes the following character and is discarded; | 720 | \\=\\= quotes the following character and is discarded; |
| 716 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. | 721 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. |
| 717 | 722 | ||
| 718 | Returns original STRING if no substitutions were made. Otherwise, | 723 | Return the original STRING if no substitutions are made. |
| 719 | a new string, without any text properties, is returned. */) | 724 | Otherwise, return a new string, without any text properties. */) |
| 720 | (Lisp_Object string) | 725 | (Lisp_Object string) |
| 721 | { | 726 | { |
| 722 | char *buf; | 727 | char *buf; |
diff --git a/src/image.c b/src/image.c index a3b64b74997..b6cdb6c8290 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Functions for image support on window system. | 1 | /* Functions for image support on window system. |
| 2 | Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. | 2 | |
| 3 | Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -7987,7 +7988,8 @@ their descriptions (http://www.imagemagick.org/script/formats.php). | |||
| 7987 | You can also try the shell command: `identify -list format'. | 7988 | You can also try the shell command: `identify -list format'. |
| 7988 | 7989 | ||
| 7989 | Note that ImageMagick recognizes many file-types that Emacs does not | 7990 | Note that ImageMagick recognizes many file-types that Emacs does not |
| 7990 | recognize as images, such as C. See `imagemagick-types-inhibit'. */) | 7991 | recognize as images, such as C. See `imagemagick-types-enable' |
| 7992 | and `imagemagick-types-inhibit'. */) | ||
| 7991 | (void) | 7993 | (void) |
| 7992 | { | 7994 | { |
| 7993 | Lisp_Object typelist = Qnil; | 7995 | Lisp_Object typelist = Qnil; |
diff --git a/src/keymap.c b/src/keymap.c index 2a03dda5a5e..2f5558c171f 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2996,9 +2996,9 @@ You type Translation\n\ | |||
| 2996 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, | 2996 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, |
| 2997 | don't omit it; instead, mention it but say it is shadowed. | 2997 | don't omit it; instead, mention it but say it is shadowed. |
| 2998 | 2998 | ||
| 2999 | Return whether something was inserted or not. */ | 2999 | Any inserted text ends in two newlines (used by `help-make-xrefs'). */ |
| 3000 | 3000 | ||
| 3001 | int | 3001 | void |
| 3002 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, | 3002 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, |
| 3003 | Lisp_Object prefix, const char *title, int nomenu, int transl, | 3003 | Lisp_Object prefix, const char *title, int nomenu, int transl, |
| 3004 | int always_title, int mention_shadow) | 3004 | int always_title, int mention_shadow) |
| @@ -3108,8 +3108,10 @@ key binding\n\ | |||
| 3108 | skip: ; | 3108 | skip: ; |
| 3109 | } | 3109 | } |
| 3110 | 3110 | ||
| 3111 | if (something) | ||
| 3112 | insert_string ("\n"); | ||
| 3113 | |||
| 3111 | UNGCPRO; | 3114 | UNGCPRO; |
| 3112 | return something; | ||
| 3113 | } | 3115 | } |
| 3114 | 3116 | ||
| 3115 | static int previous_description_column; | 3117 | static int previous_description_column; |
diff --git a/src/keymap.h b/src/keymap.h index 234ffce471d..d9334cda0f4 100644 --- a/src/keymap.h +++ b/src/keymap.h | |||
| @@ -47,7 +47,7 @@ EXFUN (Fcurrent_active_maps, 2); | |||
| 47 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); | 47 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); |
| 48 | extern Lisp_Object get_keymap (Lisp_Object, int, int); | 48 | extern Lisp_Object get_keymap (Lisp_Object, int, int); |
| 49 | EXFUN (Fset_keymap_parent, 2); | 49 | EXFUN (Fset_keymap_parent, 2); |
| 50 | extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, | 50 | extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, |
| 51 | const char *, int, int, int, int); | 51 | const char *, int, int, int, int); |
| 52 | extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **); | 52 | extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **); |
| 53 | extern void initial_define_key (Lisp_Object, int, const char *); | 53 | extern void initial_define_key (Lisp_Object, int, const char *); |
diff --git a/src/ralloc.c b/src/ralloc.c index 7fdef69842a..19d15664eec 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -1142,7 +1142,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) | |||
| 1142 | void | 1142 | void |
| 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) | 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) |
| 1144 | { | 1144 | { |
| 1145 | use_relocatable_buffers = !inhibit; | 1145 | if (use_relocatable_buffers < 0) |
| 1146 | use_relocatable_buffers = 0; | ||
| 1147 | if (inhibit) | ||
| 1148 | use_relocatable_buffers++; | ||
| 1149 | else if (use_relocatable_buffers > 0) | ||
| 1150 | use_relocatable_buffers--; | ||
| 1146 | } | 1151 | } |
| 1147 | 1152 | ||
| 1148 | 1153 | ||
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 3e25b1bd0d9..f1ae50c533a 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h | |||
| @@ -95,12 +95,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 95 | #define HAVE_XRMSETDATABASE | 95 | #define HAVE_XRMSETDATABASE |
| 96 | #endif | 96 | #endif |
| 97 | 97 | ||
| 98 | /* 2000-11-21: Temporarily disable Unix 98 large file support found by | ||
| 99 | configure. It fails on HPUX 11, at least, because it enables | ||
| 100 | header sections which lose when `static' is defined away, as it is | ||
| 101 | on HP-UX. (You get duplicate symbol errors on linking). */ | ||
| 102 | #undef _FILE_OFFSET_BITS | ||
| 103 | |||
| 104 | /* Conservative garbage collection has not been tested, so for now | 98 | /* Conservative garbage collection has not been tested, so for now |
| 105 | play it safe and stick with the old-fashioned way of marking. */ | 99 | play it safe and stick with the old-fashioned way of marking. */ |
| 106 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | 100 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE |
diff --git a/src/search.c b/src/search.c index 5608e344e75..99519b839ef 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1160,24 +1160,12 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1160 | { | 1160 | { |
| 1161 | ptrdiff_t val; | 1161 | ptrdiff_t val; |
| 1162 | 1162 | ||
| 1163 | #ifdef REL_ALLOC | ||
| 1164 | /* re_search_2 below is passed C pointers to buffer text. | ||
| 1165 | If some code called by it causes memory (re)allocation, | ||
| 1166 | buffer text could be relocated on platforms that use | ||
| 1167 | REL_ALLOC, which invalidates those C pointers. So we | ||
| 1168 | inhibit relocation of buffer text for as long as | ||
| 1169 | re_search_2 runs. */ | ||
| 1170 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1171 | #endif | ||
| 1172 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1163 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1173 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1164 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1174 | (NILP (Vinhibit_changing_match_data) | 1165 | (NILP (Vinhibit_changing_match_data) |
| 1175 | ? &search_regs : &search_regs_1), | 1166 | ? &search_regs : &search_regs_1), |
| 1176 | /* Don't allow match past current point */ | 1167 | /* Don't allow match past current point */ |
| 1177 | pos_byte - BEGV_BYTE); | 1168 | pos_byte - BEGV_BYTE); |
| 1178 | #ifdef REL_ALLOC | ||
| 1179 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1180 | #endif | ||
| 1181 | if (val == -2) | 1169 | if (val == -2) |
| 1182 | { | 1170 | { |
| 1183 | matcher_overflow (); | 1171 | matcher_overflow (); |
| @@ -1217,19 +1205,11 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1217 | { | 1205 | { |
| 1218 | ptrdiff_t val; | 1206 | ptrdiff_t val; |
| 1219 | 1207 | ||
| 1220 | #ifdef REL_ALLOC | ||
| 1221 | /* See commentary above for the reasons for inhibiting | ||
| 1222 | buffer text relocation here. */ | ||
| 1223 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1224 | #endif | ||
| 1225 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1208 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1226 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1209 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1227 | (NILP (Vinhibit_changing_match_data) | 1210 | (NILP (Vinhibit_changing_match_data) |
| 1228 | ? &search_regs : &search_regs_1), | 1211 | ? &search_regs : &search_regs_1), |
| 1229 | lim_byte - BEGV_BYTE); | 1212 | lim_byte - BEGV_BYTE); |
| 1230 | #ifdef REL_ALLOC | ||
| 1231 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1232 | #endif | ||
| 1233 | if (val == -2) | 1213 | if (val == -2) |
| 1234 | { | 1214 | { |
| 1235 | matcher_overflow (); | 1215 | matcher_overflow (); |
diff --git a/src/xdisp.c b/src/xdisp.c index 82dbe4beb3b..c8d2de7c9de 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3175,7 +3175,7 @@ handle_stop (struct it *it) | |||
| 3175 | onto the stack one more time, which is not | 3175 | onto the stack one more time, which is not |
| 3176 | expected by the rest of the code that processes | 3176 | expected by the rest of the code that processes |
| 3177 | overlay strings. */ | 3177 | overlay strings. */ |
| 3178 | || (it->n_overlay_strings <= 0 | 3178 | || (it->current.overlay_string_index < 0 |
| 3179 | ? !get_overlay_strings_1 (it, 0, 0) | 3179 | ? !get_overlay_strings_1 (it, 0, 0) |
| 3180 | : 0)) | 3180 | : 0)) |
| 3181 | { | 3181 | { |
diff --git a/src/xfns.c b/src/xfns.c index 767507805fb..1f1d3d3ef0c 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -126,14 +126,6 @@ extern LWLIB_ID widget_id_tick; | |||
| 126 | 126 | ||
| 127 | #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) | 127 | #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) |
| 128 | 128 | ||
| 129 | /* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses | ||
| 130 | it, and including `bitmaps/gray' more than once is a problem when | ||
| 131 | config.h defines `static' as an empty replacement string. */ | ||
| 132 | |||
| 133 | int gray_bitmap_width = gray_width; | ||
| 134 | int gray_bitmap_height = gray_height; | ||
| 135 | char *gray_bitmap_bits = gray_bits; | ||
| 136 | |||
| 137 | /* Nonzero if using X. */ | 129 | /* Nonzero if using X. */ |
| 138 | 130 | ||
| 139 | int x_in_use; | 131 | int x_in_use; |
diff --git a/src/xterm.c b/src/xterm.c index b05544a6fca..442b6b1b934 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -142,6 +142,8 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); | |||
| 142 | #endif | 142 | #endif |
| 143 | #endif | 143 | #endif |
| 144 | 144 | ||
| 145 | #include "bitmaps/gray.xbm" | ||
| 146 | |||
| 145 | /* Default to using XIM if available. */ | 147 | /* Default to using XIM if available. */ |
| 146 | #ifdef USE_XIM | 148 | #ifdef USE_XIM |
| 147 | int use_xim = 1; | 149 | int use_xim = 1; |
| @@ -4536,7 +4538,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4536 | whole = 10000000; | 4538 | whole = 10000000; |
| 4537 | portion = shown < 1 ? top * whole : 0; | 4539 | portion = shown < 1 ? top * whole : 0; |
| 4538 | 4540 | ||
| 4539 | if (shown < 1 && (eabs (top + shown - 1) < 1.0/height)) | 4541 | if (shown < 1 && (eabs (top + shown - 1) < 1.0f / height)) |
| 4540 | /* Some derivatives of Xaw refuse to shrink the thumb when you reach | 4542 | /* Some derivatives of Xaw refuse to shrink the thumb when you reach |
| 4541 | the bottom, so we force the scrolling whenever we see that we're | 4543 | the bottom, so we force the scrolling whenever we see that we're |
| 4542 | too close to the bottom (in x_set_toolkit_scroll_bar_thumb | 4544 | too close to the bottom (in x_set_toolkit_scroll_bar_thumb |
| @@ -4901,7 +4903,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 4901 | else | 4903 | else |
| 4902 | top = old_top; | 4904 | top = old_top; |
| 4903 | /* Keep two pixels available for moving the thumb down. */ | 4905 | /* Keep two pixels available for moving the thumb down. */ |
| 4904 | shown = max (0, min (1 - top - (2.0 / height), shown)); | 4906 | shown = max (0, min (1 - top - (2.0f / height), shown)); |
| 4905 | 4907 | ||
| 4906 | /* If the call to XawScrollbarSetThumb below doesn't seem to work, | 4908 | /* If the call to XawScrollbarSetThumb below doesn't seem to work, |
| 4907 | check that your system's configuration file contains a define | 4909 | check that your system's configuration file contains a define |
| @@ -10401,8 +10403,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10401 | { | 10403 | { |
| 10402 | dpyinfo->gray | 10404 | dpyinfo->gray |
| 10403 | = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window, | 10405 | = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window, |
| 10404 | gray_bitmap_bits, | 10406 | gray_bits, gray_width, gray_height, |
| 10405 | gray_bitmap_width, gray_bitmap_height, | ||
| 10406 | 1, 0, 1); | 10407 | 1, 0, 1); |
| 10407 | } | 10408 | } |
| 10408 | 10409 | ||
diff --git a/src/xterm.h b/src/xterm.h index 8919b648371..68e0372b05a 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -939,8 +939,6 @@ void x_handle_property_notify (XPropertyEvent *); | |||
| 939 | struct frame *check_x_frame (Lisp_Object); | 939 | struct frame *check_x_frame (Lisp_Object); |
| 940 | EXFUN (Fx_display_grayscale_p, 1); | 940 | EXFUN (Fx_display_grayscale_p, 1); |
| 941 | extern void x_free_gcs (struct frame *); | 941 | extern void x_free_gcs (struct frame *); |
| 942 | extern int gray_bitmap_width, gray_bitmap_height; | ||
| 943 | extern char *gray_bitmap_bits; | ||
| 944 | 942 | ||
| 945 | /* From xrdb.c. */ | 943 | /* From xrdb.c. */ |
| 946 | 944 | ||