Mercurial > emacs
changeset 109588:a9df84c12868
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 27 Jul 2010 22:51:00 +0000 |
parents | 4a3ef4f17f07 (current diff) d7a517f1b312 (diff) |
children | 9cdc0ac3ecda |
files | |
diffstat | 49 files changed, 355 insertions(+), 208 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/lispref/ChangeLog Mon Jul 26 22:54:37 2010 +0000 +++ b/doc/lispref/ChangeLog Tue Jul 27 22:51:00 2010 +0000 @@ -1,3 +1,10 @@ +2010-07-27 Juanma Barranquero <lekktu@gmail.com> + + * modes.texi (Defining Minor Modes): Use C-delete in examples, + instead of "\C-\^?" (bug#6334). + + * text.texi (Special Properties): Fix typo. + 2010-07-09 Eli Zaretskii <eliz@gnu.org> * internals.texi (Writing Emacs Primitives): Adapt to ANSI C
--- a/doc/lispref/modes.texi Mon Jul 26 22:54:37 2010 +0000 +++ b/doc/lispref/modes.texi Tue Jul 27 22:51:00 2010 +0000 @@ -1494,7 +1494,7 @@ ;; The indicator for the mode line. " Hungry" ;; The minor mode bindings. - '(("\C-\^?" . hungry-electric-delete)) + '(([C-delete] . hungry-electric-delete)) :group 'hunger) @end smallexample @@ -1526,8 +1526,8 @@ :lighter " Hungry" ;; The minor mode bindings. :keymap - '(("\C-\^?" . hungry-electric-delete) - ("\C-\M-\^?" + '(([C-delete] . hungry-electric-delete) + ([C-M-delete] . (lambda () (interactive) (hungry-electric-delete t))))
--- a/doc/lispref/text.texi Mon Jul 26 22:54:37 2010 +0000 +++ b/doc/lispref/text.texi Tue Jul 27 22:51:00 2010 +0000 @@ -3035,7 +3035,7 @@ property when Font Lock mode is enabled. When Font Lock mode is disabled, @code{font-lock-face} has no effect. -The @code{font-lock-mode} property is useful for special modes that +The @code{font-lock-face} property is useful for special modes that implement their own highlighting. @xref{Precalculated Fontification}. @item mouse-face
--- a/doc/misc/ChangeLog Mon Jul 26 22:54:37 2010 +0000 +++ b/doc/misc/ChangeLog Tue Jul 27 22:51:00 2010 +0000 @@ -1,3 +1,7 @@ +2010-07-27 Chong Yidong <cyd@stupidchicken.com> + + * nxml-mode.texi (Limitations): Remove obsolete discussion (Bug#6708). + 2010-07-19 Juanma Barranquero <lekktu@gmail.com> * org.texi: Fix typo in previous change (revno:100847).
--- a/doc/misc/nxml-mode.texi Mon Jul 26 22:54:37 2010 +0000 +++ b/doc/misc/nxml-mode.texi Tue Jul 27 22:51:00 2010 +0000 @@ -851,11 +851,6 @@ @item The restrictions on RELAX NG schemas in section 7 of the RELAX NG specification are not enforced. -@item -Unicode support has problems. This stems mostly from the fact that -the XML (and RELAX NG) character model is based squarely on Unicode, -whereas the Emacs character model is not. Emacs 22 is slated to have -full Unicode support, which should improve the situation here. @end itemize @bye
--- a/lisp/ChangeLog Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/ChangeLog Tue Jul 27 22:51:00 2010 +0000 @@ -1,3 +1,31 @@ +2010-07-27 Tom Tromey <tromey@redhat.com> + + * progmodes/js.el (js-mode): + * progmodes/make-mode.el (makefile-mode): + * progmodes/simula.el (simula-mode): + * progmodes/tcl.el (tcl-mode): Derive from prog-mode. + +2010-07-27 Juanma Barranquero <lekktu@gmail.com> + + * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494). + + * cedet/semantic/db-file.el (object-write): Fix typo in docstring. + + * time.el (display-time-day-and-date): Remove spurious * in docstring. + (display-time-world-buffer-name, display-time-world-mode-map): + Fix typos in docstrings. + +2010-07-27 Shyam Karanatt <shyam@swathanthran.in> (tiny change) + + * image-mode.el (image-display-size): New function. + (image-forward-hscroll, image-next-line, image-eol, image-eob) + (image-mode-fit-frame): Use it (Bug#6639). + +2010-07-27 Chong Yidong <cyd@stupidchicken.com> + + * dired.el (dired-buffers-for-dir): Handle list values of + dired-directory (Bug#6636). + 2010-07-26 Sam Steingold <sds@gnu.org> * mouse.el (mouse-yank-primary, mouse-yank-secondary):
--- a/lisp/cedet/semantic/db-file.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/cedet/semantic/db-file.el Tue Jul 27 22:51:00 2010 +0000 @@ -277,7 +277,7 @@ (defmethod object-write ((obj semanticdb-table)) "When writing a table, we have to make sure we deoverlay it first. -Restore the overlays after writting. +Restore the overlays after writing. Argument OBJ is the object to write." (when (semanticdb-live-p obj) (when (semanticdb-in-buffer-p obj)
--- a/lisp/dired.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/dired.el Tue Jul 27 22:51:00 2010 +0000 @@ -2225,31 +2225,33 @@ ;; Keeping Dired buffers in sync with the filesystem and with each other (defun dired-buffers-for-dir (dir &optional file) -;; Return a list of buffers that dired DIR (top level or in-situ subdir). +;; Return a list of buffers for DIR (top level or in-situ subdir). ;; If FILE is non-nil, include only those whose wildcard pattern (if any) ;; matches FILE. ;; The list is in reverse order of buffer creation, most recent last. ;; As a side effect, killed dired buffers for DIR are removed from ;; dired-buffers. (setq dir (file-name-as-directory dir)) - (let ((alist dired-buffers) result elt buf) - (while alist - (setq elt (car alist) - buf (cdr elt)) - (if (buffer-name buf) - (if (dired-in-this-tree dir (car elt)) - (with-current-buffer buf - (and (assoc dir dired-subdir-alist) - (or (null file) - (let ((wildcards - (file-name-nondirectory dired-directory))) - (or (= 0 (length wildcards)) - (string-match (dired-glob-regexp wildcards) - file)))) - (setq result (cons buf result))))) - ;; else buffer is killed - clean up: + (let (result buf) + (dolist (elt dired-buffers) + (setq buf (cdr elt)) + (cond + ((null (buffer-name buf)) + ;; Buffer is killed - clean up: (setq dired-buffers (delq elt dired-buffers))) - (setq alist (cdr alist))) + ((dired-in-this-tree dir (car elt)) + (with-current-buffer buf + (and (assoc dir dired-subdir-alist) + (or (null file) + (if (stringp dired-directory) + (let ((wildcards (file-name-nondirectory + dired-directory))) + (or (= 0 (length wildcards)) + (string-match (dired-glob-regexp wildcards) + file))) + (member (expand-file-name file dir) + (cdr dired-directory)))) + (setq result (cons buf result))))))) result)) (defun dired-glob-regexp (pattern)
--- a/lisp/help-fns.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/help-fns.el Tue Jul 27 22:51:00 2010 +0000 @@ -231,8 +231,8 @@ "Guess the file that defined the Lisp object OBJECT, of type TYPE. OBJECT should be a symbol associated with a function, variable, or face; alternatively, it can be a function definition. -If TYPE is `variable', search for a variable definition. -If TYPE is `face', search for a face definition. +If TYPE is `defvar', search for a variable definition. +If TYPE is `defface', search for a face definition. If TYPE is the value returned by `symbol-function' for a function symbol, search for a function definition.
--- a/lisp/image-mode.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/image-mode.el Tue Jul 27 22:51:00 2010 +0000 @@ -128,6 +128,28 @@ (declare-function image-size "image.c" (spec &optional pixels frame)) +(defun image-display-size (spec &optional pixels frame) + "Wrapper around `image-size', to handle slice display properties. +If SPEC is an image display property, call `image-size' with the +given arguments. +If SPEC is a list of properties containing `image' and `slice' +properties, calculate the display size from the slice property. +If SPEC contains `image' but not `slice', call `image-size' with +the specified image." + (if (eq (car spec) 'image) + (image-size spec pixels frame) + (let ((image (assoc 'image spec)) + (slice (assoc 'slice spec))) + (cond ((and image slice) + (if pixels + (cons (nth 3 slice) (nth 4 slice)) + (cons (/ (float (nth 3 slice)) (frame-char-width frame)) + (/ (float (nth 4 slice)) (frame-char-height frame))))) + (image + (image-size image pixels frame)) + (t + (error "Invalid image specification: %s" spec)))))) + (defun image-forward-hscroll (&optional n) "Scroll image in current window to the left by N character widths. Stop if the right edge of the image is reached." @@ -139,7 +161,7 @@ (let* ((image (image-get-display-property)) (edges (window-inside-edges)) (win-width (- (nth 2 edges) (nth 0 edges))) - (img-width (ceiling (car (image-size image))))) + (img-width (ceiling (car (image-display-size image))))) (image-set-window-hscroll (min (max 0 (- img-width win-width)) (+ n (window-hscroll)))))))) @@ -160,7 +182,7 @@ (let* ((image (image-get-display-property)) (edges (window-inside-edges)) (win-height (- (nth 3 edges) (nth 1 edges))) - (img-height (ceiling (cdr (image-size image))))) + (img-height (ceiling (cdr (image-display-size image))))) (image-set-window-vscroll (min (max 0 (- img-height win-height)) (+ n (window-vscroll)))))))) @@ -233,7 +255,7 @@ (let* ((image (image-get-display-property)) (edges (window-inside-edges)) (win-width (- (nth 2 edges) (nth 0 edges))) - (img-width (ceiling (car (image-size image))))) + (img-width (ceiling (car (image-display-size image))))) (image-set-window-hscroll (max 0 (- img-width win-width))))) (defun image-bob () @@ -248,9 +270,9 @@ (let* ((image (image-get-display-property)) (edges (window-inside-edges)) (win-width (- (nth 2 edges) (nth 0 edges))) - (img-width (ceiling (car (image-size image)))) + (img-width (ceiling (car (image-display-size image)))) (win-height (- (nth 3 edges) (nth 1 edges))) - (img-height (ceiling (cdr (image-size image))))) + (img-height (ceiling (cdr (image-display-size image))))) (image-set-window-hscroll (max 0 (- img-width win-width))) (image-set-window-vscroll (max 0 (- img-height win-height))))) @@ -264,7 +286,7 @@ (interactive) (let* ((saved (frame-parameter nil 'image-mode-saved-size)) (display (image-get-display-property)) - (size (image-size display))) + (size (image-display-size display))) (if (and saved (eq (caar saved) (frame-width)) (eq (cdar saved) (frame-height)))
--- a/lisp/progmodes/compile.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/progmodes/compile.el Tue Jul 27 22:51:00 2010 +0000 @@ -47,7 +47,7 @@ ;; using the same *compilation* buffer. this necessitates re-parsing markers. ;; FILE-STRUCTURE is a list of -;; ((FILENAME . DIRECTORY) FORMATS (LINE LOC ...) ...) +;; ((FILENAME DIRECTORY) FORMATS (LINE LOC ...) ...) ;; FILENAME is a string parsed from an error message. DIRECTORY is a string ;; obtained by following directory change messages. DIRECTORY will be nil for
--- a/lisp/progmodes/js.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/progmodes/js.el Tue Jul 27 22:51:00 2010 +0000 @@ -3268,7 +3268,7 @@ ;;; Main Function ;;;###autoload -(define-derived-mode js-mode nil "js" +(define-derived-mode js-mode prog-mode "js" "Major mode for editing JavaScript. Key bindings:
--- a/lisp/progmodes/make-mode.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/progmodes/make-mode.el Tue Jul 27 22:51:00 2010 +0000 @@ -768,7 +768,7 @@ ;;; ------------------------------------------------------------ ;;;###autoload -(define-derived-mode makefile-mode nil "Makefile" +(define-derived-mode makefile-mode prog-mode "Makefile" "Major mode for editing standard Makefiles. If you are editing a file for a different make, try one of the
--- a/lisp/progmodes/simula.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/progmodes/simula.el Tue Jul 27 22:51:00 2010 +0000 @@ -330,7 +330,7 @@ (popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu))) ;;;###autoload -(define-derived-mode simula-mode nil "Simula" +(define-derived-mode simula-mode prog-mode "Simula" "Major mode for editing SIMULA code. \\{simula-mode-map} Variables controlling indentation style:
--- a/lisp/progmodes/tcl.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/progmodes/tcl.el Tue Jul 27 22:51:00 2010 +0000 @@ -545,7 +545,7 @@ ;; ;;;###autoload -(define-derived-mode tcl-mode nil "Tcl" +(define-derived-mode tcl-mode prog-mode "Tcl" "Major mode for editing Tcl code. Expression and list commands understand all Tcl brackets. Tab indents for Tcl code.
--- a/lisp/time.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/time.el Tue Jul 27 22:51:00 2010 +0000 @@ -87,7 +87,7 @@ ;;;###autoload (defcustom display-time-day-and-date nil "\ -*Non-nil means \\[display-time] should display day and date as well as time." +Non-nil means \\[display-time] should display day and date as well as time." :type 'boolean :group 'display-time) @@ -182,7 +182,7 @@ :version "23.1") (defcustom display-time-world-buffer-name "*wclock*" - "Name of the wclock buffer." + "Name of the world clock buffer." :group 'display-time :type 'string :version "23.1") @@ -203,7 +203,7 @@ (let ((map (make-sparse-keymap))) (define-key map "q" 'kill-this-buffer) map) - "Keymap of Display Time World mode") + "Keymap of Display Time World mode.") ;;;###autoload (defun display-time ()
--- a/lisp/url/ChangeLog Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/url/ChangeLog Tue Jul 27 22:51:00 2010 +0000 @@ -1,3 +1,12 @@ +2010-07-27 Michael Albinus <michael.albinus@gmx.de> + + * url-http (url-http-parse-headers): Disable file name handlers at + all (not only Tramp). (Bug#6717) + +2010-07-27 Michael Albinus <michael.albinus@gmx.de> + + * url-http (url-http-parse-headers): Disable Tramp. (Bug#6717) + 2010-07-01 Mark A. Hershberger <mah@everybody.org> * url-http.el (url-http-create-request): Add a CRLF on the end so
--- a/lisp/url/url-http.el Mon Jul 26 22:54:37 2010 +0000 +++ b/lisp/url/url-http.el Tue Jul 27 22:51:00 2010 +0000 @@ -486,7 +486,11 @@ (class nil) (success nil) ;; other status symbols: jewelry and luxury cars - (status-symbol (cadr (assq url-http-response-status url-http-codes)))) + (status-symbol (cadr (assq url-http-response-status url-http-codes))) + ;; The filename part of a URL could be in remote file syntax, + ;; see Bug#6717 for an example. We disable file name + ;; handlers, therefore. + (file-name-handler-alist nil)) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) (url-http-handle-cookies)
--- a/src/ChangeLog Mon Jul 26 22:54:37 2010 +0000 +++ b/src/ChangeLog Tue Jul 27 22:51:00 2010 +0000 @@ -1,3 +1,106 @@ +2010-07-27 Dan Nicolaescu <dann@ics.uci.edu> + + * emacs.c (Fkill_emacs): Remove return statement. + + * term.c (Qspace, QCalign_to, QCwidth): Remove declarations. + (encode_terminal_code, produce_composite_glyph): Remove unused variables. + (set_tty_color_mode, term_mouse_highlight, term_get_fkeys): Remove + local extern declarations. + + * xmenu.c: Do not included lwlib.h, not needed. + + * m/iris4d.h (XUINT, XSET): Remove, not needed. + + * process.c: Move definitions earlier to minimize #ifdefs. + + * xterm.h (x_get_customization_string, x_load_resources) + (x_get_resource, x_text_icon, x_text_icon, x_check_errors) + (x_check_errors, x_property_data_to_lisp, defined_color) + (xic_set_xfontset, x_defined_color): Use const. + + * xterm.c (xlwmenu_window_p, xlwmenu_redisplay): Remove declarations. + (x_text_icon, x_check_errors, x_connection_closed): Use const. + + * xselect.c (selection_data_to_lisp_data) + (x_property_data_to_lisp): + * xrdb.c (x_get_string_resource, file_p) + (x_get_customization_string, magic_file_p, search_magic_path) + (get_system_app, get_user_app, x_load_resources, x_get_resource) + (x_get_string_resource): Use const. + + * xfns.c: Include xlwmenu.h when USE_LUCID. + (x_defined_color, xic_set_xfontset): Use const. + (Fx_hide_tip): Remove local extern declaration. + + * xfaces.c (Qmouse_face): Remove declaration. + (face_color_gray_p, tty_defined_color, defined_color) + (face_color_gray_p, face_color_supported_p). Add const. + + * xdisp.c (do_mouse_tracking): Remove declaration. + (add_to_log): Use const. + + * minibuf.c (Qmouse_face): Remove declaration. + + * msdos.c (IT_note_mouse_highlight): Remove local extern declaration. + + * keyboard.h (do_mouse_tracking): Add declaration. + + * image.c (QCwidth, QCheight, QCforeground, QCbackground, QCfile) + (QCdata, QCtype, Qcenter): Remove declarations. + + * frame.c (x_get_resource_string, x_get_string_resource) + (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg) + (x_default_parameter): Use const. + + * font.c (Qnormal, QCtype, QCfamily, QCweight, QCslant, QCwidth) + (QCheight, QCsize, QCname): Remove declarations. + + * emacs.c (main): Remove local extern declaration. + + * editfns.c (region_limit, syms_of_editfns): Remove local extern + declarations. + + * dispnew.c: Remove duplicate #include <unistd.h>. + (update_window, update_frame_1, init_display): Remove local extern + declarations. + + * dispextern.h (add_to_log): Remove declaration. + (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg) + (x_frame_get_and_record_arg, x_default_parameter): Add const. + + * dired.c (scmp): Add const. + (directory_files_internal): Remove local extern declaration. + + * data.c (Finteractive_form): Use const. + + * composite.c (syms_of_composite): Remove local extern declarations. + + * charset.c (add_to_log): Remove declaration. + + * character.c (strwidth, parse_str_to_multibyte): Add const. + + * character.h (strwidth, parse_str_to_multibyte): Likewise. + + * buffer.c (Fset_buffer_multibyte): Remove local extern declaration. + + * lisp.h (Fkill_emacs): Mark as NO_RETURN. + (Lisp_Subr): Make doc and intspec constant. + (QCsize, Qspace, Qcenter, QCalign_to, QCdata, QCfile, QCtype) + (Qlocal, Qapply, Qnormal, QCfamily, QCweight, QCslant, QCwidth) + (QCheight, QCsize, QCname, QCwidth, QCforeground) + (QCbackground, add_to_log, stack_base, Vmark_even_if_inactive) + (display_arg): Add declarations. + +2010-07-27 Christoph Scholtes <cschol2112@gmail.com> + + * minibuf.c (Fread_buffer): Doc fix (bug#6528). + + * window.c (Fwindow_height): Doc fix (bug#6518). + +2010-07-27 Juanma Barranquero <lekktu@gmail.com> + + * buffer.c (syms_of_buffer) <fringe-indicator-alist>: Doc fix. + 2010-07-26 Dan Nicolaescu <dann@ics.uci.edu> * keyboard.c (Ftop_level, Fexit_recursive_edit)
--- a/src/buffer.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/buffer.c Tue Jul 27 22:51:00 2010 +0000 @@ -2512,7 +2512,6 @@ if (!EQ (old_undo, Qt)) { /* Represent all the above changes by a special undo entry. */ - extern Lisp_Object Qapply; current_buffer->undo_list = Fcons (list3 (Qapply, intern ("set-buffer-multibyte"), NILP (flag) ? Qt : Qnil), @@ -5899,14 +5898,14 @@ INDICATOR specifies the logical indicator type which is one of the following symbols: `truncation' , `continuation', `overlay-arrow', -`top', `bottom', `up', `down', `one-line', `empty-line', or `unknown'. - -BITMAPS is list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies +`top', `bottom', `top-bottom', `up', `down', empty-line', or `unknown'. + +BITMAPS is a list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies the actual bitmap shown in the left or right fringe for the logical indicator. LEFT and RIGHT are the bitmaps shown in the left and/or right fringe for the specific indicator. The LEFT1 or RIGHT1 bitmaps -are used only for the `bottom' and `one-line' indicators when the last -\(only) line in has no final newline. BITMAPS may also be a single +are used only for the `bottom' and `top-bottom' indicators when the +last (only) line has no final newline. BITMAPS may also be a single symbol which is used in both left and right fringes. */); DEFVAR_PER_BUFFER ("fringe-cursor-alist",
--- a/src/character.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/character.c Tue Jul 27 22:51:00 2010 +0000 @@ -430,7 +430,7 @@ occupies on the screen. */ int -strwidth (unsigned char *str, int len) +strwidth (const unsigned char *str, int len) { return c_string_width (str, len, -1, NULL, NULL); } @@ -710,9 +710,9 @@ `str_to_multibyte'. */ int -parse_str_to_multibyte (unsigned char *str, int len) +parse_str_to_multibyte (const unsigned char *str, int len) { - unsigned char *endp = str + len; + const unsigned char *endp = str + len; int bytes; for (bytes = 0; str < endp; str++)
--- a/src/character.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/character.h Tue Jul 27 22:51:00 2010 +0000 @@ -605,13 +605,13 @@ extern int char_printable_p (int c); extern void parse_str_as_multibyte (const unsigned char *, int, int *, int *); -extern int parse_str_to_multibyte (unsigned char *, int); +extern int parse_str_to_multibyte (const unsigned char *, int); extern int str_as_multibyte (unsigned char *, int, int, int *); extern int str_to_multibyte (unsigned char *, int, int); extern int str_as_unibyte (unsigned char *, int); extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *, EMACS_INT, int); -extern int strwidth (unsigned char *, int); +extern int strwidth (const unsigned char *, int); extern int c_string_width (const unsigned char *, int, int, int *, int *); extern int lisp_string_width (Lisp_Object, int, int *, int *);
--- a/src/charset.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/charset.c Tue Jul 27 22:51:00 2010 +0000 @@ -491,8 +491,6 @@ Note that this function uses `openp' to open MAPFILE but ignores `file-name-handler-alist' to avoid running any Lisp code. */ -extern void add_to_log (char *, Lisp_Object, Lisp_Object); - static void load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag) {
--- a/src/composite.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/composite.c Tue Jul 27 22:51:00 2010 +0000 @@ -1939,7 +1939,6 @@ /* Make a hash table for static composition. */ { Lisp_Object args[6]; - extern Lisp_Object QCsize; args[0] = QCtest; args[1] = Qequal; @@ -1959,8 +1958,6 @@ /* Make a hash table for glyph-string. */ { Lisp_Object args[6]; - extern Lisp_Object QCsize; - args[0] = QCtest; args[1] = Qequal; args[2] = QCweakness;
--- a/src/data.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/data.c Tue Jul 27 22:51:00 2010 +0000 @@ -750,7 +750,7 @@ if (SUBRP (fun)) { - char *spec = XSUBR (fun)->intspec; + const char *spec = XSUBR (fun)->intspec; if (spec) return list2 (Qinteractive, (*spec != '(') ? build_string (spec) :
--- a/src/dired.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/dired.c Tue Jul 27 22:51:00 2010 +0000 @@ -115,7 +115,7 @@ Lisp_Object Qfile_attributes; Lisp_Object Qfile_attributes_lessp; -static int scmp (unsigned char *, unsigned char *, int); +static int scmp (const unsigned char *, const unsigned char *, int); #ifdef WINDOWSNT Lisp_Object @@ -206,7 +206,6 @@ #ifdef WINDOWSNT if (attrs) { - extern Lisp_Object Qlocal; extern int is_slow_fs (const char *); /* Do this only once to avoid doing it (in w32.c:stat) for each @@ -813,7 +812,7 @@ else number of chars that match at the beginning. */ static int -scmp (register unsigned char *s1, register unsigned char *s2, int len) +scmp (const unsigned char *s1, const unsigned char *s2, int len) { register int l = len;
--- a/src/dispextern.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/dispextern.h Tue Jul 27 22:51:00 2010 +0000 @@ -2951,7 +2951,6 @@ extern Lisp_Object Vshow_trailing_whitespace; extern int mode_line_in_non_selected_windows; extern int redisplaying_p; -extern void add_to_log (char *, Lisp_Object, Lisp_Object); extern int help_echo_showing_p; extern int current_mode_line_height, current_header_line_height; extern Lisp_Object help_echo_string, help_echo_window; @@ -3322,18 +3321,18 @@ }; extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object, - Lisp_Object, char *, char *class, + Lisp_Object, const char *, const char *class, enum resource_types); extern Lisp_Object x_frame_get_arg (struct frame *, Lisp_Object, - Lisp_Object, char *, char *, + Lisp_Object, const char *, const char *, enum resource_types); -extern Lisp_Object x_frame_get_and_record_arg ( - struct frame *, Lisp_Object, - Lisp_Object, char *, char *, +extern Lisp_Object x_frame_get_and_record_arg (struct frame *, Lisp_Object, + Lisp_Object, + const char *, const char *, enum resource_types); extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object, Lisp_Object, Lisp_Object, - char *, char *, + const char *, const char *, enum resource_types); #endif /* HAVE_WINDOW_SYSTEM */
--- a/src/dispnew.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/dispnew.c Tue Jul 27 22:51:00 2010 +0000 @@ -66,12 +66,6 @@ #include "systime.h" #include <errno.h> -/* To get the prototype for `sleep'. */ - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - /* Get number of chars of output now in the buffer of a stdio stream. This ought to be built in in stdio, but it isn't. Some s- files override this because their stdio internals differ. */ @@ -3664,8 +3658,6 @@ #if !PERIODIC_PREEMPTION_CHECKING int preempt_count = baud_rate / 2400 + 1; #endif - extern int input_pending; - extern Lisp_Object do_mouse_tracking; struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); #if GLYPH_DEBUG /* Check that W's frame doesn't have glyph matrices. */ @@ -4710,7 +4702,6 @@ int i; int pause; int preempt_count = baud_rate / 2400 + 1; - extern int input_pending; xassert (current_matrix && desired_matrix); @@ -6235,10 +6226,6 @@ { char *terminal_type; -#ifdef HAVE_X_WINDOWS - extern int display_arg; -#endif - /* Construct the space glyph. */ space_glyph.type = CHAR_GLYPH; SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
--- a/src/editfns.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/editfns.c Tue Jul 27 22:51:00 2010 +0000 @@ -320,7 +320,6 @@ static Lisp_Object region_limit (int beginningp) { - extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */ Lisp_Object m; if (!NILP (Vtransient_mark_mode) @@ -4554,7 +4553,6 @@ { Lisp_Object obuf; - extern Lisp_Object Vprin1_to_string_buffer; obuf = Fcurrent_buffer (); /* Do this here, because init_buffer_once is too early--it won't work. */ Fset_buffer (Vprin1_to_string_buffer);
--- a/src/emacs.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/emacs.c Tue Jul 27 22:51:00 2010 +0000 @@ -757,7 +757,6 @@ char *ch_to_dir; #if GC_MARK_STACK - extern Lisp_Object *stack_base; stack_base = &dummy; #endif @@ -2094,8 +2093,6 @@ unlink (SDATA (Vauto_save_list_file_name)); exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); - /* NOTREACHED */ - return Qnil; }
--- a/src/font.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/font.c Tue Jul 27 22:51:00 2010 +0000 @@ -127,12 +127,6 @@ { 200, { "ultra-expanded", "ultraexpanded", "wide" }} }; -extern Lisp_Object Qnormal; - -/* Symbols representing keys of normal font properties. */ -extern Lisp_Object QCtype, QCfamily, QCweight, QCslant, QCwidth; -extern Lisp_Object QCheight, QCsize, QCname; - Lisp_Object QCfoundry, QCadstyle, QCregistry; /* Symbols representing keys of font extra info. */ Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth;
--- a/src/frame.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/frame.c Tue Jul 27 22:51:00 2010 +0000 @@ -3721,7 +3721,7 @@ } -extern char *x_get_string_resource (XrmDatabase, char *, char *); +extern char *x_get_string_resource (XrmDatabase, const char *, const char *); extern Display_Info *check_x_display_info (Lisp_Object); @@ -3823,7 +3823,7 @@ /* Used when C code wants a resource value. */ /* Called from oldXMenu/Create.c. */ char * -x_get_resource_string (char *attribute, char *class) +x_get_resource_string (const char *attribute, const char *class) { char *name_key; char *class_key; @@ -3856,7 +3856,8 @@ and don't let it get stored in any Lisp-visible variables! */ Lisp_Object -x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) +x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, + const char *attribute, const char *class, enum resource_types type) { register Lisp_Object tem; @@ -3954,7 +3955,9 @@ } Lisp_Object -x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) +x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, + const char *attribute, const char *class, + enum resource_types type) { return x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param, attribute, class, type); @@ -3963,7 +3966,10 @@ /* Like x_frame_get_arg, but also record the value in f->param_alist. */ Lisp_Object -x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) +x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, + Lisp_Object param, + const char *attribute, const char *class, + enum resource_types type) { Lisp_Object value; @@ -3983,7 +3989,9 @@ If that is not found either, use the value DEFLT. */ Lisp_Object -x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, Lisp_Object deflt, char *xprop, char *xclass, enum resource_types type) +x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, + Lisp_Object deflt, const char *xprop, const char *xclass, + enum resource_types type) { Lisp_Object tem;
--- a/src/image.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/image.c Tue Jul 27 22:51:00 2010 +0000 @@ -578,9 +578,6 @@ /* Keywords. */ -extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; -extern Lisp_Object QCdata, QCtype; -extern Lisp_Object Qcenter; Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
--- a/src/keyboard.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/keyboard.h Tue Jul 27 22:51:00 2010 +0000 @@ -406,6 +406,8 @@ #define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) #define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) +extern Lisp_Object do_mouse_tracking; + /* Some of the event heads. */ extern Lisp_Object Qswitch_frame;
--- a/src/lisp.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/lisp.h Tue Jul 27 22:51:00 2010 +0000 @@ -976,8 +976,8 @@ } function; short min_args, max_args; const char *symbol_name; - char *intspec; - char *doc; + const char *intspec; + const char *doc; }; @@ -2454,7 +2454,7 @@ extern void sweep_weak_hash_tables (void); extern Lisp_Object Qstring_lessp; extern Lisp_Object Vfeatures; -extern Lisp_Object QCtest, QCweakness, Qequal, Qeq; +extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq; unsigned sxhash (Lisp_Object, int); Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, @@ -2632,9 +2632,12 @@ extern Lisp_Object Qinhibit_eval_during_redisplay; extern Lisp_Object Qmessage_truncate_lines; extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz; +extern Lisp_Object Qspace, Qcenter, QCalign_to; extern Lisp_Object Vmessage_log_max; +extern Lisp_Object QCdata, QCfile; extern int message_enable_multibyte; extern Lisp_Object echo_area_buffer[2]; +extern void add_to_log (const char *, Lisp_Object, Lisp_Object); extern void check_message_stack (void); extern void setup_echo_area_for_printing (int); extern int push_message (void); @@ -2689,6 +2692,7 @@ extern void mark_object (Lisp_Object); extern Lisp_Object Vpurify_flag; extern Lisp_Object Vmemory_full; +extern Lisp_Object *stack_base; EXFUN (Fcons, 2); EXFUN (list1, 1); EXFUN (list2, 2); @@ -3120,6 +3124,7 @@ extern Lisp_Object Qminus, Qplus, Vcurrent_prefix_arg; extern Lisp_Object Vcommand_history; +extern Lisp_Object Vmark_even_if_inactive; extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook; EXFUN (Fcall_interactively, 3); EXFUN (Fprefix_numeric_value, 1); @@ -3240,12 +3245,15 @@ extern void syms_of_frame (void); /* Defined in emacs.c */ +#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) +extern int display_arg; +#endif extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object Vinvocation_name, Vinvocation_directory; extern Lisp_Object Vbefore_init_time, Vafter_init_time; extern Lisp_Object Vinstallation_directory; extern Lisp_Object empty_unibyte_string, empty_multibyte_string; -EXFUN (Fkill_emacs, 1); +EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE void fixup_locale (void); void synchronize_system_messages_locale (void); @@ -3274,6 +3282,7 @@ extern int running_asynch_code; /* Defined in process.c */ +extern Lisp_Object QCtype, Qlocal; EXFUN (Fget_process, 1); EXFUN (Fget_buffer_process, 1); EXFUN (Fprocessp, 1); @@ -3333,6 +3342,7 @@ extern void syms_of_macros (void); /* Defined in undo.c */ +extern Lisp_Object Qapply; extern Lisp_Object Qinhibit_read_only; EXFUN (Fundo_boundary, 0); extern void truncate_undo_list (struct buffer *); @@ -3468,6 +3478,9 @@ #endif /* Defined in xfaces.c */ +extern Lisp_Object Qnormal; +extern Lisp_Object QCfamily, QCweight, QCslant, QCwidth; +extern Lisp_Object QCheight, QCsize, QCname, QCwidth, QCforeground, QCbackground; EXFUN (Fclear_face_cache, 1); EXFUN (Fx_load_color_file, 1); extern void syms_of_xfaces (void);
--- a/src/m/iris4d.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/m/iris4d.h Tue Jul 27 22:51:00 2010 +0000 @@ -36,17 +36,5 @@ #define DATA_START 0x10000000 #define DATA_SEG_BITS 0x10000000 - -#if _MIPS_SZLONG != 64 -/* fixme: should there be 64-bit definitions? (The ones below aren't OK.) */ - -/* The standard definitions of these macros would work ok, - but these are faster because the constants are short. */ -#define XUINT(a) (((unsigned)(a) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS) - -#define XSET(var, type, ptr) \ - ((var) = ((int)(type) << VALBITS) + (((unsigned) (ptr) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS)) -#endif /* _LP64 */ - /* arch-tag: fff5e139-9ae0-465d-afec-837c41ea0aa6 (do not change this comment) */
--- a/src/minibuf.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/minibuf.c Tue Jul 27 22:51:00 2010 +0000 @@ -145,8 +145,6 @@ extern Lisp_Object Voverriding_local_map; -extern Lisp_Object Qmouse_face; - extern Lisp_Object Qfield; /* Put minibuf on currently selected frame's minibuffer. @@ -1152,7 +1150,7 @@ If DEF is a list of default values, return its first element. Optional third arg REQUIRE-MATCH determines whether non-existing buffer names are allowed. It has the same meaning as the - REQUIRE-MATCH argument of `confirm-after-completion'. + REQUIRE-MATCH argument of `completing-read'. The argument PROMPT should be a string ending with a colon and a space. If `read-buffer-completion-ignore-case' is non-nil, completion ignores case while reading the buffer name.
--- a/src/msdos.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/msdos.c Tue Jul 27 22:51:00 2010 +0000 @@ -1330,7 +1330,6 @@ /* Check for mouse-face and help-echo. */ { - extern Lisp_Object Qmouse_face; Lisp_Object mouse_face, overlay, position, *overlay_vec; int noverlays, obegv, ozv; struct buffer *obuf;
--- a/src/process.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/process.c Tue Jul 27 22:51:00 2010 +0000 @@ -121,6 +121,25 @@ #include "xgselect.h" #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ +extern int timers_run; + +Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; +Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; +Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; +Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; +Lisp_Object QCname, QCtype; + +/* Non-zero if keyboard input is on hold, zero otherwise. */ + +static int kbd_is_on_hold; + +/* Nonzero means delete a process right away if it exits. */ +static int delete_exited_processes; + +/* Nonzero means don't run process sentinels. This is used + when exiting. */ +int inhibit_sentinels; + #ifdef subprocesses Lisp_Object Qprocessp; @@ -287,29 +306,6 @@ static Lisp_Object get_process (register Lisp_Object name); static void exec_sentinel (Lisp_Object proc, Lisp_Object reason); -#endif /* subprocesses */ - -extern int timers_run; - -Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; -Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; -Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; -Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; -Lisp_Object QCname, QCtype; - -/* Non-zero if keyboard input is on hold, zero otherwise. */ - -static int kbd_is_on_hold; - -/* Nonzero means delete a process right away if it exits. */ -static int delete_exited_processes; - -/* Nonzero means don't run process sentinels. This is used - when exiting. */ -int inhibit_sentinels; - -#ifdef subprocesses - /* Mask of bits indicating the descriptors that we wait for input on. */ static SELECT_TYPE input_wait_mask;
--- a/src/term.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/term.c Tue Jul 27 22:51:00 2010 +0000 @@ -132,8 +132,6 @@ /* Display space properties */ -extern Lisp_Object Qspace, QCalign_to, QCwidth; - /* Functions to call after suspending a tty. */ Lisp_Object Vsuspend_tty_functions; @@ -712,7 +710,7 @@ } else { - unsigned char *p = SDATA (string), *pend = p + SBYTES (string); + unsigned char *p = SDATA (string); if (! STRING_MULTIBYTE (string)) string = string_to_multibyte (string); @@ -1383,7 +1381,6 @@ function key specification, rather than giving the user an error and refusing to run at all on such a terminal. */ - extern Lisp_Object Fidentity (Lisp_Object); term_get_fkeys_address = address; term_get_fkeys_kboard = kboard; internal_condition_case (term_get_fkeys_1, Qerror, Fidentity); @@ -1860,8 +1857,6 @@ static void produce_composite_glyph (struct it *it) { - int c; - if (it->cmp_it.ch < 0) { struct composition *cmp = composition_table[it->cmp_it.id]; @@ -2256,7 +2251,6 @@ Lisp_Object tem, val; Lisp_Object color_mode; int mode; - extern Lisp_Object Qtty_color_mode; Lisp_Object tty_color_mode_alist = Fintern_soft (build_string ("tty-color-mode-alist"), Qnil); @@ -2795,7 +2789,6 @@ /* Check for mouse-face. */ { - extern Lisp_Object Qmouse_face; Lisp_Object mouse_face, overlay, position, *overlay_vec; int noverlays, obegv, ozv; struct buffer *obuf;
--- a/src/window.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/window.c Tue Jul 27 22:51:00 2010 +0000 @@ -508,7 +508,10 @@ doc: /* Return the number of lines in WINDOW. WINDOW defaults to the selected window. -The return value includes WINDOW's mode line and header line, if any. */) +The return value includes WINDOW's mode line and header line, if any. + +Note: The function does not take into account the value of `line-spacing' +when calculating the number of lines in WINDOW. */) (Lisp_Object window) { return decode_any_window (window)->total_lines;
--- a/src/xdisp.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xdisp.c Tue Jul 27 22:51:00 2010 +0000 @@ -276,8 +276,6 @@ extern int interrupt_input; extern int command_loop_level; -extern Lisp_Object do_mouse_tracking; - extern int minibuffer_auto_raise; extern Lisp_Object Vminibuffer_list; @@ -7966,7 +7964,7 @@ to *Messages*. */ void -add_to_log (char *format, Lisp_Object arg1, Lisp_Object arg2) +add_to_log (const char *format, Lisp_Object arg1, Lisp_Object arg2) { Lisp_Object args[3]; Lisp_Object msg, fmt;
--- a/src/xfaces.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xfaces.c Tue Jul 27 22:51:00 2010 +0000 @@ -411,7 +411,6 @@ /* The symbols `face' and `mouse-face' used as text properties. */ Lisp_Object Qface; -extern Lisp_Object Qmouse_face; /* Property for basic faces which other faces cannot inherit. */ @@ -520,7 +519,7 @@ static struct frame *frame_or_selected_frame (Lisp_Object, int); static void load_face_colors (struct frame *, struct face *, Lisp_Object *); static void free_face_colors (struct frame *, struct face *); -static int face_color_gray_p (struct frame *, char *); +static int face_color_gray_p (struct frame *, const char *); static struct face *realize_face (struct face_cache *, Lisp_Object *, int); static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, @@ -1171,7 +1170,8 @@ /* A version of defined_color for non-X frames. */ int -tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) +tty_defined_color (struct frame *f, const char *color_name, + XColor *color_def, int alloc) { int status = 1; @@ -1206,7 +1206,7 @@ This does the right thing for any type of frame. */ int -defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) +defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc) { if (!FRAME_WINDOW_P (f)) return tty_defined_color (f, color_name, color_def, alloc); @@ -1266,7 +1266,7 @@ The criterion implemented here is not a terribly sophisticated one. */ static int -face_color_gray_p (struct frame *f, char *color_name) +face_color_gray_p (struct frame *f, const char *color_name) { XColor color; int gray_p; @@ -1293,7 +1293,7 @@ color. */ static int -face_color_supported_p (struct frame *f, char *color_name, int background_p) +face_color_supported_p (struct frame *f, const char *color_name, int background_p) { Lisp_Object frame; XColor not_used;
--- a/src/xfns.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xfns.c Tue Jul 27 22:51:00 2010 +0000 @@ -101,6 +101,10 @@ #include <Xm/FileSB.h> #endif +#ifdef USE_LUCID +#include "../lwlib/xlwmenu.h" +#endif + #if !defined(NO_EDITRES) #define HACK_EDITRES extern void _XEditResCheckMessages (); @@ -650,7 +654,8 @@ no color could be allocated. */ int -x_defined_color (struct frame *f, char *color_name, XColor *color, int alloc_p) +x_defined_color (struct frame *f, const char *color_name, + XColor *color, int alloc_p) { int success_p; Display *dpy = FRAME_X_DISPLAY (f); @@ -2353,7 +2358,7 @@ BASE_FONTNAME. Called when a new Emacs fontset is chosen. */ void -xic_set_xfontset (struct frame *f, char *base_fontname) +xic_set_xfontset (struct frame *f, const char *base_fontname) { XVaNestedList attr; XFontSet xfs; @@ -5205,7 +5210,6 @@ { struct frame *f = SELECTED_FRAME (); Widget w = f->output_data.x->menubar_widget; - extern void xlwmenu_redisplay (Widget); if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen) && w != NULL)
--- a/src/xmenu.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xmenu.c Tue Jul 27 22:51:00 2010 +0000 @@ -89,7 +89,6 @@ #include <X11/Xaw/Paned.h> #endif /* HAVE_XAW3D */ #endif /* USE_LUCID */ -#include "../lwlib/lwlib.h" #else /* not USE_X_TOOLKIT */ #ifndef USE_GTK #include "../oldXMenu/XMenu.h"
--- a/src/xrdb.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xrdb.c Tue Jul 27 22:51:00 2010 +0000 @@ -82,8 +82,9 @@ #define free xfree #endif -char *x_get_string_resource (XrmDatabase rdb, char *name, char *class); -static int file_p (char *filename); +char *x_get_string_resource (XrmDatabase rdb, const char *name, + const char *class); +static int file_p (const char *filename); /* X file search path processing. */ @@ -98,7 +99,7 @@ resource, for later use in search path decoding. If we find no such resource, return zero. */ char * -x_get_customization_string (XrmDatabase db, char *name, char *class) +x_get_customization_string (XrmDatabase db, const char *name, const char *class) { char *full_name = (char *) alloca (strlen (name) + sizeof ("customization") + 3); @@ -153,7 +154,7 @@ Return NULL otherwise. */ static char * -magic_file_p (char *string, int string_len, char *class, char *escaped_suffix, char *suffix) +magic_file_p (const char *string, int string_len, const char *class, const char *escaped_suffix, const char *suffix) { char *lang = getenv ("LANG"); @@ -161,12 +162,12 @@ char *path = (char *) malloc (path_size); int path_len = 0; - char *p = string; + const char *p = string; while (p < string + string_len) { /* The chunk we're about to stick on the end of result. */ - char *next = NULL; + const char *next = NULL; int next_len; if (*p == '%') @@ -306,7 +307,7 @@ static int -file_p (char *filename) +file_p (const char *filename) { struct stat status; @@ -321,9 +322,9 @@ the path name of the one we found otherwise. */ static char * -search_magic_path (char *search_path, char *class, char *escaped_suffix, char *suffix) +search_magic_path (const char *search_path, const char *class, const char *escaped_suffix, const char *suffix) { - register char *s, *p; + const char *s, *p; for (s = search_path; *s; s = p) { @@ -332,7 +333,8 @@ if (p > s) { - char *path = magic_file_p (s, p - s, class, escaped_suffix, suffix); + char *path = magic_file_p (s, p - s, class, escaped_suffix, + suffix); if (path) return path; } @@ -356,7 +358,7 @@ /* Producing databases for individual sources. */ static XrmDatabase -get_system_app (char *class) +get_system_app (const char *class) { XrmDatabase db = NULL; char *path; @@ -383,7 +385,7 @@ static XrmDatabase -get_user_app (char *class) +get_user_app (const char *class) { char *path; char *file = 0; @@ -494,17 +496,18 @@ /* Load X resources based on the display and a possible -xrm option. */ XrmDatabase -x_load_resources (Display *display, char *xrm_string, char *myname, char *myclass) +x_load_resources (Display *display, const char *xrm_string, + const char *myname, const char *myclass) { XrmDatabase user_database; XrmDatabase rdb; XrmDatabase db; char line[256]; - char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"; + const char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"; #ifdef USE_MOTIF - char *courier = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"; + const char *courier = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"; extern Lisp_Object Vdouble_click_time; #endif @@ -628,7 +631,7 @@ and of type TYPE from database RDB. The value is returned in RET_VALUE. */ int -x_get_resource (XrmDatabase rdb, char *name, char *class, XrmRepresentation expected_type, XrmValue *ret_value) +x_get_resource (XrmDatabase rdb, const char *name, const char *class, XrmRepresentation expected_type, XrmValue *ret_value) { XrmValue value; XrmName namelist[100]; @@ -656,7 +659,7 @@ database RDB. */ char * -x_get_string_resource (XrmDatabase rdb, char *name, char *class) +x_get_string_resource (XrmDatabase rdb, const char *name, const char *class) { XrmValue value;
--- a/src/xselect.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xselect.c Tue Jul 27 22:51:00 2010 +0000 @@ -76,7 +76,8 @@ static Lisp_Object x_get_window_property_as_lisp_data (Display *, Window, Atom, Lisp_Object, Atom); -static Lisp_Object selection_data_to_lisp_data (Display *, unsigned char *, +static Lisp_Object selection_data_to_lisp_data (Display *, + const unsigned char *, int, Atom, int); static void lisp_data_to_selection_data (Display *, Lisp_Object, unsigned char **, Atom *, @@ -1758,7 +1759,8 @@ static Lisp_Object -selection_data_to_lisp_data (Display *display, unsigned char *data, int size, Atom type, int format) +selection_data_to_lisp_data (Display *display, const unsigned char *data, + int size, Atom type, int format) { struct x_display_info *dpyinfo = x_display_info_for_display (display); @@ -2540,7 +2542,8 @@ Also see comment for selection_data_to_lisp_data above. */ Lisp_Object -x_property_data_to_lisp (struct frame *f, unsigned char *data, Atom type, int format, long unsigned int size) +x_property_data_to_lisp (struct frame *f, const unsigned char *data, + Atom type, int format, long unsigned int size) { return selection_data_to_lisp_data (FRAME_X_DISPLAY (f), data, size*format/8, type, format);
--- a/src/xterm.c Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xterm.c Tue Jul 27 22:51:00 2010 +0000 @@ -104,8 +104,7 @@ #endif #ifdef USE_LUCID -extern int xlwmenu_window_p (Widget w, Window window); -extern void xlwmenu_redisplay (Widget); +#include "../lwlib/xlwmenu.h" #endif #if defined (USE_X_TOOLKIT) || defined (USE_GTK) @@ -332,7 +331,8 @@ extern Lisp_Object Vinhibit_redisplay; -extern XrmDatabase x_load_resources (Display *, char *, char *, char *); +extern XrmDatabase x_load_resources (Display *, const char *, const char *, + const char *); extern int x_bitmap_mask (FRAME_PTR, int); static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); @@ -379,7 +379,7 @@ int *, struct input_event *); /* Don't declare this NO_RETURN because we want no interference with debugging failing X calls. */ -static SIGTYPE x_connection_closed (Display *, char *); +static SIGTYPE x_connection_closed (Display *, const char *); /* Flush display of frame F, or of all frames if F is null. */ @@ -7359,7 +7359,7 @@ Use ICON_NAME as the text. */ int -x_text_icon (struct frame *f, char *icon_name) +x_text_icon (struct frame *f, const char *icon_name) { if (FRAME_X_WINDOW (f) == 0) return 1; @@ -7422,7 +7422,7 @@ Calling x_uncatch_errors resumes the normal error handling. */ -void x_check_errors (Display *dpy, char *format); +void x_check_errors (Display *dpy, const char *format); void x_catch_errors (Display *dpy) @@ -7464,7 +7464,7 @@ sprintf (a buffer, FORMAT, the x error message text) as the text. */ void -x_check_errors (Display *dpy, char *format) +x_check_errors (Display *dpy, const char *format) { /* Make sure to catch any errors incurred so far. */ XSync (dpy, False); @@ -7568,7 +7568,7 @@ the text of an error message that lead to the connection loss. */ static SIGTYPE -x_connection_closed (Display *dpy, char *error_message) +x_connection_closed (Display *dpy, const char *error_message) { struct x_display_info *dpyinfo = x_display_info_for_display (dpy); Lisp_Object frame, tail;
--- a/src/xterm.h Mon Jul 26 22:54:37 2010 +0000 +++ b/src/xterm.h Tue Jul 27 22:51:00 2010 +0000 @@ -936,15 +936,16 @@ /* From xrdb.c. */ -char *x_get_customization_string (XrmDatabase, char *, char *); -XrmDatabase x_load_resources (Display *, char *, char *, char *); -int x_get_resource (XrmDatabase, char *, char *, +char *x_get_customization_string (XrmDatabase, const char *, const char *); +XrmDatabase x_load_resources (Display *, const char *, const char *, + const char *); +int x_get_resource (XrmDatabase, const char *, const char *, XrmRepresentation, XrmValue *); void x_delete_display (struct x_display_info *); void x_make_frame_visible (struct frame *); void x_iconify_frame (struct frame *); void x_wm_set_size_hint (struct frame *, long, int); -int x_text_icon (struct frame *, char *); +int x_text_icon (struct frame *, const char *); int x_bitmap_icon (struct frame *, Lisp_Object); void x_set_window_size (struct frame *, int, int, int); void x_wm_set_window_state (struct frame *, int); @@ -954,10 +955,10 @@ extern void cancel_mouse_face (struct frame *); extern void x_scroll_bar_clear (struct frame *); -extern int x_text_icon (struct frame *, char *); +extern int x_text_icon (struct frame *, const char *); extern int x_bitmap_icon (struct frame *, Lisp_Object); extern void x_catch_errors (Display *); -extern void x_check_errors (Display *, char *); +extern void x_check_errors (Display *, const char *); extern int x_had_errors_p (Display *); extern int x_catching_errors (void); extern void x_uncatch_errors (void); @@ -1018,7 +1019,7 @@ void *, int); extern Lisp_Object x_property_data_to_lisp (struct frame *, - unsigned char *, + const unsigned char *, Atom, int, unsigned long); @@ -1033,7 +1034,7 @@ #endif /* USE_GTK */ extern void x_real_positions (struct frame *, int *, int *); -extern int defined_color (struct frame *, char *, XColor *, int); +extern int defined_color (struct frame *, const char *, XColor *, int); extern void x_set_border_pixel (struct frame *, int); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); @@ -1042,14 +1043,14 @@ extern void destroy_frame_xic (struct frame *); extern void xic_set_preeditarea (struct window *, int, int); extern void xic_set_statusarea (struct frame *); -extern void xic_set_xfontset (struct frame *, char *); +extern void xic_set_xfontset (struct frame *, const char *); extern int x_pixel_width (struct frame *); extern int x_pixel_height (struct frame *); extern int x_char_width (struct frame *); extern int x_char_height (struct frame *); extern int x_screen_planes (struct frame *); extern void x_sync (struct frame *); -extern int x_defined_color (struct frame *, char *, XColor *, int); +extern int x_defined_color (struct frame *, const char *, XColor *, int); #ifdef HAVE_X_I18N extern void free_frame_xic (struct frame *); #endif