------------------------------------------------------------ revno: 117360 fixes bug: http://debbugs.gnu.org/10181 committer: Juri Linkov branch nick: trunk timestamp: Wed 2014-06-18 11:33:57 +0300 message: * lisp/vc/diff-mode.el (diff-refine-changed): Rename from `diff-refine-change' for consistency with `diff-changed'. (diff-refine-change): Add obsolete face alias. * lisp/vc/smerge-mode.el (smerge-refined-changed): Rename from `smerge-refined-change'. (smerge-refined-change): Add obsolete face alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-17 19:33:58 +0000 +++ lisp/ChangeLog 2014-06-18 08:33:57 +0000 @@ -1,3 +1,13 @@ +2014-06-18 Juri Linkov + + * vc/diff-mode.el (diff-refine-changed): Rename from + `diff-refine-change' for consistency with `diff-changed'. + (diff-refine-change): Add obsolete face alias. (Bug#10181) + + * vc/smerge-mode.el (smerge-refined-changed): Rename from + `smerge-refined-change'. + (smerge-refined-change): Add obsolete face alias. + 2014-06-17 Stefan Monnier * rect.el (rectangle-preview): New custom. === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/diff-mode.el 2014-06-18 08:33:57 +0000 @@ -1916,7 +1916,7 @@ ;;; Fine change highlighting. -(defface diff-refine-change +(defface diff-refine-changed '((((class color) (min-colors 88) (background light)) :background "#ffff55") (((class color) (min-colors 88) (background dark)) @@ -1924,6 +1924,7 @@ (t :inverse-video t)) "Face used for char-based changes shown by `diff-refine-hunk'." :group 'diff-mode) +(define-obsolete-face-alias 'diff-refine-change 'diff-refine-changed "24.5") (defface diff-refine-removed '((default === modified file 'lisp/vc/smerge-mode.el' --- lisp/vc/smerge-mode.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/smerge-mode.el 2014-06-18 08:33:57 +0000 @@ -116,9 +116,10 @@ (define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1") (defvar smerge-markers-face 'smerge-markers) -(defface smerge-refined-change +(defface smerge-refined-changed '((t nil)) "Face used for char-based changes shown by `smerge-refine'.") +(define-obsolete-face-alias 'smerge-refined-change 'smerge-refined-changed "24.5") (defface smerge-refined-removed '((default ------------------------------------------------------------ revno: 117359 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2014-06-17 15:33:58 -0400 message: * lisp/rect.el (rectangle-preview): New custom. (rectangle): New group. (rectangle--pos-cols): Add `window' argument. (rectangle--string-preview-state, rectangle--string-preview-window): New vars. (rectangle--string-flush-preview, rectangle--string-erase-preview) (rectangle--space-to, rectangle--string-preview): New functions. (string-rectangle): Use them. (rectangle--inhibit-region-highlight): New var. (rectangle--highlight-for-redisplay): Obey it. Make sure `apply-on-region' uses the point-crutches of the right window. Use :align-to rather than multiple spaces. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-06-15 20:49:10 +0000 +++ etc/NEWS 2014-06-17 19:33:58 +0000 @@ -72,8 +72,10 @@ * Changes in Specialized Modes and Packages in Emacs 24.5 -** Rectangle Mark mode can now have corners past EOL or in the middle of a TAB. -Also C-x C-x in rectangle-mark-mode now cycles through the four corners. +** Rectangle editing +*** Rectangle Mark mode can have corners past EOL or in the middle of a TAB. +*** C-x C-x in rectangle-mark-mode now cycles through the four corners. +*** `string-rectangle' provides on-the-fly preview of the result. ** New font-lock functions font-lock-ensure and font-lock-flush, which should be used instead of font-lock-fontify-buffer when called from Elisp. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-16 06:37:37 +0000 +++ lisp/ChangeLog 2014-06-17 19:33:58 +0000 @@ -1,3 +1,18 @@ +2014-06-17 Stefan Monnier + + * rect.el (rectangle-preview): New custom. + (rectangle): New group. + (rectangle--pos-cols): Add `window' argument. + (rectangle--string-preview-state, rectangle--string-preview-window): + New vars. + (rectangle--string-flush-preview, rectangle--string-erase-preview) + (rectangle--space-to, rectangle--string-preview): New functions. + (string-rectangle): Use them. + (rectangle--inhibit-region-highlight): New var. + (rectangle--highlight-for-redisplay): Obey it. Make sure + `apply-on-region' uses the point-crutches of the right window. + Use :align-to rather than multiple spaces. + 2014-06-16 Andrea Rossetti (tiny change) * ruler-mode.el (ruler-mode-window-col) @@ -7,10 +22,13 @@ 2014-06-16 Ron Schnell - * play/dunnet.el (dun-doassign): Fixed bug where UNIX variable assignment without varname or rhs causes crash. - * play/dunnet.el (dun-ftp): Fixed bug where blank ftp password is allowed, making it impossible to win endgame. - * play/dunnet.el (dun-unix-verbs): Added ssh as alias to rlogin, because nobody knows what rlogin is anymore. - * play/dunnet.el (dun-help): Bumped version number, updated contact info. + * play/dunnet.el (dun-doassign): Fix bug where UNIX variable assignment + without varname or rhs causes crash. + (dun-ftp): Fix bug where blank ftp password is allowed, making it + impossible to win endgame. + (dun-unix-verbs): Add ssh as alias to rlogin, because nobody knows what + rlogin is anymore. + (dun-help): Bump version number; update contact info. 2014-06-15 Michael Albinus @@ -19,8 +37,8 @@ * net/tramp.el (tramp-methods): Tweak docstring. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. - (tramp-check-cached-permissions): Use - `tramp-compat-file-attributes'. + (tramp-check-cached-permissions): + Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. === modified file 'lisp/rect.el' --- lisp/rect.el 2014-06-11 21:51:44 +0000 +++ lisp/rect.el 2014-06-17 19:33:58 +0000 @@ -33,6 +33,11 @@ (eval-when-compile (require 'cl-lib)) +(defgroup rectangle nil + "Operations on rectangles." + :version "24.5" + :group 'editing) + ;; FIXME: this function should be replaced by `apply-on-rectangle' (defun operate-on-rectangle (function start end coerce-tabs) "Call FUNCTION for each line of rectangle with corners at START, END. @@ -68,11 +73,11 @@ (defvar-local rectangle--mark-crutches nil "(POS . COL) to override the column to use for the mark.") -(defun rectangle--pos-cols (start end) +(defun rectangle--pos-cols (start end &optional window) ;; At this stage, we don't know which of start/end is point/mark :-( ;; And in case start=end, it might still be that point and mark have ;; different crutches! - (let ((cw (window-parameter nil 'rectangle--point-crutches))) + (let ((cw (window-parameter window 'rectangle--point-crutches))) (cond ((eq start (car cw)) (let ((sc (cdr cw)) @@ -365,6 +370,67 @@ (delete-rectangle-line startcol endcol nil)) (insert string)) +(defvar-local rectangle--string-preview-state nil) +(defvar-local rectangle--string-preview-window nil) + +(defun rectangle--string-flush-preview () + (mapc #'delete-overlay (nthcdr 3 rectangle--string-preview-state)) + (setf (nthcdr 3 rectangle--string-preview-state) nil)) + +(defun rectangle--string-erase-preview () + (with-selected-window rectangle--string-preview-window + (rectangle--string-flush-preview))) + +(defun rectangle--space-to (col) + (propertize " " 'display `(space :align-to ,col))) + +(defface rectangle-preview-face '((t :inherit region)) + "The face to use for the `string-rectangle' preview.") + +(defcustom rectangle-preview t + "If non-nil, `string-rectangle' will show an-the-fly preview." + :type 'boolean) + +(defun rectangle--string-preview () + (let ((str (minibuffer-contents))) + (when (equal str "") + (setq str (or (car-safe minibuffer-default) + (if (stringp minibuffer-default) minibuffer-default)))) + (setq str (propertize str 'face 'region)) + (with-selected-window rectangle--string-preview-window + (unless (or (null rectangle--string-preview-state) + (equal str (car rectangle--string-preview-state))) + (rectangle--string-flush-preview) + (apply-on-rectangle + (lambda (startcol endcol) + (let* ((sc (move-to-column startcol)) + (start (if (<= sc startcol) (point) + (forward-char -1) + (setq sc (current-column)) + (point))) + (ec (move-to-column endcol)) + (end (point)) + (ol (make-overlay start end))) + (push ol (nthcdr 3 rectangle--string-preview-state)) + ;; FIXME: The extra spacing doesn't interact correctly with + ;; the extra spacing added by the rectangular-region-highlight. + (when (< sc startcol) + (overlay-put ol 'before-string (rectangle--space-to startcol))) + (let ((as (when (< endcol ec) + ;; (rectangle--space-to ec) + (spaces-string (- ec endcol)) + ))) + (if (= start end) + (overlay-put ol 'after-string (if as (concat str as) str)) + (overlay-put ol 'display str) + (if as (overlay-put ol 'after-string as)))))) + (nth 1 rectangle--string-preview-state) + (nth 2 rectangle--string-preview-state)))))) + +;; FIXME: Should this be turned into inhibit-region-highlight and made to apply +;; to non-rectangular regions as well? +(defvar rectangle--inhibit-region-highlight nil) + ;;;###autoload (defun string-rectangle (start end string) "Replace rectangle contents with STRING on each line. @@ -372,14 +438,31 @@ Called from a program, takes three args; START, END and STRING." (interactive - (progn (barf-if-buffer-read-only) - (list - (region-beginning) - (region-end) + (progn + (make-local-variable 'rectangle--string-preview-state) + (make-local-variable 'rectangle--inhibit-region-highlight) + (let* ((buf (current-buffer)) + (win (if (eq (window-buffer) buf) (selected-window))) + (start (region-beginning)) + (end (region-end)) + (rectangle--string-preview-state `(nil ,start ,end)) + ;; Rectangle-region-highlighting doesn't work well in the presence + ;; of the preview overlays. We could work harder to try and make + ;; it work better, but it's easier to just disable it temporarily. + (rectangle--inhibit-region-highlight t)) + (barf-if-buffer-read-only) + (list start end + (minibuffer-with-setup-hook + (lambda () + (setq rectangle--string-preview-window win) + (add-hook 'minibuffer-exit-hook + #'rectangle--string-erase-preview nil t) + (add-hook 'post-command-hook + #'rectangle--string-preview nil t)) (read-string (format "String rectangle (default %s): " (or (car string-rectangle-history) "")) nil 'string-rectangle-history - (car string-rectangle-history))))) + (car string-rectangle-history))))))) (goto-char (apply-on-rectangle 'string-rectangle-line start end string t))) @@ -635,6 +718,9 @@ (cond ((not rectangle-mark-mode) (funcall orig start end window rol)) + (rectangle--inhibit-region-highlight + (rectangle--unhighlight-for-redisplay orig rol) + nil) ((and (eq 'rectangle (car-safe rol)) (eq (nth 1 rol) (buffer-chars-modified-tick)) (eq start (nth 2 rol)) @@ -648,69 +734,84 @@ (nthcdr 5 rol) (funcall redisplay-unhighlight-region-function rol) nil))) - (apply-on-rectangle - (lambda (leftcol rightcol) - (let* ((mleft (move-to-column leftcol)) - (left (point)) - (mright (move-to-column rightcol)) - (right (point)) - (ol - (if (not old) - (let ((ol (make-overlay left right))) - (overlay-put ol 'window window) - (overlay-put ol 'face 'region) - ol) - (let ((ol (pop old))) - (move-overlay ol left right (current-buffer)) - ol)))) - ;; `move-to-column' may stop before the column (if bumping into - ;; EOL) or overshoot it a little, when column is in the middle - ;; of a char. - (cond - ((< mleft leftcol) ;`leftcol' is past EOL. - (overlay-put ol 'before-string - (spaces-string (- leftcol mleft))) - (setq mright (max mright leftcol))) - ((and (> mleft leftcol) ;`leftcol' is in the middle of a char. - (eq (char-before left) ?\t)) - (setq left (1- left)) - (move-overlay ol left right) - (goto-char left) - (overlay-put ol 'before-string - (spaces-string (- leftcol (current-column))))) - ((overlay-get ol 'before-string) - (overlay-put ol 'before-string nil))) - (cond - ((< mright rightcol) ;`rightcol' is past EOL. - (let ((str (make-string (- rightcol mright) ?\s))) - (put-text-property 0 (length str) 'face 'region str) - ;; If cursor happens to be here, draw it at the right place. - (rectangle--place-cursor leftcol left str) - (overlay-put ol 'after-string str))) - ((and (> mright rightcol) ;`rightcol's in the middle of a char. - (eq (char-before right) ?\t)) - (setq right (1- right)) - (move-overlay ol left right) - (if (= rightcol leftcol) - (overlay-put ol 'after-string nil) - (goto-char right) - (let ((str (make-string - (- rightcol (max leftcol (current-column))) - ?\s))) + (cl-assert (eq (window-buffer window) (current-buffer))) + ;; `rectangle--pos-cols' looks up the `selected-window's parameter! + (with-selected-window window + (apply-on-rectangle + (lambda (leftcol rightcol) + (let* ((mleft (move-to-column leftcol)) + (left (point)) + ;; BEWARE: In the presence of other overlays with + ;; before/after/display-strings, this happens to move to + ;; the column "as if the overlays were not applied", which + ;; is sometimes what we want, tho it can be + ;; considered a bug in move-to-column (it should arguably + ;; pay attention to the before/after-string/display + ;; properties when computing the column). + (mright (move-to-column rightcol)) + (right (point)) + (ol + (if (not old) + (let ((ol (make-overlay left right))) + (overlay-put ol 'window window) + (overlay-put ol 'face 'region) + ol) + (let ((ol (pop old))) + (move-overlay ol left right (current-buffer)) + ol)))) + ;; `move-to-column' may stop before the column (if bumping into + ;; EOL) or overshoot it a little, when column is in the middle + ;; of a char. + (cond + ((< mleft leftcol) ;`leftcol' is past EOL. + (overlay-put ol 'before-string (rectangle--space-to leftcol)) + (setq mright (max mright leftcol))) + ((and (> mleft leftcol) ;`leftcol' is in the middle of a char. + (eq (char-before left) ?\t)) + (setq left (1- left)) + (move-overlay ol left right) + (goto-char left) + (overlay-put ol 'before-string (rectangle--space-to leftcol))) + ((overlay-get ol 'before-string) + (overlay-put ol 'before-string nil))) + (cond + ;; While doing rectangle--string-preview, the two sets of + ;; overlays steps on the other's toes. I fixed some of the + ;; problems, but others remain. The main one is the two + ;; (rectangle--space-to rightcol) below which try to virtually + ;; insert missing text, but during "preview", the text is not + ;; missing (it's provided by preview's own overlay). + (rectangle--string-preview-state + (if (overlay-get ol 'after-string) + (overlay-put ol 'after-string nil))) + ((< mright rightcol) ;`rightcol' is past EOL. + (let ((str (rectangle--space-to rightcol))) (put-text-property 0 (length str) 'face 'region str) - (when (= left right) - (rectangle--place-cursor leftcol left str)) - (overlay-put ol 'after-string str)))) - ((overlay-get ol 'after-string) - (overlay-put ol 'after-string nil))) - (when (and (= leftcol rightcol) (display-graphic-p)) - ;; Make zero-width rectangles visible! - (overlay-put ol 'after-string - (concat (propertize " " - 'face '(region (:height 0.2))) - (overlay-get ol 'after-string)))) - (push ol nrol))) - start end) + ;; If cursor happens to be here, draw it at the right place. + (rectangle--place-cursor leftcol left str) + (overlay-put ol 'after-string str))) + ((and (> mright rightcol) ;`rightcol's in the middle of a char. + (eq (char-before right) ?\t)) + (setq right (1- right)) + (move-overlay ol left right) + (if (= rightcol leftcol) + (overlay-put ol 'after-string nil) + (goto-char right) + (let ((str (rectangle--space-to rightcol))) + (put-text-property 0 (length str) 'face 'region str) + (when (= left right) + (rectangle--place-cursor leftcol left str)) + (overlay-put ol 'after-string str)))) + ((overlay-get ol 'after-string) + (overlay-put ol 'after-string nil))) + (when (and (= leftcol rightcol) (display-graphic-p)) + ;; Make zero-width rectangles visible! + (overlay-put ol 'after-string + (concat (propertize " " + 'face '(region (:height 0.2))) + (overlay-get ol 'after-string)))) + (push ol nrol))) + start end)) (mapc #'delete-overlay old) `(rectangle ,(buffer-chars-modified-tick) ,start ,end ,(rectangle--crutches) ------------------------------------------------------------ revno: 117358 committer: Paul Eggert branch nick: trunk timestamp: Tue 2014-06-17 09:09:19 -0700 message: Omit redundant extern decls. Most of this patch is from Dmitry Antipov, in: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html * configure.ac (WERROR_CFLAGS): Add -Wredundant-decls. * lib-src/emacsclient.c (getenv): Remove decl. * lib-src/make-docfile.c (write_globals): Add ATTRIBUTE_CONST for Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity. * lwlib/lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value) (xm_create_dialog, xm_destroy_instance, xm_popup_menu) (xm_set_keyboard_focus, xm_set_main_areas): Remove decls. * src/commands.h (update_mode_lines): * src/frame.h (Qbackground_color, Qforeground_color) (x_set_menu_bar_lines): * src/ftfont.c (ftfont_font_format): * src/intervals.h (Qkeymap, Qfont): * src/keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function): * src/lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump) (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp) (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p) (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object) (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite) (Fidentity, extract_float, init_display, syms_of_display, Qdisplay): (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref) (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop) (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio) (Qtool_bar, Qheader_line): * src/macros.c (Fexecute_kbd_macro): * src/xdisp.c (Ftool_bar_height, Ftool_bar_height): * src/xterm.c (x_delete_terminal, XSetIMValues): * src/xterm.h (x_set_window_size, x_query_color, x_get_focus_frame) (x_implicitly_set_name, popup_activated) (widget_store_internal_border): Remove redundant decls. * src/frame.c [USE_X_TOOLKIT]: Include widget.h. * src/keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit): Remove _Noreturn, as make-docfile now does that for us. * src/lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile. (Qregion_extract_function): New decl. * src/window.c, src/xfns.c: Include menu.h. diff: === modified file 'ChangeLog' --- ChangeLog 2014-06-15 00:34:22 +0000 +++ ChangeLog 2014-06-17 16:09:19 +0000 @@ -1,3 +1,15 @@ +2014-06-17 Paul Eggert + + Omit redundant extern decls. + Most of this patch is from Dmitry Antipov, in: + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html + * configure.ac (WERROR_CFLAGS): Add -Wredundant-decls. + + Merge from gnulib, incorporating: + 2014-06-17 acl: port to gcc -Wredundant-decls + 2014-06-01 gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL. + * lib/acl.h, m4/gnulib-common.m4: Update from gnulib. + 2014-06-15 Glenn Morris * Makefile.in: Use `make -C' rather than `cd && make' throughout. === modified file 'configure.ac' --- configure.ac 2014-06-15 00:06:30 +0000 +++ configure.ac 2014-06-17 16:09:19 +0000 @@ -882,6 +882,7 @@ for w in $ws; do gl_WARN_ADD([$w]) done + gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison. gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-06-15 17:45:38 +0000 +++ lib-src/ChangeLog 2014-06-17 16:09:19 +0000 @@ -1,3 +1,10 @@ +2014-06-17 Paul Eggert + + Omit redundant extern decls. + * emacsclient.c (getenv): Remove decl. + * make-docfile.c (write_globals): Add ATTRIBUTE_CONST for + Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity. + 2014-06-15 Glenn Morris * Makefile.in (LDFLAGS): Explicitly set via configure. === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2014-05-03 20:13:10 +0000 +++ lib-src/emacsclient.c 2014-06-17 16:09:19 +0000 @@ -82,10 +82,6 @@ #include #include - - -char *getenv (const char *); - #ifndef VERSION #define VERSION "unspecified" #endif === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2014-01-01 07:43:34 +0000 +++ lib-src/make-docfile.c 2014-06-17 16:09:19 +0000 @@ -665,6 +665,7 @@ || strcmp (globals[i].name, "Fexit_recursive_edit") == 0 || strcmp (globals[i].name, "Fabort_recursive_edit") == 0) fprintf (outfile, "_Noreturn "); + fprintf (outfile, "EXFUN (%s, ", globals[i].name); if (globals[i].value == -1) fprintf (outfile, "MANY"); @@ -672,7 +673,17 @@ fprintf (outfile, "UNEVALLED"); else fprintf (outfile, "%d", globals[i].value); - fprintf (outfile, ");\n"); + fprintf (outfile, ")"); + + /* It would be nice to have a cleaner way to deal with these + special hacks, too. */ + if (strcmp (globals[i].name, "Fbyteorder") == 0 + || strcmp (globals[i].name, "Ftool_bar_height") == 0 + || strcmp (globals[i].name, "Fmax_char") == 0 + || strcmp (globals[i].name, "Fidentity") == 0) + fprintf (outfile, " ATTRIBUTE_CONST"); + + fprintf (outfile, ";\n"); } while (i + 1 < num_globals === modified file 'lib/acl.h' --- lib/acl.h 2014-01-01 07:43:34 +0000 +++ lib/acl.h 2014-06-17 16:09:19 +0000 @@ -17,6 +17,9 @@ Written by Paul Eggert. */ +#ifndef _GL_ACL_H +#define _GL_ACL_H 1 + #include #include #include @@ -28,3 +31,5 @@ int qcopy_acl (char const *, int, char const *, int, mode_t); int copy_acl (char const *, int, char const *, int, mode_t); int chmod_or_fchmod (char const *, int, mode_t); + +#endif === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2014-06-15 00:34:22 +0000 +++ lwlib/ChangeLog 2014-06-17 16:09:19 +0000 @@ -1,3 +1,11 @@ +2014-06-17 Paul Eggert + + Omit redundant extern decls. + From Dmitry Antipov. + * lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value) + (xm_create_dialog, xm_destroy_instance, xm_popup_menu) + (xm_set_keyboard_focus, xm_set_main_areas): Remove decls. + 2014-06-15 Glenn Morris * Makefile.in ($(globals_h)): Use `make -C' rather than `cd && make'. === modified file 'lwlib/lwlib-Xm.c' --- lwlib/lwlib-Xm.c 2014-05-30 13:22:29 +0000 +++ lwlib/lwlib-Xm.c 2014-06-17 16:09:19 +0000 @@ -79,7 +79,6 @@ Boolean); static void free_destroyed_instance (destroyed_instance*); Widget first_child (Widget); -Boolean lw_motif_widget_p (Widget); static XmString resource_motif_string (Widget, char *); static void destroy_all_children (Widget, int); static void xm_update_label (widget_instance *, Widget, widget_value *); @@ -99,7 +98,6 @@ static void xm_update_text (widget_instance *, Widget, widget_value *); static void xm_update_text_field (widget_instance *, Widget, widget_value *); -void xm_update_one_value (widget_instance *, Widget, widget_value *); static void activate_button (Widget, XtPointer, XtPointer); static Widget make_dialog (char *, Widget, Boolean, char *, char *, Boolean, Boolean, Boolean, int, int); @@ -107,21 +105,16 @@ static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer); static void recenter_widget (Widget); static Widget recycle_instance (destroyed_instance*); -Widget xm_create_dialog (widget_instance*); static Widget make_menubar (widget_instance*); static void remove_grabs (Widget, XtPointer, XtPointer); static Widget make_popup_menu (widget_instance*); static Widget make_main (widget_instance*); -void xm_destroy_instance (widget_instance*); -void xm_popup_menu (Widget, XEvent *); static void set_min_dialog_size (Widget); static void do_call (Widget, XtPointer, enum do_call_type); static void xm_generic_callback (Widget, XtPointer, XtPointer); static void xm_nosel_callback (Widget, XtPointer, XtPointer); static void xm_pull_down_callback (Widget, XtPointer, XtPointer); static void xm_pop_down_callback (Widget, XtPointer, XtPointer); -void xm_set_keyboard_focus (Widget, Widget); -void xm_set_main_areas (Widget, Widget, Widget); static void xm_internal_update_other_instances (Widget, XtPointer, XtPointer); static void xm_arm_callback (Widget, XtPointer, XtPointer); === modified file 'm4/gnulib-common.m4' --- m4/gnulib-common.m4 2014-06-01 23:58:38 +0000 +++ m4/gnulib-common.m4 2014-06-17 16:09:19 +0000 @@ -50,7 +50,8 @@ #define _UNUSED_PARAMETER_ _GL_UNUSED /* gcc supports the "unused" attribute on possibly unused labels, and - g++ has since version 4.5. */ + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ #if !defined __cplusplus || __GNUC__ > 4 \ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) # define _GL_UNUSED_LABEL _GL_UNUSED === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-17 13:50:22 +0000 +++ src/ChangeLog 2014-06-17 16:09:19 +0000 @@ -1,3 +1,38 @@ +2014-06-17 Paul Eggert + + Omit redundant extern decls. + Most of this patch is from Dmitry Antipov, in: + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html + * commands.h (update_mode_lines): + * frame.h (Qbackground_color, Qforeground_color) + (x_set_menu_bar_lines): + * ftfont.c (ftfont_font_format): + * intervals.h (Qkeymap, Qfont): + * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function): + * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump) + (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp) + (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p) + (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object) + (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite) + (Fidentity, extract_float, init_display, syms_of_display, Qdisplay): + (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref) + (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop) + (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio) + (Qtool_bar, Qheader_line): + * macros.c (Fexecute_kbd_macro): + * xdisp.c (Ftool_bar_height, Ftool_bar_height): + * xterm.c (x_delete_terminal, XSetIMValues): + * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame) + (x_implicitly_set_name, popup_activated) + (widget_store_internal_border): + Remove redundant decls. + * frame.c [USE_X_TOOLKIT]: Include widget.h. + * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit): + Remove _Noreturn, as make-docfile now does that for us. + * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile. + (Qregion_extract_function): New decl. + * window.c, xfns.c: Include menu.h. + 2014-06-17 Stefan Monnier * callint.c (Fcall_interactively): Fix up last change (bug#17701). === modified file 'src/commands.h' --- src/commands.h 2014-01-01 07:43:34 +0000 +++ src/commands.h 2014-06-17 16:09:19 +0000 @@ -39,7 +39,3 @@ /* Nonzero if input is coming from the keyboard. */ #define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) - -/* Set this nonzero to force reconsideration of mode line. */ - -extern int update_mode_lines; === modified file 'src/frame.c' --- src/frame.c 2014-06-10 05:28:00 +0000 +++ src/frame.c 2014-06-17 16:09:19 +0000 @@ -50,6 +50,9 @@ #include "msdos.h" #include "dosfns.h" #endif +#ifdef USE_X_TOOLKIT +#include "widget.h" +#endif #ifdef HAVE_NS Lisp_Object Qns_parse_geometry; === modified file 'src/frame.h' --- src/frame.h 2014-06-10 05:28:00 +0000 +++ src/frame.h 2014-06-17 16:09:19 +0000 @@ -1224,7 +1224,6 @@ extern Lisp_Object Qbuffer_predicate; extern Lisp_Object Qcursor_color, Qcursor_type; extern Lisp_Object Qfont; -extern Lisp_Object Qbackground_color, Qforeground_color; extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top; extern Lisp_Object Qinternal_border_width; extern Lisp_Object Qright_divider_width, Qbottom_divider_width; @@ -1325,7 +1324,6 @@ extern void x_make_frame_invisible (struct frame *f); extern void x_iconify_frame (struct frame *f); extern void x_set_frame_alpha (struct frame *f); -extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_activate_menubar (struct frame *); extern void x_real_positions (struct frame *, int *, int *); === modified file 'src/ftfont.c' --- src/ftfont.c 2014-01-23 12:18:08 +0000 +++ src/ftfont.c 2014-06-17 16:09:19 +0000 @@ -87,8 +87,6 @@ static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist); -Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object); - #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM)) static struct === modified file 'src/intervals.h' --- src/intervals.h 2014-01-21 02:28:57 +0000 +++ src/intervals.h 2014-06-17 16:09:19 +0000 @@ -278,10 +278,8 @@ extern Lisp_Object Qmodification_hooks; extern Lisp_Object Qcategory; extern Lisp_Object Qlocal_map; -extern Lisp_Object Qkeymap; /* Visual properties text (including strings) may have. */ -extern Lisp_Object Qfont; extern Lisp_Object Qinvisible, Qintangible; /* Sticky properties. */ === modified file 'src/keyboard.c' --- src/keyboard.c 2014-06-17 13:50:22 +0000 +++ src/keyboard.c 2014-06-17 16:09:19 +0000 @@ -356,7 +356,6 @@ static void recursive_edit_unwind (Lisp_Object buffer); static Lisp_Object command_loop (void); static Lisp_Object Qcommand_execute; -struct timespec timer_check (void); static void echo_now (void); static ptrdiff_t echo_length (void); @@ -1216,7 +1215,7 @@ xsignal1 (Quser_error, build_string (msg)); } -_Noreturn +/* _Noreturn will be added to prototype by make-docfile. */ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1227,7 +1226,7 @@ user_error ("No recursive edit is in progress"); } -_Noreturn +/* _Noreturn will be added to prototype by make-docfile. */ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", doc: /* Abort the command that requested this recursive edit or minibuffer input. */) (void) @@ -1314,14 +1313,11 @@ static int read_key_sequence (Lisp_Object *, int, Lisp_Object, bool, bool, bool, bool); -void safe_run_hooks (Lisp_Object); static void adjust_point_for_property (ptrdiff_t, bool); /* The last boundary auto-added to buffer-undo-list. */ Lisp_Object last_undo_boundary; -extern Lisp_Object Qregion_extract_function; - /* FIXME: This is wrong rather than test window-system, we should call a new set-selection, which will then dispatch to x-set-selection, or tty-set-selection, or w32-set-selection, ... */ === modified file 'src/lisp.h' --- src/lisp.h 2014-06-17 13:41:14 +0000 +++ src/lisp.h 2014-06-17 16:09:19 +0000 @@ -832,12 +832,13 @@ extern Lisp_Object Qbool_vector_p; extern Lisp_Object Qvector_or_char_table_p, Qwholenump; extern Lisp_Object Qwindow; -extern Lisp_Object Ffboundp (Lisp_Object); extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); /* Defined in emacs.c. */ -extern bool initialized; extern bool might_dump; +/* True means Emacs has already been initialized. + Used during startup to detect startup of dumped Emacs. */ +extern bool initialized; /* Defined in eval.c. */ extern Lisp_Object Qautoload; @@ -2681,7 +2682,6 @@ Lisp_Object fnname #else /* not _MSC_VER */ #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ - Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ static struct Lisp_Subr alignas (GCALIGNMENT) sname = \ { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ { .a ## maxargs = fnname }, \ @@ -3344,7 +3344,7 @@ } /* Defined in data.c. */ -extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; +extern Lisp_Object Qquote, Qunbound; extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; extern Lisp_Object Qerror, Qquit, Qargs_out_of_range; extern Lisp_Object Qvoid_variable, Qvoid_function; @@ -3355,26 +3355,18 @@ extern Lisp_Object Qtext_read_only; extern Lisp_Object Qinteractive_form; extern Lisp_Object Qcircular_list; -extern Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp; -extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; -extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; -extern Lisp_Object Qbuffer_or_string_p; +extern Lisp_Object Qsequencep; +extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p; extern Lisp_Object Qfboundp; -extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; extern Lisp_Object Qcdr; extern Lisp_Object Qrange_error, Qoverflow_error; -extern Lisp_Object Qfloatp; -extern Lisp_Object Qnumberp, Qnumber_or_marker_p; +extern Lisp_Object Qnumber_or_marker_p; extern Lisp_Object Qbuffer, Qinteger, Qsymbol; -extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; - -EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; - /* Defined in data.c. */ extern Lisp_Object indirect_function (Lisp_Object); extern Lisp_Object find_symbol_value (Lisp_Object); @@ -3421,7 +3413,6 @@ extern _Noreturn void args_out_of_range (Lisp_Object, Lisp_Object); extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object, Lisp_Object); -extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool); extern void syms_of_data (void); @@ -3440,7 +3431,6 @@ extern void syms_of_coding (void); /* Defined in character.c. */ -EXFUN (Fmax_char, 0) ATTRIBUTE_CONST; extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t); extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t); extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST; @@ -3454,9 +3444,6 @@ /* Structure forward declarations. */ struct charset; -/* Defined in composite.c. */ -extern void syms_of_composite (void); - /* Defined in syntax.c. */ extern void init_syntax_once (void); extern void syms_of_syntax (void); @@ -3464,7 +3451,6 @@ /* Defined in fns.c. */ extern Lisp_Object QCrehash_size, QCrehash_threshold; enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; -EXFUN (Fidentity, 1) ATTRIBUTE_CONST; extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); extern void sweep_weak_hash_tables (void); @@ -3497,7 +3483,6 @@ extern void syms_of_fns (void); /* Defined in floatfns.c. */ -extern double extract_float (Lisp_Object); extern void syms_of_floatfns (void); extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); @@ -3518,6 +3503,7 @@ /* Defined in insdel.c. */ extern Lisp_Object Qinhibit_modification_hooks; +extern Lisp_Object Qregion_extract_function; extern void move_gap_both (ptrdiff_t, ptrdiff_t); extern _Noreturn void buffer_overflow (void); extern void make_gap (ptrdiff_t); @@ -3570,18 +3556,16 @@ #endif extern Lisp_Object Vwindow_system; extern Lisp_Object sit_for (Lisp_Object, bool, int); -extern void init_display (void); -extern void syms_of_display (void); /* Defined in xdisp.c. */ extern Lisp_Object Qinhibit_point_motion_hooks; -extern Lisp_Object Qinhibit_redisplay, Qdisplay; +extern Lisp_Object Qinhibit_redisplay; extern Lisp_Object Qmenu_bar_update_hook; extern Lisp_Object Qwindow_scroll_functions; extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; -extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; +extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; extern Lisp_Object Qspace, Qcenter, QCalign_to; -extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow; +extern Lisp_Object Qbar, Qhbar, Qhollow; extern Lisp_Object Qleft_margin, Qright_margin; extern Lisp_Object QCdata, QCfile; extern Lisp_Object QCmap; @@ -3608,7 +3592,6 @@ extern void update_echo_area (void); extern void truncate_echo_area (ptrdiff_t); extern void redisplay (void); -extern void redisplay_preserve_echo_area (int); void set_frame_cursor_types (struct frame *, Lisp_Object); extern void syms_of_xdisp (void); @@ -3791,12 +3774,9 @@ /* Defined in chartab.c. */ extern Lisp_Object copy_char_table (Lisp_Object); -extern Lisp_Object char_table_ref (Lisp_Object, int); extern Lisp_Object char_table_ref_and_range (Lisp_Object, int, int *, int *); -extern void char_table_set (Lisp_Object, int, Lisp_Object); extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object); -extern int char_table_translate (Lisp_Object, int); extern void map_char_table (void (*) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object); @@ -3874,7 +3854,7 @@ } /* Defined in eval.c. */ -extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; +extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro; extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; extern Lisp_Object Qand_rest; extern Lisp_Object Vautoload_queue; @@ -4082,8 +4062,7 @@ extern struct kboard *echo_kboard; extern void cancel_echoing (void); extern Lisp_Object Qdisabled, QCfilter; -extern Lisp_Object Qup, Qdown, Qbottom; -extern Lisp_Object Qtop; +extern Lisp_Object Qup, Qdown; extern Lisp_Object last_undo_boundary; extern bool input_pending; extern Lisp_Object menu_bar_items (Lisp_Object); @@ -4115,7 +4094,6 @@ /* Defined in frame.c. */ extern Lisp_Object Qonly, Qnone; -extern Lisp_Object Qvisible; extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object); extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); @@ -4235,9 +4213,8 @@ Lisp_Object); extern void syms_of_undo (void); /* Defined in textprop.c. */ -extern Lisp_Object Qfont, Qmouse_face; +extern Lisp_Object Qmouse_face; extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; -extern Lisp_Object Qfront_sticky, Qrear_nonsticky; extern Lisp_Object Qminibuffer_prompt; extern void report_interval_modification (Lisp_Object, Lisp_Object); @@ -4260,7 +4237,6 @@ #endif extern void stuff_char (char c); extern void init_foreground_group (void); -extern void init_sigio (int); extern void sys_subshell (void); extern void sys_suspend (void); extern void discard_tty_input (void); @@ -4345,8 +4321,8 @@ #endif /* Defined in xfaces.c. */ -extern Lisp_Object Qdefault, Qtool_bar, Qfringe; -extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; +extern Lisp_Object Qdefault, Qfringe; +extern Lisp_Object Qscroll_bar, Qcursor; extern Lisp_Object Qmode_line_inactive; extern Lisp_Object Qface; extern Lisp_Object Qnormal; @@ -4405,10 +4381,6 @@ /* Defined in msdos.c, w32.c. */ extern char *emacs_root_dir (void); #endif /* DOS_NT */ - -/* True means Emacs has already been initialized. - Used during startup to detect startup of dumped Emacs. */ -extern bool initialized; /* True means ^G can quit instantly. */ extern bool immediate_quit; === modified file 'src/macros.c' --- src/macros.c 2014-02-09 01:48:47 +0000 +++ src/macros.c 2014-06-17 16:09:19 +0000 @@ -45,8 +45,6 @@ Lisp_Object executing_kbd_macro; -Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc); - DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P", doc: /* Record subsequent keyboard input, defining a keyboard macro. The commands are recorded even as they are executed. === modified file 'src/window.c' --- src/window.c 2014-06-06 14:37:05 +0000 +++ src/window.c 2014-06-17 16:09:19 +0000 @@ -27,6 +27,7 @@ #include "buffer.h" #include "keyboard.h" #include "keymap.h" +#include "menu.h" #include "frame.h" #include "window.h" #include "commands.h" === modified file 'src/xdisp.c' --- src/xdisp.c 2014-06-15 00:06:30 +0000 +++ src/xdisp.c 2014-06-17 16:09:19 +0000 @@ -12279,11 +12279,6 @@ #endif /* !USE_GTK && !HAVE_NS */ -#if defined USE_GTK || defined HAVE_NS -EXFUN (Ftool_bar_height, 2) ATTRIBUTE_CONST; -EXFUN (Ftool_bar_lines_needed, 1) ATTRIBUTE_CONST; -#endif - DEFUN ("tool-bar-height", Ftool_bar_height, Stool_bar_height, 0, 2, 0, doc: /* Return the number of lines occupied by the tool bar of FRAME. === modified file 'src/xfns.c' --- src/xfns.c 2014-05-27 06:35:54 +0000 +++ src/xfns.c 2014-06-17 16:09:19 +0000 @@ -24,6 +24,7 @@ #include "lisp.h" #include "xterm.h" +#include "menu.h" #include "frame.h" #include "window.h" #include "character.h" === modified file 'src/xterm.c' --- src/xterm.c 2014-06-17 03:40:29 +0000 +++ src/xterm.c 2014-06-17 16:09:19 +0000 @@ -226,7 +226,6 @@ static const XColor *x_color_cells (Display *, int *); static int x_io_error_quitter (Display *); static struct terminal *x_create_terminal (struct x_display_info *); -void x_delete_terminal (struct terminal *); static void x_update_end (struct frame *); static void XTframe_up_to_date (struct frame *); static void x_clear_frame (struct frame *); @@ -7859,11 +7858,6 @@ #endif /* HAVE_X11R6 */ -#ifdef HAVE_X11R6 -/* This isn't prototyped in OSF 5.0 or 5.1a. */ -extern char *XSetIMValues (XIM, ...); -#endif - /* Open the connection to the XIM server on display DPYINFO. RESOURCE_NAME is the resource name Emacs uses. */ @@ -9779,7 +9773,7 @@ else XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), f->output_data.x->current_cursor); - f->pointer_invisible = invisible; + f->pointer_invisible = invisible; } /* Setup pointer blanking, prefer Xfixes if available. */ @@ -10111,7 +10105,7 @@ XRenderQueryExtension (dpyinfo->display, &event_base, &error_base); - v = XGetDefault (dpyinfo->display, "Xft", "dpi"); + v = XGetDefault (dpyinfo->display, "Xft", "dpi"); if (v != NULL && sscanf (v, "%lf", &d) == 1) dpyinfo->resy = dpyinfo->resx = d; } @@ -10240,7 +10234,7 @@ 1, 0, 1); x_setup_pointer_blanking (dpyinfo); - + #ifdef HAVE_X_I18N xim_initialize (dpyinfo, resource_name); #endif @@ -10556,7 +10550,7 @@ terminal->menu_show_hook = x_menu_show; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) terminal->popup_dialog_hook = xw_popup_dialog; -#endif +#endif terminal->set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar; terminal->condemn_scroll_bars_hook = XTcondemn_scroll_bars; terminal->redeem_scroll_bar_hook = XTredeem_scroll_bar; === modified file 'src/xterm.h' --- src/xterm.h 2014-06-08 18:27:22 +0000 +++ src/xterm.h 2014-06-17 16:09:19 +0000 @@ -929,7 +929,6 @@ extern bool x_had_errors_p (Display *); extern void x_uncatch_errors (void); extern void x_clear_errors (Display *); -extern void x_set_window_size (struct frame *, int, int, int, bool); extern void xembed_request_focus (struct frame *); extern void x_ewmh_activate_frame (struct frame *); extern void x_delete_terminal (struct terminal *terminal); @@ -944,7 +943,6 @@ double, int); #endif extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); -extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int); #if !defined USE_X_TOOLKIT && !defined USE_GTK extern void x_mouse_leave (struct x_display_info *); @@ -991,16 +989,11 @@ extern void x_clipboard_manager_save_frame (Lisp_Object); extern void x_clipboard_manager_save_all (void); -/* Defined in xfns.c */ - -extern Lisp_Object x_get_focus_frame (struct frame *); - #ifdef USE_GTK extern int xg_set_icon (struct frame *, Lisp_Object); extern int xg_set_icon_from_xpm_data (struct frame *, const char **); #endif /* USE_GTK */ -extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); extern void xic_free_xfontset (struct frame *); extern void create_frame_xic (struct frame *); extern void destroy_frame_xic (struct frame *); @@ -1032,15 +1025,8 @@ extern void x_menu_set_in_use (int); #endif extern void x_menu_wait_for_event (void *data); -extern int popup_activated (void); extern void initialize_frame_menubar (struct frame *); -/* Defined in widget.c */ - -#ifdef USE_X_TOOLKIT -extern void widget_store_internal_border (Widget); -#endif - /* Defined in xsmfns.c */ #ifdef HAVE_X_SM extern void x_session_initialize (struct x_display_info *dpyinfo); ------------------------------------------------------------ revno: 117357 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17701 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2014-06-17 09:50:22 -0400 message: * src/callint.c (Fcall_interactively): Fix up last change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-17 13:41:14 +0000 +++ src/ChangeLog 2014-06-17 13:50:22 +0000 @@ -1,3 +1,7 @@ +2014-06-17 Stefan Monnier + + * callint.c (Fcall_interactively): Fix up last change (bug#17701). + 2014-06-17 Dmitry Antipov * fileio.c (Fread_file_name): Do not pass redundant args and ... === modified file 'src/callint.c' --- src/callint.c 2014-06-17 03:14:00 +0000 +++ src/callint.c 2014-06-17 13:50:22 +0000 @@ -535,7 +535,7 @@ { visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n")); if (strchr (SSDATA (visargs[1]), '%')) - callint_message = Fformat (i, visargs); + callint_message = Fformat (i - 1, visargs + 1); else callint_message = visargs[1]; === modified file 'src/editfns.c' --- src/editfns.c 2014-03-26 17:55:31 +0000 +++ src/editfns.c 2014-06-17 13:50:22 +0000 @@ -3600,7 +3600,7 @@ usage: (format STRING &rest OBJECTS) */) (ptrdiff_t nargs, Lisp_Object *args) { - ptrdiff_t n; /* The number of the next arg to substitute */ + ptrdiff_t n; /* The number of the next arg to substitute. */ char initial_buffer[4000]; char *buf = initial_buffer; ptrdiff_t bufsize = sizeof initial_buffer; === modified file 'src/keyboard.c' --- src/keyboard.c 2014-06-08 18:27:22 +0000 +++ src/keyboard.c 2014-06-17 13:50:22 +0000 @@ -3654,7 +3654,8 @@ *kbd_store_ptr = *event; ++kbd_store_ptr; #ifdef subprocesses - if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE/2 && ! kbd_on_hold_p ()) + if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE / 2 + && ! kbd_on_hold_p ()) { /* Don't read keyboard input until we have processed kbd_buffer. This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ @@ -7481,8 +7482,8 @@ { int i = menu_bar_items_index; if (i + 4 > ASIZE (menu_bar_items_vector)) - menu_bar_items_vector = - larger_vector (menu_bar_items_vector, 4, -1); + menu_bar_items_vector + = larger_vector (menu_bar_items_vector, 4, -1); /* Add this item. */ ASET (menu_bar_items_vector, i, Qnil); i++; ASET (menu_bar_items_vector, i, Qnil); i++; === modified file 'src/lread.c' --- src/lread.c 2014-04-22 07:04:34 +0000 +++ src/lread.c 2014-06-17 13:50:22 +0000 @@ -3850,7 +3850,7 @@ SET_SYMBOL_VAL (XSYMBOL (sym), sym); } - ptr = aref_addr (obarray, XINT(tem)); + ptr = aref_addr (obarray, XINT (tem)); if (SYMBOLP (*ptr)) set_symbol_next (sym, XSYMBOL (*ptr)); else ------------------------------------------------------------ revno: 117356 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-06-17 17:41:14 +0400 message: * lisp.h (STRING_COPYIN): Remove; unused. * ccl.c (Fccl_execute_on_string): * font.c (fon_intern_prop): Use make_specified_string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-17 03:40:29 +0000 +++ src/ChangeLog 2014-06-17 13:41:14 +0000 @@ -3,10 +3,13 @@ * fileio.c (Fread_file_name): Do not pass redundant args and ... * callint.c (read_file_name): ... convert to static here. * lisp.h (Fread_file_name): Do not EXFUN it. + (STRING_COPYIN): Remove; unused. * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ... (char_composable_p): ... static function. All users changed. * eval.c (toplevel): Remove redundant #include directives. * xterm.c (x_initialize): Add static to match prototype. + * ccl.c (Fccl_execute_on_string): + * font.c (fon_intern_prop): Use make_specified_string. 2014-06-16 Paul Eggert === modified file 'src/ccl.c' --- src/ccl.c 2014-01-01 07:43:34 +0000 +++ src/ccl.c 2014-06-17 13:41:14 +0000 @@ -2160,11 +2160,8 @@ ASET (status, i, make_number (ccl.reg[i])); ASET (status, 8, make_number (ccl.ic)); - if (NILP (unibyte_p)) - val = make_multibyte_string ((char *) outbuf, produced_chars, - outp - outbuf); - else - val = make_unibyte_string ((char *) outbuf, produced_chars); + val = make_specified_string ((const char *) outbuf, produced_chars, + outp - outbuf, NILP (unibyte_p)); xfree (outbuf); return val; === modified file 'src/font.c' --- src/font.c 2014-06-10 03:32:36 +0000 +++ src/font.c 2014-06-17 13:41:14 +0000 @@ -279,10 +279,8 @@ if (SYMBOLP (tem)) return tem; - if (len == nchars || len != nbytes) - tem = make_unibyte_string (str, len); - else - tem = make_multibyte_string (str, nchars, len); + tem = make_specified_string (str, nchars, len, + len != nchars && len == nbytes); return Fintern (tem, obarray); } === modified file 'src/lisp.h' --- src/lisp.h 2014-06-17 03:14:00 +0000 +++ src/lisp.h 2014-06-17 13:41:14 +0000 @@ -1197,12 +1197,6 @@ { XSTRING (string)->size = newsize; } -INLINE void -STRING_COPYIN (Lisp_Object string, ptrdiff_t index, char const *new, - ptrdiff_t count) -{ - memcpy (SDATA (string) + index, new, count); -} /* Header of vector-like objects. This documents the layout constraints on vectors and pseudovectors (objects of PVEC_xxx subtype). It also prevents ------------------------------------------------------------ revno: 117355 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-06-17 07:40:29 +0400 message: * eval.c (toplevel): Remove redundant #include directives. * xterm.c (x_initialize): Add static to match prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-17 03:14:00 +0000 +++ src/ChangeLog 2014-06-17 03:40:29 +0000 @@ -5,6 +5,8 @@ * lisp.h (Fread_file_name): Do not EXFUN it. * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ... (char_composable_p): ... static function. All users changed. + * eval.c (toplevel): Remove redundant #include directives. + * xterm.c (x_initialize): Add static to match prototype. 2014-06-16 Paul Eggert === modified file 'src/eval.c' --- src/eval.c 2014-02-10 09:48:17 +0000 +++ src/eval.c 2014-06-17 03:40:29 +0000 @@ -27,11 +27,6 @@ #include "commands.h" #include "keyboard.h" #include "dispextern.h" -#include "frame.h" /* For XFRAME. */ - -#if HAVE_X_WINDOWS -#include "xterm.h" -#endif /* Chain of condition and catch handlers currently in effect. */ === modified file 'src/xterm.c' --- src/xterm.c 2014-06-16 08:49:09 +0000 +++ src/xterm.c 2014-06-17 03:40:29 +0000 @@ -10568,7 +10568,7 @@ return terminal; } -void +static void x_initialize (void) { baud_rate = 19200;