diff options
| author | Joakim Verona | 2012-09-20 07:55:52 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-09-20 07:55:52 +0200 |
| commit | a461dd78ac7ce24cf64025ba7096187f6c58201b (patch) | |
| tree | e03df8c68ae9a5092ca5f94b2fd6bea089fc8b8f | |
| parent | 99def29614db90aa00e3334c062a81d2d5dc9495 (diff) | |
| parent | e4bce92acb1567a6377995d8d688b95358ec29cf (diff) | |
| download | emacs-a461dd78ac7ce24cf64025ba7096187f6c58201b.tar.gz emacs-a461dd78ac7ce24cf64025ba7096187f6c58201b.zip | |
stil not compiling
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | autogen/configure | 4 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/killing.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 4 | ||||
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/ChangeLog | 48 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 71 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 6 | ||||
| -rw-r--r-- | lisp/doc-view.el | 118 | ||||
| -rw-r--r-- | lisp/emacs-lisp/macroexp.el | 49 | ||||
| -rw-r--r-- | lisp/startup.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 321 | ||||
| -rw-r--r-- | src/frame.c | 97 | ||||
| -rw-r--r-- | src/nsfns.m | 13 | ||||
| -rw-r--r-- | src/w32inevt.c | 10 | ||||
| -rw-r--r-- | src/w32xfns.c | 132 |
17 files changed, 672 insertions, 219 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-09-19 Tassilo Horn <tsdh@gnu.org> | ||
| 2 | |||
| 3 | * doc/emacs/misc.texi (DocView Slicing): Document new slice from | ||
| 4 | BoundingBox feature. | ||
| 5 | |||
| 1 | 2012-09-18 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2012-09-18 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * configure.ac (HAVE_GTK): Mention if we use GTK2 or GTK3. | 8 | * configure.ac (HAVE_GTK): Mention if we use GTK2 or GTK3. |
diff --git a/autogen/configure b/autogen/configure index 4c6fa8b5cf7..3c53c7f1538 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -10567,6 +10567,7 @@ $as_echo "#define HAVE_GTK3 1" >>confdefs.h | |||
| 10567 | 10567 | ||
| 10568 | GTK_OBJ=emacsgtkfixed.o | 10568 | GTK_OBJ=emacsgtkfixed.o |
| 10569 | term_header=gtkutil.h | 10569 | term_header=gtkutil.h |
| 10570 | USE_GTK_TOOLKIT="GTK3" | ||
| 10570 | else | 10571 | else |
| 10571 | check_gtk2=yes | 10572 | check_gtk2=yes |
| 10572 | gtk3_pkg_errors="$GTK_PKG_ERRORS " | 10573 | gtk3_pkg_errors="$GTK_PKG_ERRORS " |
| @@ -10634,6 +10635,7 @@ $as_echo "no" >&6; } | |||
| 10634 | then | 10635 | then |
| 10635 | as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 | 10636 | as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 |
| 10636 | fi | 10637 | fi |
| 10638 | test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2" | ||
| 10637 | fi | 10639 | fi |
| 10638 | 10640 | ||
| 10639 | if test x"$pkg_check_gtk" = xyes; then | 10641 | if test x"$pkg_check_gtk" = xyes; then |
| @@ -24293,7 +24295,7 @@ fi | |||
| 24293 | #### It makes printing result more understandable as using GTK sets | 24295 | #### It makes printing result more understandable as using GTK sets |
| 24294 | #### toolkit_scroll_bars to yes by default. | 24296 | #### toolkit_scroll_bars to yes by default. |
| 24295 | if test "${HAVE_GTK}" = "yes"; then | 24297 | if test "${HAVE_GTK}" = "yes"; then |
| 24296 | USE_X_TOOLKIT=GTK | 24298 | USE_X_TOOLKIT="$USE_GTK_TOOLKIT" |
| 24297 | fi | 24299 | fi |
| 24298 | 24300 | ||
| 24299 | echo " | 24301 | echo " |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 35e635eec28..29c0b3cd1be 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-09-19 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * killing.texi (Yanking): Minor clarification (Bug#12469). | ||
| 4 | |||
| 1 | 2012-09-17 Chong Yidong <cyd@gnu.org> | 5 | 2012-09-17 Chong Yidong <cyd@gnu.org> |
| 2 | 6 | ||
| 3 | * building.texi (GDB User Interface Layout): Remove reference to | 7 | * building.texi (GDB User Interface Layout): Remove reference to |
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index a034c6168aa..1eb53d0d2ec 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi | |||
| @@ -289,7 +289,7 @@ e.g. @kbd{C-u 4 C-y} reinserts the fourth most recent kill. | |||
| 289 | 289 | ||
| 290 | On graphical displays, @kbd{C-y} first checks if another application | 290 | On graphical displays, @kbd{C-y} first checks if another application |
| 291 | has placed any text in the system clipboard more recently than the | 291 | has placed any text in the system clipboard more recently than the |
| 292 | last Emacs kill. If so, it inserts the text in the clipboard instead. | 292 | last Emacs kill. If so, it inserts the clipboard's text instead. |
| 293 | Thus, Emacs effectively treats ``cut'' or ``copy'' clipboard | 293 | Thus, Emacs effectively treats ``cut'' or ``copy'' clipboard |
| 294 | operations performed in other applications like Emacs kills, except | 294 | operations performed in other applications like Emacs kills, except |
| 295 | that they are not recorded in the kill ring. @xref{Cut and Paste}, | 295 | that they are not recorded in the kill ring. @xref{Cut and Paste}, |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 90072d19a69..5d7a51a01f5 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -411,6 +411,10 @@ m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to | |||
| 411 | select the slice. | 411 | select the slice. |
| 412 | @c ??? How does this work? | 412 | @c ??? How does this work? |
| 413 | 413 | ||
| 414 | The most convenient way is to set the optimal slice by using | ||
| 415 | BoundingBox information automatically determined from the document by | ||
| 416 | typing @kbd{s b} (@code{doc-view-set-slice-using-mouse}). | ||
| 417 | |||
| 414 | @findex doc-view-reset-slice | 418 | @findex doc-view-reset-slice |
| 415 | To cancel the selected slice, type @kbd{s r} | 419 | To cancel the selected slice, type @kbd{s r} |
| 416 | (@code{doc-view-reset-slice}). Then DocView shows the entire page | 420 | (@code{doc-view-reset-slice}). Then DocView shows the entire page |
| @@ -439,6 +439,9 @@ Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead. | |||
| 439 | 439 | ||
| 440 | ** Calendar | 440 | ** Calendar |
| 441 | 441 | ||
| 442 | *** You can customize the header text that appears above each calendar month. | ||
| 443 | See the variable `calendar-month-header'. | ||
| 444 | |||
| 442 | *** The calendars produced by cal-html include holidays. | 445 | *** The calendars produced by cal-html include holidays. |
| 443 | Customize cal-html-holidays to change this. | 446 | Customize cal-html-holidays to change this. |
| 444 | 447 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8036e819d4d..d2266f9952f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,47 @@ | |||
| 1 | 2012-09-19 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * dired-aux.el (dired-diff): Add (require 'diff) because | ||
| 4 | `diff-latest-backup-file' is not autoloaded. | ||
| 5 | (dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg | ||
| 6 | of `dired-get-filename' to t to not report error when there is | ||
| 7 | no default file on the current line. | ||
| 8 | |||
| 9 | 2012-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 10 | |||
| 11 | * emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from | ||
| 12 | macroexp--eval-if-compile. | ||
| 13 | (macroexp--funcall-and-return, macroexp--warn-and-return): New funs. | ||
| 14 | (macroexp--expand-all): Use them (bug#12371). | ||
| 15 | |||
| 16 | * doc-view.el (doc-view-guess-paper-size) | ||
| 17 | (doc-view-scale-bounding-box): Fix unbound `caddr'. | ||
| 18 | |||
| 19 | 2012-09-19 Tassilo Horn <tsdh@gnu.org> | ||
| 20 | |||
| 21 | New feature: set optimal slice from BoundingBox information. | ||
| 22 | * doc-view.el (doc-view-mode-map): Add keybinding. | ||
| 23 | (doc-view-menu): Add menu entry. | ||
| 24 | (doc-view-set-slice): Adapt docstring. | ||
| 25 | (doc-view-get-bounding-box, doc-view-guess-paper-size) | ||
| 26 | (doc-view-scale-bounding-box) | ||
| 27 | (doc-view-set-slice-from-bounding-box): New functions. | ||
| 28 | (doc-view-paper-sizes): New defvar. | ||
| 29 | |||
| 30 | 2012-09-19 Glenn Morris <rgm@gnu.org> | ||
| 31 | |||
| 32 | * emacs-lisp/macroexp.el (byte-compile-warn-obsolete) | ||
| 33 | (byte-compile-log-warning): Autoload. (Bug#12371) | ||
| 34 | |||
| 35 | * calendar/calendar.el (calendar-american-month-header) | ||
| 36 | (calendar-european-month-header, calendar-iso-month-header) | ||
| 37 | (calendar-month-header): New options. | ||
| 38 | (calendar-set-date-style): Set calendar-month-header. Redraw calendar. | ||
| 39 | (calendar-generate-month): Use calendar-month-header. (Bug#9510) | ||
| 40 | |||
| 41 | 2012-09-19 Jan Djärv <jan.h.d@swipnet.se> | ||
| 42 | |||
| 43 | * startup.el (command-line-ns-option-alist): Add -g and --geometry. | ||
| 44 | |||
| 1 | 2012-09-18 Juri Linkov <juri@jurta.org> | 45 | 2012-09-18 Juri Linkov <juri@jurta.org> |
| 2 | 46 | ||
| 3 | * dired-aux.el (dired-diff): Restore original functionality of | 47 | * dired-aux.el (dired-diff): Restore original functionality of |
| @@ -143,8 +187,8 @@ | |||
| 143 | (display-buffer-function): Mark as obsolete. | 187 | (display-buffer-function): Mark as obsolete. |
| 144 | 188 | ||
| 145 | * progmodes/compile.el (compilation-parse-errors): Accept list | 189 | * progmodes/compile.el (compilation-parse-errors): Accept list |
| 146 | values similar to font-lock-keywords (Bug#12136). Suggested by | 190 | values similar to font-lock-keywords (Bug#12136). |
| 147 | Oleksandr Manzyuk. | 191 | Suggested by Oleksandr Manzyuk. |
| 148 | (compilation-error-regexp-alist): Doc fix. | 192 | (compilation-error-regexp-alist): Doc fix. |
| 149 | 193 | ||
| 150 | 2012-09-15 Glenn Morris <rgm@gnu.org> | 194 | 2012-09-15 Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index cdbf8d7aa86..93ef440541e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -921,6 +921,64 @@ styles." | |||
| 921 | calendar-american-date-display-form) | 921 | calendar-american-date-display-form) |
| 922 | :group 'calendar) | 922 | :group 'calendar) |
| 923 | 923 | ||
| 924 | (defcustom calendar-american-month-header | ||
| 925 | '(propertize (format "%s %d" (calendar-month-name month) year) | ||
| 926 | 'font-lock-face 'font-lock-function-name-face) | ||
| 927 | "Default format for calendar month headings with the American date style. | ||
| 928 | Normally you should not customize this, but `calender-month-header'." | ||
| 929 | :group 'calendar | ||
| 930 | :risky t | ||
| 931 | :type 'sexp | ||
| 932 | :version "24.3") | ||
| 933 | |||
| 934 | (defcustom calendar-european-month-header | ||
| 935 | '(propertize (format "%s %d" (calendar-month-name month) year) | ||
| 936 | 'font-lock-face 'font-lock-function-name-face) | ||
| 937 | "Default format for calendar month headings with the European date style. | ||
| 938 | Normally you should not customize this, but `calender-month-header'." | ||
| 939 | :group 'calendar | ||
| 940 | :risky t | ||
| 941 | :type 'sexp | ||
| 942 | :version "24.3") | ||
| 943 | |||
| 944 | (defcustom calendar-iso-month-header | ||
| 945 | '(propertize (format "%d %s" year (calendar-month-name month)) | ||
| 946 | 'font-lock-face 'font-lock-function-name-face) | ||
| 947 | "Default format for calendar month headings with the ISO date style. | ||
| 948 | Normally you should not customize this, but `calender-month-header'." | ||
| 949 | :group 'calendar | ||
| 950 | :risky t | ||
| 951 | :type 'sexp | ||
| 952 | :version "24.3") | ||
| 953 | |||
| 954 | (defcustom calendar-month-header | ||
| 955 | (cond ((eq calendar-date-style 'iso) | ||
| 956 | calendar-iso-month-header) | ||
| 957 | ((eq calendar-date-style 'european) | ||
| 958 | calendar-european-month-header) | ||
| 959 | (t calendar-american-month-header)) | ||
| 960 | "Expression to evaluate to return the calendar month headings. | ||
| 961 | When this expression is evaluated, the variables MONTH and YEAR are | ||
| 962 | integers appropriate to the relevant month. The result is padded | ||
| 963 | to the width of `calendar-month-digit-width'. | ||
| 964 | |||
| 965 | For examples of three common styles, see `calendar-american-month-header', | ||
| 966 | `calendar-european-month-header', and `calendar-iso-month-header'. | ||
| 967 | |||
| 968 | Changing this variable without using customize has no effect on | ||
| 969 | pre-existing calendar windows." | ||
| 970 | :group 'calendar | ||
| 971 | :initialize 'custom-initialize-default | ||
| 972 | :risky t | ||
| 973 | :set (lambda (sym val) | ||
| 974 | (set sym val) | ||
| 975 | (calendar-redraw)) | ||
| 976 | :set-after '(calendar-date-style calendar-american-month-header | ||
| 977 | calendar-european-month-header | ||
| 978 | calendar-iso-month-header) | ||
| 979 | :type 'sexp | ||
| 980 | :version "24.3") | ||
| 981 | |||
| 924 | (defun calendar-set-date-style (style) | 982 | (defun calendar-set-date-style (style) |
| 925 | "Set the style of calendar and diary dates to STYLE (a symbol). | 983 | "Set the style of calendar and diary dates to STYLE (a symbol). |
| 926 | The valid styles are described in the documentation of `calendar-date-style'." | 984 | The valid styles are described in the documentation of `calendar-date-style'." |
| @@ -934,8 +992,11 @@ The valid styles are described in the documentation of `calendar-date-style'." | |||
| 934 | calendar-date-display-form | 992 | calendar-date-display-form |
| 935 | (symbol-value (intern-soft | 993 | (symbol-value (intern-soft |
| 936 | (format "calendar-%s-date-display-form" style))) | 994 | (format "calendar-%s-date-display-form" style))) |
| 995 | calendar-month-header | ||
| 996 | (symbol-value (intern-soft (format "calendar-%s-month-header" style))) | ||
| 937 | diary-date-forms | 997 | diary-date-forms |
| 938 | (symbol-value (intern-soft (format "diary-%s-date-forms" style)))) | 998 | (symbol-value (intern-soft (format "diary-%s-date-forms" style)))) |
| 999 | (calendar-redraw) | ||
| 939 | (calendar-update-mode-line)) | 1000 | (calendar-update-mode-line)) |
| 940 | 1001 | ||
| 941 | (defun european-calendar () | 1002 | (defun european-calendar () |
| @@ -1463,9 +1524,8 @@ line." | |||
| 1463 | (goto-char (point-min)) | 1524 | (goto-char (point-min)) |
| 1464 | (calendar-move-to-column indent) | 1525 | (calendar-move-to-column indent) |
| 1465 | (insert | 1526 | (insert |
| 1466 | (calendar-string-spread | 1527 | (calendar-string-spread (list calendar-month-header) |
| 1467 | (list (format "%s %d" (calendar-month-name month) year)) | 1528 | ?\s calendar-month-digit-width)) |
| 1468 | ?\s calendar-month-digit-width)) | ||
| 1469 | (calendar-ensure-newline) | 1529 | (calendar-ensure-newline) |
| 1470 | (calendar-insert-at-column indent calendar-intermonth-header trunc) | 1530 | (calendar-insert-at-column indent calendar-intermonth-header trunc) |
| 1471 | ;; Use the first two characters of each day to head the columns. | 1531 | ;; Use the first two characters of each day to head the columns. |
| @@ -2222,9 +2282,12 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." | |||
| 2222 | (- mon2 mon1))) | 2282 | (- mon2 mon1))) |
| 2223 | 2283 | ||
| 2224 | (defvar calendar-font-lock-keywords | 2284 | (defvar calendar-font-lock-keywords |
| 2285 | ;; Month and year. Not really needed now that calendar-month-header | ||
| 2286 | ;; contains propertize, and not correct for non-american forms | ||
| 2287 | ;; of that variable. | ||
| 2225 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) | 2288 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) |
| 2226 | " -?[0-9]+") | 2289 | " -?[0-9]+") |
| 2227 | . font-lock-function-name-face) ; month and year | 2290 | . font-lock-function-name-face) |
| 2228 | (,(regexp-opt | 2291 | (,(regexp-opt |
| 2229 | (list (substring (aref calendar-day-name-array 6) | 2292 | (list (substring (aref calendar-day-name-array 6) |
| 2230 | 0 calendar-day-header-width) | 2293 | 0 calendar-day-header-width) |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 7ba67050337..3d3fe491899 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -70,7 +70,7 @@ the string of command switches for the third argument of `diff'." | |||
| 70 | (interactive | 70 | (interactive |
| 71 | (let* ((current (dired-get-filename t)) | 71 | (let* ((current (dired-get-filename t)) |
| 72 | ;; Get the latest existing backup file. | 72 | ;; Get the latest existing backup file. |
| 73 | (oldf (diff-latest-backup-file current)) | 73 | (oldf (progn (require 'diff) (diff-latest-backup-file current))) |
| 74 | ;; Get the file at the mark. | 74 | ;; Get the file at the mark. |
| 75 | (file-at-mark (if (and transient-mark-mode mark-active) | 75 | (file-at-mark (if (and transient-mark-mode mark-active) |
| 76 | (save-excursion (goto-char (mark t)) | 76 | (save-excursion (goto-char (mark t)) |
| @@ -248,7 +248,7 @@ List has a form of (file-name full-file-name (attribute-list))." | |||
| 248 | ;; ARG describes which files to use, as in `dired-get-marked-files'. | 248 | ;; ARG describes which files to use, as in `dired-get-marked-files'. |
| 249 | (let* ((files (dired-get-marked-files t arg)) | 249 | (let* ((files (dired-get-marked-files t arg)) |
| 250 | ;; The source of default file attributes is the file at point. | 250 | ;; The source of default file attributes is the file at point. |
| 251 | (default-file (dired-get-filename t)) | 251 | (default-file (dired-get-filename t t)) |
| 252 | (default (when default-file | 252 | (default (when default-file |
| 253 | (cond ((eq op-symbol 'touch) | 253 | (cond ((eq op-symbol 'touch) |
| 254 | (format-time-string | 254 | (format-time-string |
| @@ -300,7 +300,7 @@ into the minibuffer." | |||
| 300 | (interactive "P") | 300 | (interactive "P") |
| 301 | (let* ((files (dired-get-marked-files t arg)) | 301 | (let* ((files (dired-get-marked-files t arg)) |
| 302 | ;; The source of default file attributes is the file at point. | 302 | ;; The source of default file attributes is the file at point. |
| 303 | (default-file (dired-get-filename t)) | 303 | (default-file (dired-get-filename t t)) |
| 304 | (modestr (when default-file | 304 | (modestr (when default-file |
| 305 | (nth 8 (file-attributes default-file)))) | 305 | (nth 8 (file-attributes default-file)))) |
| 306 | (default | 306 | (default |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 72b36feb1d8..65bf26e5eca 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. | 4 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. |
| 5 | ;; | 5 | ;; |
| 6 | ;; Author: Tassilo Horn <tassilo@member.fsf.org> | 6 | ;; Author: Tassilo Horn <tsdh@gnu.org> |
| 7 | ;; Maintainer: Tassilo Horn <tassilo@member.fsf.org> | 7 | ;; Maintainer: Tassilo Horn <tsdh@gnu.org> |
| 8 | ;; Keywords: files, pdf, ps, dvi | 8 | ;; Keywords: files, pdf, ps, dvi |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -57,16 +57,21 @@ | |||
| 57 | ;; pages won't be displayed before conversion of the document finished | 57 | ;; pages won't be displayed before conversion of the document finished |
| 58 | ;; completely. | 58 | ;; completely. |
| 59 | ;; | 59 | ;; |
| 60 | ;; DocView lets you select a slice of the displayed pages. This slice will be | 60 | ;; DocView lets you select a slice of the displayed pages. This slice |
| 61 | ;; remembered and applied to all pages of the current document. This enables | 61 | ;; will be remembered and applied to all pages of the current |
| 62 | ;; you to cut away the margins of a document to save some space. To select a | 62 | ;; document. This enables you to cut away the margins of a document |
| 63 | ;; slice you can use `doc-view-set-slice' (bound to `s s') which will query you | 63 | ;; to save some space. To select a slice you can use |
| 64 | ;; for the coordinates of the slice's top-left corner and its width and height. | 64 | ;; `doc-view-set-slice' (bound to `s s') which will query you for the |
| 65 | ;; A much more convenient way to do the same is offered by the command | 65 | ;; coordinates of the slice's top-left corner and its width and |
| 66 | ;; `doc-view-set-slice-using-mouse' (bound to `s m'). After invocation you | 66 | ;; height. A much more convenient way to do the same is offered by |
| 67 | ;; only have to press mouse-1 at the top-left corner and drag it to the | 67 | ;; the command `doc-view-set-slice-using-mouse' (bound to `s m'). |
| 68 | ;; bottom-right corner of the desired slice. To reset the slice use | 68 | ;; After invocation you only have to press mouse-1 at the top-left |
| 69 | ;; `doc-view-reset-slice' (bound to `s r'). | 69 | ;; corner and drag it to the bottom-right corner of the desired slice. |
| 70 | ;; Even more accurate and convenient is to use | ||
| 71 | ;; `doc-view-set-slice-from-bounding-box' (bound to `s b') which uses | ||
| 72 | ;; the BoundingBox information of the current page to set an optimal | ||
| 73 | ;; slice. To reset the slice use `doc-view-reset-slice' (bound to `s | ||
| 74 | ;; r'). | ||
| 70 | ;; | 75 | ;; |
| 71 | ;; You can also search within the document. The command `doc-view-search' | 76 | ;; You can also search within the document. The command `doc-view-search' |
| 72 | ;; (bound to `C-s') queries for a search regexp and initializes a list of all | 77 | ;; (bound to `C-s') queries for a search regexp and initializes a list of all |
| @@ -103,7 +108,6 @@ | |||
| 103 | ;; - share more code with image-mode. | 108 | ;; - share more code with image-mode. |
| 104 | ;; - better menu. | 109 | ;; - better menu. |
| 105 | ;; - Bind slicing to a drag event. | 110 | ;; - Bind slicing to a drag event. |
| 106 | ;; - doc-view-fit-doc-to-window and doc-view-fit-window-to-doc? | ||
| 107 | ;; - zoom the region around the cursor (like xdvi). | 111 | ;; - zoom the region around the cursor (like xdvi). |
| 108 | ;; - get rid of the silly arrow in the fringe. | 112 | ;; - get rid of the silly arrow in the fringe. |
| 109 | ;; - improve anti-aliasing (pdf-utils gets it better). | 113 | ;; - improve anti-aliasing (pdf-utils gets it better). |
| @@ -340,6 +344,7 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 340 | ;; Slicing the image | 344 | ;; Slicing the image |
| 341 | (define-key map (kbd "s s") 'doc-view-set-slice) | 345 | (define-key map (kbd "s s") 'doc-view-set-slice) |
| 342 | (define-key map (kbd "s m") 'doc-view-set-slice-using-mouse) | 346 | (define-key map (kbd "s m") 'doc-view-set-slice-using-mouse) |
| 347 | (define-key map (kbd "s b") 'doc-view-set-slice-from-bounding-box) | ||
| 343 | (define-key map (kbd "s r") 'doc-view-reset-slice) | 348 | (define-key map (kbd "s r") 'doc-view-reset-slice) |
| 344 | ;; Searching | 349 | ;; Searching |
| 345 | (define-key map (kbd "C-s") 'doc-view-search) | 350 | (define-key map (kbd "C-s") 'doc-view-search) |
| @@ -381,6 +386,7 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 381 | ) | 386 | ) |
| 382 | "---" | 387 | "---" |
| 383 | ["Set Slice" doc-view-set-slice-using-mouse] | 388 | ["Set Slice" doc-view-set-slice-using-mouse] |
| 389 | ["Set Slice (BoundingBox)" doc-view-set-slice-from-bounding-box] | ||
| 384 | ["Set Slice (manual)" doc-view-set-slice] | 390 | ["Set Slice (manual)" doc-view-set-slice] |
| 385 | ["Reset Slice" doc-view-reset-slice] | 391 | ["Reset Slice" doc-view-reset-slice] |
| 386 | "---" | 392 | "---" |
| @@ -991,8 +997,9 @@ You can use this function to tell doc-view not to display the | |||
| 991 | margins of the document. It prompts for the top-left corner (X | 997 | margins of the document. It prompts for the top-left corner (X |
| 992 | and Y) of the slice to display and its WIDTH and HEIGHT. | 998 | and Y) of the slice to display and its WIDTH and HEIGHT. |
| 993 | 999 | ||
| 994 | See `doc-view-set-slice-using-mouse' for a more convenient way to | 1000 | See `doc-view-set-slice-using-mouse' and |
| 995 | do that. To reset the slice use `doc-view-reset-slice'." | 1001 | `doc-view-set-slice-from-bounding-box' for more convenient ways |
| 1002 | to do that. To reset the slice use `doc-view-reset-slice'." | ||
| 996 | (interactive | 1003 | (interactive |
| 997 | (let* ((size (image-size (doc-view-current-image) t)) | 1004 | (let* ((size (image-size (doc-view-current-image) t)) |
| 998 | (a (read-number (format "Top-left X (0..%d): " (car size)))) | 1005 | (a (read-number (format "Top-left X (0..%d): " (car size)))) |
| @@ -1023,6 +1030,79 @@ dragging it to its bottom-right corner. See also | |||
| 1023 | (setq done t)))) | 1030 | (setq done t)))) |
| 1024 | (doc-view-set-slice x y w h))) | 1031 | (doc-view-set-slice x y w h))) |
| 1025 | 1032 | ||
| 1033 | (defun doc-view-get-bounding-box () | ||
| 1034 | "Get the BoundingBox information of the current page." | ||
| 1035 | (let* ((page (doc-view-current-page)) | ||
| 1036 | (o (shell-command-to-string | ||
| 1037 | (concat doc-view-ghostscript-program | ||
| 1038 | " -dSAFER -dBATCH -dNOPAUSE -q -sDEVICE=bbox " | ||
| 1039 | (format "-dFirstPage=%s -dLastPage=%s %s" | ||
| 1040 | page page | ||
| 1041 | doc-view-buffer-file-name))))) | ||
| 1042 | (save-match-data | ||
| 1043 | (when (string-match (concat "%%BoundingBox: " | ||
| 1044 | "\\([[:digit:]]+\\) \\([[:digit:]]+\\) " | ||
| 1045 | "\\([[:digit:]]+\\) \\([[:digit:]]+\\)") o) | ||
| 1046 | (mapcar #'string-to-number | ||
| 1047 | (list (match-string 1 o) | ||
| 1048 | (match-string 2 o) | ||
| 1049 | (match-string 3 o) | ||
| 1050 | (match-string 4 o))))))) | ||
| 1051 | |||
| 1052 | (defvar doc-view-paper-sizes | ||
| 1053 | '((a4 595 842) | ||
| 1054 | (a4-landscape 842 595) | ||
| 1055 | (letter 612 792) | ||
| 1056 | (letter-landscape 792 612) | ||
| 1057 | (legal 612 1008) | ||
| 1058 | (legal-landscape 1008 612) | ||
| 1059 | (a3 842 1191) | ||
| 1060 | (a3-landscape 1191 842) | ||
| 1061 | (tabloid 792 1224) | ||
| 1062 | (ledger 1224 792)) | ||
| 1063 | "An alist from paper size names to dimensions.") | ||
| 1064 | |||
| 1065 | (defun doc-view-guess-paper-size (iw ih) | ||
| 1066 | "Guess the paper size according to the aspect ratio." | ||
| 1067 | (cl-labels ((div (x y) | ||
| 1068 | (round (/ (* 100.0 x) y)))) | ||
| 1069 | (let ((ar (div iw ih)) | ||
| 1070 | (al (mapcar (lambda (l) | ||
| 1071 | (list (div (nth 1 l) (nth 2 l)) (car l))) | ||
| 1072 | doc-view-paper-sizes))) | ||
| 1073 | (cadr (assoc ar al))))) | ||
| 1074 | |||
| 1075 | (defun doc-view-scale-bounding-box (ps iw ih bb) | ||
| 1076 | (list (/ (* (nth 0 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes))) | ||
| 1077 | (/ (* (nth 1 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes))) | ||
| 1078 | (/ (* (nth 2 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes))) | ||
| 1079 | (/ (* (nth 3 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes))))) | ||
| 1080 | |||
| 1081 | (defun doc-view-set-slice-from-bounding-box (&optional force-paper-size) | ||
| 1082 | "Set the slice from the document's BoundingBox information. | ||
| 1083 | The result is that the margins are almost completely cropped, | ||
| 1084 | much more accurate than could be done manually using | ||
| 1085 | `doc-view-set-slice-using-mouse'." | ||
| 1086 | (interactive "P") | ||
| 1087 | (let ((bb (doc-view-get-bounding-box))) | ||
| 1088 | (if (not bb) | ||
| 1089 | (message "BoundingBox couldn't be determined") | ||
| 1090 | (let* ((is (image-size (doc-view-current-image) t)) | ||
| 1091 | (iw (car is)) | ||
| 1092 | (ih (cdr is)) | ||
| 1093 | (ps (or (and (null force-paper-size) (doc-view-guess-paper-size iw ih)) | ||
| 1094 | (intern (completing-read "Paper size: " | ||
| 1095 | (mapcar #'car doc-view-paper-sizes) | ||
| 1096 | nil t)))) | ||
| 1097 | (bb (doc-view-scale-bounding-box ps iw ih bb)) | ||
| 1098 | (x1 (nth 0 bb)) | ||
| 1099 | (y1 (nth 1 bb)) | ||
| 1100 | (x2 (nth 2 bb)) | ||
| 1101 | (y2 (nth 3 bb))) | ||
| 1102 | ;; We keep a 2 pixel margin. | ||
| 1103 | (doc-view-set-slice (- x1 2) (- ih y2 2) | ||
| 1104 | (+ (- x2 x1) 4) (+ (- y2 y1) 4)))))) | ||
| 1105 | |||
| 1026 | (defun doc-view-reset-slice () | 1106 | (defun doc-view-reset-slice () |
| 1027 | "Reset the current slice. | 1107 | "Reset the current slice. |
| 1028 | After calling this function whole pages will be visible again." | 1108 | After calling this function whole pages will be visible again." |
| @@ -1095,7 +1175,9 @@ have the page we want to view." | |||
| 1095 | "page-[0-9]+\\.png" t) | 1175 | "page-[0-9]+\\.png" t) |
| 1096 | 'doc-view-sort)) | 1176 | 'doc-view-sort)) |
| 1097 | (dolist (win (or (get-buffer-window-list buffer nil t) | 1177 | (dolist (win (or (get-buffer-window-list buffer nil t) |
| 1098 | (list (selected-window)))) | 1178 | (list (let ((w (selected-window))) |
| 1179 | (set-window-buffer w buffer) | ||
| 1180 | w)))) | ||
| 1099 | (let* ((page (doc-view-current-page win)) | 1181 | (let* ((page (doc-view-current-page win)) |
| 1100 | (pagefile (expand-file-name (format "page-%d.png" page) | 1182 | (pagefile (expand-file-name (format "page-%d.png" page) |
| 1101 | (doc-view-current-cache-dir)))) | 1183 | (doc-view-current-cache-dir)))) |
| @@ -1103,8 +1185,8 @@ have the page we want to view." | |||
| 1103 | (and (not (member pagefile prev-pages)) | 1185 | (and (not (member pagefile prev-pages)) |
| 1104 | (member pagefile doc-view-current-files))) | 1186 | (member pagefile doc-view-current-files))) |
| 1105 | (with-selected-window win | 1187 | (with-selected-window win |
| 1106 | (cl-assert (eq (current-buffer) buffer)) | 1188 | (cl-assert (eq (current-buffer) buffer) t) |
| 1107 | (doc-view-goto-page page)))))))) | 1189 | (doc-view-goto-page page)))))))) |
| 1108 | 1190 | ||
| 1109 | (defun doc-view-buffer-message () | 1191 | (defun doc-view-buffer-message () |
| 1110 | ;; Only show this message initially, not when refreshing the buffer (in which | 1192 | ;; Only show this message initially, not when refreshing the buffer (in which |
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 394225d697e..6a84be06728 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el | |||
| @@ -100,17 +100,35 @@ each clause." | |||
| 100 | (error (message "Compiler-macro error for %S: %S" (car form) err) | 100 | (error (message "Compiler-macro error for %S: %S" (car form) err) |
| 101 | form))) | 101 | form))) |
| 102 | 102 | ||
| 103 | (defun macroexp--eval-if-compile (&rest _forms) | 103 | (defun macroexp--funcall-if-compiled (_form) |
| 104 | "Pseudo function used internally by macroexp to delay warnings. | 104 | "Pseudo function used internally by macroexp to delay warnings. |
| 105 | The purpose is to delay warnings to bytecomp.el, so they can use things | 105 | The purpose is to delay warnings to bytecomp.el, so they can use things |
| 106 | like `byte-compile-log-warning' to get better file-and-line-number data | 106 | like `byte-compile-log-warning' to get better file-and-line-number data |
| 107 | and also to avoid outputting the warning during normal execution." | 107 | and also to avoid outputting the warning during normal execution." |
| 108 | nil) | 108 | nil) |
| 109 | (put 'macroexp--eval-if-compile 'byte-compile | 109 | (put 'macroexp--funcall-if-compiled 'byte-compile |
| 110 | (lambda (form) | 110 | (lambda (form) |
| 111 | (mapc (lambda (x) (funcall (eval x))) (cdr form)) | 111 | (funcall (eval (cadr form))) |
| 112 | (byte-compile-constant nil))) | 112 | (byte-compile-constant nil))) |
| 113 | 113 | ||
| 114 | (defun macroexp--funcall-and-return (when-compiled when-interpreted form) | ||
| 115 | ;; FIXME: ¡¡Major Ugly Hack!! To determine whether the output of this | ||
| 116 | ;; macro-expansion will be processed by the byte-compiler, we check | ||
| 117 | ;; circumstantial evidence. | ||
| 118 | (if (member '(declare-function . byte-compile-macroexpand-declare-function) | ||
| 119 | macroexpand-all-environment) | ||
| 120 | `(progn | ||
| 121 | (macroexp--funcall-if-compiled ',when-compiled) | ||
| 122 | ,form) | ||
| 123 | (funcall when-interpreted) | ||
| 124 | form)) | ||
| 125 | |||
| 126 | (defun macroexp--warn-and-return (msg form) | ||
| 127 | (macroexp--funcall-and-return | ||
| 128 | (lambda () (byte-compile-log-warning msg t)) | ||
| 129 | (lambda () (message "%s" msg)) | ||
| 130 | form)) | ||
| 131 | |||
| 114 | (defun macroexp--expand-all (form) | 132 | (defun macroexp--expand-all (form) |
| 115 | "Expand all macros in FORM. | 133 | "Expand all macros in FORM. |
| 116 | This is an internal version of `macroexpand-all'. | 134 | This is an internal version of `macroexpand-all'. |
| @@ -130,9 +148,10 @@ Assumes the caller has bound `macroexpand-all-environment'." | |||
| 130 | (car-safe form) | 148 | (car-safe form) |
| 131 | (symbolp (car form)) | 149 | (symbolp (car form)) |
| 132 | (get (car form) 'byte-obsolete-info)) | 150 | (get (car form) 'byte-obsolete-info)) |
| 133 | `(progn (macroexp--eval-if-compile | 151 | (macroexp--funcall-and-return |
| 134 | (lambda () (byte-compile-warn-obsolete ',(car form)))) | 152 | (lambda () (byte-compile-warn-obsolete ',(car form))) |
| 135 | ,new-form) | 153 | #'ignore ;FIXME: We should `message' something. |
| 154 | new-form) | ||
| 136 | new-form))) | 155 | new-form))) |
| 137 | (pcase form | 156 | (pcase form |
| 138 | (`(cond . ,clauses) | 157 | (`(cond . ,clauses) |
| @@ -175,26 +194,16 @@ Assumes the caller has bound `macroexpand-all-environment'." | |||
| 175 | ;; First arg is a function: | 194 | ;; First arg is a function: |
| 176 | (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc)) | 195 | (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc)) |
| 177 | ',(and f `(lambda . ,_)) . ,args) | 196 | ',(and f `(lambda . ,_)) . ,args) |
| 178 | (byte-compile-log-warning | 197 | (macroexp--warn-and-return |
| 179 | (format "%s quoted with ' rather than with #'" | 198 | (format "%s quoted with ' rather than with #'" |
| 180 | (list 'lambda (nth 1 f) '...)) | 199 | (list 'lambda (nth 1 f) '...)) |
| 181 | t) | 200 | (macroexp--expand-all `(,fun ,f . ,args)))) |
| 182 | ;; We don't use `macroexp--cons' since there's clearly a change. | ||
| 183 | (cons fun | ||
| 184 | (cons (macroexp--expand-all (list 'function f)) | ||
| 185 | (macroexp--all-forms args)))) | ||
| 186 | ;; Second arg is a function: | 201 | ;; Second arg is a function: |
| 187 | (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args) | 202 | (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args) |
| 188 | (byte-compile-log-warning | 203 | (macroexp--warn-and-return |
| 189 | (format "%s quoted with ' rather than with #'" | 204 | (format "%s quoted with ' rather than with #'" |
| 190 | (list 'lambda (nth 1 f) '...)) | 205 | (list 'lambda (nth 1 f) '...)) |
| 191 | t) | 206 | (macroexp--expand-all `(,fun ,arg1 ,f . ,args)))) |
| 192 | ;; We don't use `macroexp--cons' since there's clearly a change. | ||
| 193 | (cons fun | ||
| 194 | (cons (macroexp--expand-all arg1) | ||
| 195 | (cons (macroexp--expand-all | ||
| 196 | (list 'function f)) | ||
| 197 | (macroexp--all-forms args))))) | ||
| 198 | (`(,func . ,_) | 207 | (`(,func . ,_) |
| 199 | ;; Macro expand compiler macros. This cannot be delayed to | 208 | ;; Macro expand compiler macros. This cannot be delayed to |
| 200 | ;; byte-optimize-form because the output of the compiler-macro can | 209 | ;; byte-optimize-form because the output of the compiler-macro can |
diff --git a/lisp/startup.el b/lisp/startup.el index db5efb89eed..243c9621752 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -216,8 +216,8 @@ and VALUE is the value which is given to that frame parameter | |||
| 216 | ("-fn" 1 x-handle-switch font) | 216 | ("-fn" 1 x-handle-switch font) |
| 217 | ("-font" 1 x-handle-switch font) | 217 | ("-font" 1 x-handle-switch font) |
| 218 | ("-ib" 1 x-handle-numeric-switch internal-border-width) | 218 | ("-ib" 1 x-handle-numeric-switch internal-border-width) |
| 219 | ;;("-g" . x-handle-geometry) | 219 | ("-g" 1 x-handle-geometry) |
| 220 | ;;("-geometry" . x-handle-geometry) | 220 | ("-geometry" 1 x-handle-geometry) |
| 221 | ("-fg" 1 x-handle-switch foreground-color) | 221 | ("-fg" 1 x-handle-switch foreground-color) |
| 222 | ("-foreground" 1 x-handle-switch foreground-color) | 222 | ("-foreground" 1 x-handle-switch foreground-color) |
| 223 | ("-bg" 1 x-handle-switch background-color) | 223 | ("-bg" 1 x-handle-switch background-color) |
diff --git a/src/ChangeLog b/src/ChangeLog index 8b47c52c23f..e8827c2de18 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,294 @@ | |||
| 1 | 2012-09-19 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0. | ||
| 4 | Ignore 'expected'. See Eli Zaretskii in | ||
| 5 | <http://bugs.gnu.org/12471#8> (last line). | ||
| 6 | |||
| 7 | * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul. | ||
| 8 | (XParseGeometry): Now static. Substitute extremal values for | ||
| 9 | values that are out of range. | ||
| 10 | |||
| 11 | 2012-09-19 Jan Djärv <jan.h.d@swipnet.se> | ||
| 12 | |||
| 13 | * w32xfns.c (read_integer, XParseGeometry): Move to frame.c. | ||
| 14 | |||
| 15 | * nsfns.m (XParseGeometry): Remove. | ||
| 16 | (Fx_create_frame): Call x_set_offset to correctly interpret | ||
| 17 | top_pos in geometry. | ||
| 18 | |||
| 19 | * frame.c (read_integer, XParseGeometry): Moved from w32xfns.c. | ||
| 20 | (Fx_parse_geometry): If there is a space in string, call | ||
| 21 | Qns_parse_geometry, otherwise do as on other terms (Bug#12368). | ||
| 22 | |||
| 23 | 2012-09-17 Eli Zaretskii <eliz@gnu.org> | ||
| 24 | |||
| 25 | * search.c (scan_buffer): Use character positions in calls to | ||
| 26 | region_cache_forward and region_cache_backward, not byte | ||
| 27 | positions. (Bug#12196) | ||
| 28 | |||
| 29 | * w32term.c (w32_read_socket): Set pending_signals to 1, like | ||
| 30 | xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>. | ||
| 31 | |||
| 32 | * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize | ||
| 33 | __malloc_extra_blocks to 32 instead of 64, like alloc.c did in | ||
| 34 | emacs_blocked_malloc, now deleted. | ||
| 35 | |||
| 36 | 2012-09-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 37 | |||
| 38 | Remove no-longer-needed Solaris 2.4 vfork bug workaround. | ||
| 39 | The workaround was for improving performance on Solaris 2.4, but | ||
| 40 | is getting in the way now. Emacs will still work if someone is | ||
| 41 | still running Solaris 2.4 in a museum somewhere; Sun dropped | ||
| 42 | support for Solaris 2.4 in 2003. | ||
| 43 | * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]: | ||
| 44 | * process.c (create_process) [HAVE_WORKING_VFORK]: | ||
| 45 | Omit now-unnecessary workaround for the Solaris 2.4 vfork bug, | ||
| 46 | since Emacs no longer uses vfork on that platform. | ||
| 47 | |||
| 48 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 49 | |||
| 50 | * emacs.c: Use COPYRIGHT. | ||
| 51 | |||
| 52 | 2012-09-16 Paul Eggert <eggert@cs.ucla.edu> | ||
| 53 | |||
| 54 | Remove configure's --without-sync-input option (Bug#12450). | ||
| 55 | When auditing signal-handling in preparation for cleaning it up, | ||
| 56 | I found that SYNC_INPUT has race conditions and would be a real | ||
| 57 | pain to fix. Since it's an undocumented and deprecated | ||
| 58 | configure-time option, now seems like a good time to remove it. | ||
| 59 | Also see <http://bugs.gnu.org/11080#16>. | ||
| 60 | * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal) | ||
| 61 | (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls. | ||
| 62 | (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: | ||
| 63 | (malloc_hysteresis): | ||
| 64 | (check_depth) [XMALLOC_OVERRUN_CHECK]: | ||
| 65 | (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): | ||
| 66 | (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED) | ||
| 67 | (dont_register_blocks, bytes_used_when_reconsidered) | ||
| 68 | (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) | ||
| 69 | (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): | ||
| 70 | [!SYSTEM_MALLOC && !SYNC_INPUT]: | ||
| 71 | Remove. All uses removed. | ||
| 72 | (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different | ||
| 73 | implementation, one that depends on whether the new macro | ||
| 74 | XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT | ||
| 75 | is defined. | ||
| 76 | * atimer.c (run_timers, handle_alarm_signal): | ||
| 77 | * keyboard.c (pending_signal, poll_for_input_1, poll_for_input) | ||
| 78 | (handle_async_input, process_pending_signals) | ||
| 79 | (handle_input_available_signal, init_keyboard): | ||
| 80 | * nsterm.m (ns_read_socket): | ||
| 81 | * process.c (wait_reading_process_output): | ||
| 82 | * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK): | ||
| 83 | * sysdep.c (emacs_sigaction_init) [SA_RESTART]: | ||
| 84 | (emacs_write): | ||
| 85 | * xterm.c (XTread_socket): | ||
| 86 | Assume SYNC_INPUT. | ||
| 87 | * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef. | ||
| 88 | * eval.c (handling_signal): Remove. All uses removed. | ||
| 89 | * lisp.h (ELSE_PENDING_SIGNALS): Remove. | ||
| 90 | All uses replaced with the SYNC_INPUT version. | ||
| 91 | (reset_malloc_hooks, uninterrupt_malloc, handling_signal): | ||
| 92 | Remove decls. | ||
| 93 | * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: | ||
| 94 | Now static. | ||
| 95 | |||
| 96 | * font.c (Ffont_shape_gstring): Remove unused local. | ||
| 97 | |||
| 98 | 2012-09-16 Glenn Morris <rgm@gnu.org> | ||
| 99 | |||
| 100 | * Makefile.in (clean): No longer run nextstep's clean. | ||
| 101 | |||
| 102 | * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables. | ||
| 103 | (ns_frag): Remove. | ||
| 104 | (ns-app): Move here from ns.mk, and simplify. | ||
| 105 | (clean): Simplify nextstep entry. | ||
| 106 | * ns.mk: Remove file. | ||
| 107 | |||
| 108 | 2012-09-16 Kenichi Handa <handa@gnu.org> | ||
| 109 | |||
| 110 | * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may | ||
| 111 | not covert the last few charactes. | ||
| 112 | |||
| 113 | 2012-09-16 Kenichi Handa <handa@gnu.org> | ||
| 114 | |||
| 115 | * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster | ||
| 116 | here, but just check the validity of glyphs in the glyph-string. | ||
| 117 | |||
| 118 | 2012-09-16 Martin Rudalics <rudalics@gmx.at> | ||
| 119 | |||
| 120 | * window.c (Fwindow_parameter, Fset_window_parameter): Accept | ||
| 121 | any window as argument (Bug#12452). | ||
| 122 | |||
| 123 | 2012-09-16 Jan Djärv <jan.h.d@swipnet.se> | ||
| 124 | |||
| 125 | * nsfns.m (Fx_open_connection): Move initialization of ns_*_types | ||
| 126 | to ns_term_init to avoid memory leak. | ||
| 127 | |||
| 128 | * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use | ||
| 129 | explicit retain/release. | ||
| 130 | (ns_term_init): Only allow one display. Initialize outerpool and | ||
| 131 | ns_*_types. | ||
| 132 | |||
| 133 | 2012-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 134 | |||
| 135 | Port _setjmp fix to POSIXish hosts as well as Microsoft. | ||
| 136 | * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as | ||
| 137 | it's needed on POSIXish hosts that lack _setjmp. Attempt to solve | ||
| 138 | the Microsoft problem in a different way, by altering ../nt/config.nt. | ||
| 139 | |||
| 140 | 2012-09-15 Eli Zaretskii <eliz@gnu.org> | ||
| 141 | |||
| 142 | * w32xfns.c: | ||
| 143 | * w32uniscribe.c: | ||
| 144 | * w32term.c: | ||
| 145 | * w32select.c: | ||
| 146 | * w32reg.c: | ||
| 147 | * w32proc.c: | ||
| 148 | * w32menu.c: | ||
| 149 | * w32inevt.c: | ||
| 150 | * w32heap.c: | ||
| 151 | * w32font.c: | ||
| 152 | * w32fns.c: | ||
| 153 | * w32console.c: | ||
| 154 | * w32.c: | ||
| 155 | * w16select.c: Remove inclusion of setjmp.h, as it is now included | ||
| 156 | by lisp.h. This completes removal of setjmp.h inclusion | ||
| 157 | erroneously announced in the previous commit. (Bug#12446) | ||
| 158 | |||
| 159 | * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary | ||
| 160 | more accurate. | ||
| 161 | |||
| 162 | * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is | ||
| 163 | not defined as a macro. The latter happens on MS-Windows. | ||
| 164 | (Bug#12446) | ||
| 165 | |||
| 166 | 2012-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 167 | |||
| 168 | Port better to POSIX hosts lacking _setjmp (Bug#12446). | ||
| 169 | * lisp.h: Include <setjmp.h> here, since we use its symbols here. | ||
| 170 | Some instances of '#include <setjmp.h>' removed, if the | ||
| 171 | only reason for the instance was because "lisp.h" was included. | ||
| 172 | (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. | ||
| 173 | Unless otherwise specified, replace all uses of jmp_buf, _setjmp, | ||
| 174 | and _longjmp with the new symbols. Emacs already uses _setjmp if | ||
| 175 | available, so this change affects only POSIXish hosts that have | ||
| 176 | sigsetjmp but not _setjmp, such as some versions of Solaris and | ||
| 177 | Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.) | ||
| 178 | * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros. | ||
| 179 | (png_load_body) [HAVE_PNG]: | ||
| 180 | (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]: | ||
| 181 | (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]: | ||
| 182 | Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp, | ||
| 183 | since PNG requires jmp_buf. This is the only exception to the | ||
| 184 | general rule that we now use sys_setjmp and sys_longjmp. | ||
| 185 | This exception is OK since this code does not change the signal | ||
| 186 | mask or longjmp out of a signal handler. | ||
| 187 | |||
| 188 | 2012-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 189 | |||
| 190 | * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: | ||
| 191 | Include "syssignal.h", for 'main_thread'. | ||
| 192 | |||
| 193 | 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 194 | |||
| 195 | Avoid out-of-range marker position (Bug#12426). | ||
| 196 | * insdel.c (replace_range, replace_range_2): Adjust | ||
| 197 | markers before overlays, as suggested by comments. | ||
| 198 | (insert_1_both, insert_from_buffer_1, adjust_after_replace): | ||
| 199 | Remove redundant check before calling offset_intervals. | ||
| 200 | |||
| 201 | 2012-09-14 Martin Rudalics <rudalics@gmx.at> | ||
| 202 | |||
| 203 | * xdisp.c (Fformat_mode_line): Unconditionally save/restore | ||
| 204 | current buffer (Bug#12387). | ||
| 205 | |||
| 206 | 2012-09-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 207 | |||
| 208 | * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies. | ||
| 209 | |||
| 210 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 211 | |||
| 212 | Use a more backwards-compatible timer format (Bug#12430). | ||
| 213 | * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0) | ||
| 214 | vector element, not from the 4th, since PSECS is now at the end. | ||
| 215 | (Fcurrent_idle_time): Doc fix. | ||
| 216 | |||
| 217 | 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 218 | |||
| 219 | Function to mark objects and remove killed buffers at once. | ||
| 220 | * alloc.c (discard_killed_buffers): Rename to ... | ||
| 221 | (mark_discard_killed buffers) ... new name. Add marking | ||
| 222 | of remaining objects. Fix comment. Adjust users. | ||
| 223 | (mark_object): Do not touch frame buffer lists here. | ||
| 224 | * frame.c (delete_frame): Reset frame buffer lists here. | ||
| 225 | |||
| 226 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 227 | |||
| 228 | Better workaround for GNOME bug when --enable-gcc-warnings. | ||
| 229 | * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change. | ||
| 230 | Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in | ||
| 231 | <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>. | ||
| 232 | |||
| 233 | Simplify SIGIO usage (Bug#12408). | ||
| 234 | The code that dealt with SIGIO was crufty and confusing, e.g., it | ||
| 235 | played tricks like "#undef SIGIO" but these tricks were not used | ||
| 236 | consistently. Simplify mostly by not #undeffing standard symbols, | ||
| 237 | e.g., use "defined USABLE_SIGIO" (our symbol, which we can define | ||
| 238 | or not as we please) rather than "defined SIGIO" (standard symbol | ||
| 239 | that we probably shouldn't #undef). | ||
| 240 | * conf_post.h [USG5_4]: Do not include <sys/wait.h> here. | ||
| 241 | Modules that need it can include it. | ||
| 242 | [USG5_4 && emacs]: Likewise, do not include the streams stuff here. | ||
| 243 | * dispextern.h (ignore_sigio): New decl. | ||
| 244 | * emacs.c (shut_down_emacs): Invoke unrequest_sigio | ||
| 245 | unconditionally, since it's now a no-op if !USABLE_SIGIO. | ||
| 246 | * emacs.c (shut_down_emacs): | ||
| 247 | * keyboard.c (kbd_buffer_store_event_hold): | ||
| 248 | Use ignore_sigio rather than invoking 'signal' directly. | ||
| 249 | * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>, | ||
| 250 | for FIONREAD. | ||
| 251 | (FIONREAD, SIGIO): Do not #undef. | ||
| 252 | (tty_read_avail_input): Use #error rather than a syntax error. | ||
| 253 | * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>, | ||
| 254 | for I_PIPE, used by SETUP_SLAVE_PTY. | ||
| 255 | (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD. | ||
| 256 | * sysdep.c (croak): Remove; no longer needed. This bit of | ||
| 257 | temporary code, with Fred N. Fish's comment that it's temporary, | ||
| 258 | has been in Emacs since at least 1992! | ||
| 259 | (init_sigio, reset_sigio, request_sigio, unrequest_sigio): | ||
| 260 | Arrange for them to be no-ops in all cases when ! USABLE_SIGIO. | ||
| 261 | * syssignal.h (croak): Remove decl. | ||
| 262 | (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile. | ||
| 263 | * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed | ||
| 264 | now that we're termios-only. | ||
| 265 | (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef. | ||
| 266 | * term.c (dissociate_if_controlling_tty): Use #error rather than | ||
| 267 | a run-time error. | ||
| 268 | |||
| 269 | Work around GCC and GNOME bugs when --enable-gcc-warnings. | ||
| 270 | * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', | ||
| 271 | to work around GNOME bug 683906. | ||
| 272 | * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. | ||
| 273 | (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. | ||
| 274 | This works around GCC bug 54561. | ||
| 275 | |||
| 276 | 2012-09-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 277 | |||
| 278 | More fixes for 'volatile' and setjmp/longjmp. | ||
| 279 | * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's. | ||
| 280 | * image.c (struct png_load_context) [HAVE_PNG]: New type. | ||
| 281 | (png_load_body) [HAVE_PNG]: | ||
| 282 | (jpeg_load_body) [HAVE_JPEG]: | ||
| 283 | New function, with most of the old parent function's body. | ||
| 284 | (png_load) [HAVE_PNG]: | ||
| 285 | (jpeg_load) [HAVE_JPEG]: | ||
| 286 | Invoke the new function, to avoid longjmp munging our locals. | ||
| 287 | (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code. | ||
| 288 | (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when | ||
| 289 | longjmp is passed 2, as the C standard doesn't guarantee this. | ||
| 290 | Instead, store the failure code into mgr->failure_code. | ||
| 291 | |||
| 1 | 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca> | 292 | 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 293 | ||
| 3 | * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) | 294 | * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) |
| @@ -212,7 +503,7 @@ | |||
| 212 | (ns_maybe_dumpglyphs_background): Remove fringe/internal border | 503 | (ns_maybe_dumpglyphs_background): Remove fringe/internal border |
| 213 | adjustment. | 504 | adjustment. |
| 214 | (ns_dumpglyphs_image): Ditto. | 505 | (ns_dumpglyphs_image): Ditto. |
| 215 | (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal | 506 | (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal |
| 216 | border adjustment. | 507 | border adjustment. |
| 217 | (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and | 508 | (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and |
| 218 | their usage. Add fringe_extended_p and its use as in other terms. | 509 | their usage. Add fringe_extended_p and its use as in other terms. |
| @@ -293,7 +584,7 @@ | |||
| 293 | * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>; | 584 | * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>; |
| 294 | no longer needed here. | 585 | no longer needed here. |
| 295 | * emacs.c (main): Inspect existing signal handler with sigaction, | 586 | * emacs.c (main): Inspect existing signal handler with sigaction, |
| 296 | so that there's no need to block and unblock SIGHUP. | 587 | so that there's no need to block and unblock SIGHUP. |
| 297 | * sysdep.c (struct save_signal): New member 'action', replacing | 588 | * sysdep.c (struct save_signal): New member 'action', replacing |
| 298 | old member 'handler'. | 589 | old member 'handler'. |
| 299 | (save_signal_handlers, restore_signal_handlers): | 590 | (save_signal_handlers, restore_signal_handlers): |
| @@ -820,18 +1111,18 @@ | |||
| 820 | 2012-08-28 Jan Djärv <jan.h.d@swipnet.se> | 1111 | 2012-08-28 Jan Djärv <jan.h.d@swipnet.se> |
| 821 | 1112 | ||
| 822 | * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize | 1113 | * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize |
| 823 | button_values to NULL. Call setStykeMask so dialogs get a close button. | 1114 | button_values to NULL. Call setStykeMask so dialogs get a close button. |
| 824 | (windowShouldClose:): Set window_closed. | 1115 | (windowShouldClose:): Set window_closed. |
| 825 | (dealloc): New member, free button_values. | 1116 | (dealloc): New member, free button_values. |
| 826 | (process_dialog:): Make member function. Remove window argument, | 1117 | (process_dialog:): Make member function. Remove window argument, |
| 827 | replace window with self. Count buttons and allocate and store values | 1118 | replace window with self. Count buttons and allocate and store values |
| 828 | in button_values. | 1119 | in button_values. |
| 829 | (addButton:value:row:): value is int with the name tag. Call setTag | 1120 | (addButton:value:row:): value is int with the name tag. Call setTag |
| 830 | with tag. Remove return self, declare return value as void. | 1121 | with tag. Remove return self, declare return value as void. |
| 831 | (addString:row:): Remove return self, declare return value as void. | 1122 | (addString:row:): Remove return self, declare return value as void. |
| 832 | (addSplit): Remove return self, declare return value as void. | 1123 | (addSplit): Remove return self, declare return value as void. |
| 833 | (clicked:): Remove return self, declare return value as void. | 1124 | (clicked:): Remove return self, declare return value as void. |
| 834 | Set dialog_return to button_values[seltag]. Code formatting change. | 1125 | Set dialog_return to button_values[seltag]. Code formatting change. |
| 835 | (initFromContents:isQuestion:): Adjust call to process_dialog. | 1126 | (initFromContents:isQuestion:): Adjust call to process_dialog. |
| 836 | Code formatting change. | 1127 | Code formatting change. |
| 837 | (timeout_handler:): Set timer_fired to YES. | 1128 | (timeout_handler:): Set timer_fired to YES. |
| @@ -1166,7 +1457,7 @@ | |||
| 1166 | 1457 | ||
| 1167 | * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. | 1458 | * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. |
| 1168 | Otherwise, the compiler complains about (A?B:C) where B is void | 1459 | Otherwise, the compiler complains about (A?B:C) where B is void |
| 1169 | and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. | 1460 | and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. |
| 1170 | (fontset_add): Return void, for FONTSET_ADD. | 1461 | (fontset_add): Return void, for FONTSET_ADD. |
| 1171 | 1462 | ||
| 1172 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | 1463 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> |
| @@ -1682,7 +1973,7 @@ | |||
| 1682 | Start main loop and wait for application defined event. | 1973 | Start main loop and wait for application defined event. |
| 1683 | Inform select thread to stop selecting after main loop is exited. | 1974 | Inform select thread to stop selecting after main loop is exited. |
| 1684 | (ns_term_init): Create selfds pipe and set non-blocking. | 1975 | (ns_term_init): Create selfds pipe and set non-blocking. |
| 1685 | Initialize select_mutex. Start the select thread (fd_handler). | 1976 | Initialize select_mutex. Start the select thread (fd_handler). |
| 1686 | (fd_handler:): Loop forever, wait for info from the main thread | 1977 | (fd_handler:): Loop forever, wait for info from the main thread |
| 1687 | to either start or stop selecting. When select returns, send | 1978 | to either start or stop selecting. When select returns, send |
| 1688 | and appdefined event. | 1979 | and appdefined event. |
| @@ -1814,7 +2105,7 @@ | |||
| 1814 | (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info | 2105 | (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info |
| 1815 | if not present. | 2106 | if not present. |
| 1816 | (update_frame_tool_bar): Return early if data in xg_frame_tb_info | 2107 | (update_frame_tool_bar): Return early if data in xg_frame_tb_info |
| 1817 | is up to date. Otherwise store new data. | 2108 | is up to date. Otherwise store new data. |
| 1818 | (free_frame_tool_bar): Free xg_frame_tb_info if present. | 2109 | (free_frame_tool_bar): Free xg_frame_tb_info if present. |
| 1819 | 2110 | ||
| 1820 | 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru> | 2111 | 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru> |
| @@ -1841,7 +2132,7 @@ | |||
| 1841 | 2012-08-11 Jan Djärv <jan.h.d@swipnet.se> | 2132 | 2012-08-11 Jan Djärv <jan.h.d@swipnet.se> |
| 1842 | 2133 | ||
| 1843 | * nsterm.m (not_in_argv): New function. | 2134 | * nsterm.m (not_in_argv): New function. |
| 1844 | (application:openFile, application:openTempFile:): | 2135 | (application:openFile, application:openTempFile:): |
| 1845 | (application:openFileWithoutUI:, application:openFiles:): Open file | 2136 | (application:openFileWithoutUI:, application:openFiles:): Open file |
| 1846 | if not_in_argv returns non-zero (bug#12171). | 2137 | if not_in_argv returns non-zero (bug#12171). |
| 1847 | 2138 | ||
| @@ -3028,7 +3319,7 @@ | |||
| 3028 | 3319 | ||
| 3029 | 2012-07-21 Jan Djärv <jan.h.d@swipnet.se> | 3320 | 2012-07-21 Jan Djärv <jan.h.d@swipnet.se> |
| 3030 | 3321 | ||
| 3031 | * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). | 3322 | * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). |
| 3032 | (conversationIdentifier): Return value is NSInteger. | 3323 | (conversationIdentifier): Return value is NSInteger. |
| 3033 | * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA. | 3324 | * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA. |
| 3034 | 3325 | ||
| @@ -5538,7 +5829,7 @@ | |||
| 5538 | * lisp.h (struct vectorlike_header): New field `nbytes', | 5829 | * lisp.h (struct vectorlike_header): New field `nbytes', |
| 5539 | adjust comment accordingly. | 5830 | adjust comment accordingly. |
| 5540 | * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK' | 5831 | * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK' |
| 5541 | to denote vector blocks. Adjust users (live_vector_p, | 5832 | to denote vector blocks. Adjust users (live_vector_p, |
| 5542 | mark_maybe_pointer, valid_lisp_object_p) accordingly. | 5833 | mark_maybe_pointer, valid_lisp_object_p) accordingly. |
| 5543 | (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. | 5834 | (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. |
| 5544 | (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), | 5835 | (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), |
| @@ -5552,7 +5843,7 @@ | |||
| 5552 | (allocate_vector_from_block, init_vectors, allocate_vector_from_block) | 5843 | (allocate_vector_from_block, init_vectors, allocate_vector_from_block) |
| 5553 | (sweep_vectors): New functions. | 5844 | (sweep_vectors): New functions. |
| 5554 | (allocate_vectorlike): Return `zero_vector' as the only vector of | 5845 | (allocate_vectorlike): Return `zero_vector' as the only vector of |
| 5555 | 0 items. Allocate new vector from block if vector size is less than | 5846 | 0 items. Allocate new vector from block if vector size is less than |
| 5556 | or equal to VBLOCK_BYTES_MAX. | 5847 | or equal to VBLOCK_BYTES_MAX. |
| 5557 | (Fgarbage_collect): Move all vector sweeping code to sweep_vectors. | 5848 | (Fgarbage_collect): Move all vector sweeping code to sweep_vectors. |
| 5558 | (init_alloc_once): Add call to init_vectors. | 5849 | (init_alloc_once): Add call to init_vectors. |
| @@ -5642,7 +5933,7 @@ | |||
| 5642 | change it's type from Lisp_Object to bitfield. | 5933 | change it's type from Lisp_Object to bitfield. |
| 5643 | Change type of 'force_start', 'optional_new_start', | 5934 | Change type of 'force_start', 'optional_new_start', |
| 5644 | 'last_had_star', 'update_mode_line' and 'start_at_line_beg' | 5935 | 'last_had_star', 'update_mode_line' and 'start_at_line_beg' |
| 5645 | fields from Lisp_Object to bitfield. Adjust users accordingly. | 5936 | fields from Lisp_Object to bitfield. Adjust users accordingly. |
| 5646 | 5937 | ||
| 5647 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | 5938 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> |
| 5648 | 5939 | ||
diff --git a/src/frame.c b/src/frame.c index 6930dac3ce8..f3d16171516 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3897,6 +3897,95 @@ x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, | |||
| 3897 | } | 3897 | } |
| 3898 | 3898 | ||
| 3899 | 3899 | ||
| 3900 | #if !defined (HAVE_X_WINDOWS) && defined (NoValue) | ||
| 3901 | |||
| 3902 | /* | ||
| 3903 | * XParseGeometry parses strings of the form | ||
| 3904 | * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where | ||
| 3905 | * width, height, xoffset, and yoffset are unsigned integers. | ||
| 3906 | * Example: "=80x24+300-49" | ||
| 3907 | * The equal sign is optional. | ||
| 3908 | * It returns a bitmask that indicates which of the four values | ||
| 3909 | * were actually found in the string. For each value found, | ||
| 3910 | * the corresponding argument is updated; for each value | ||
| 3911 | * not found, the corresponding argument is left unchanged. | ||
| 3912 | */ | ||
| 3913 | |||
| 3914 | static int | ||
| 3915 | XParseGeometry (char *string, | ||
| 3916 | int *x, int *y, | ||
| 3917 | unsigned int *width, unsigned int *height) | ||
| 3918 | { | ||
| 3919 | int mask = NoValue; | ||
| 3920 | char *strind; | ||
| 3921 | unsigned long int tempWidth, tempHeight; | ||
| 3922 | long int tempX, tempY; | ||
| 3923 | char *nextCharacter; | ||
| 3924 | |||
| 3925 | if (string == NULL || *string == '\0') | ||
| 3926 | return mask; | ||
| 3927 | if (*string == '=') | ||
| 3928 | string++; /* ignore possible '=' at beg of geometry spec */ | ||
| 3929 | |||
| 3930 | strind = string; | ||
| 3931 | if (*strind != '+' && *strind != '-' && *strind != 'x') | ||
| 3932 | { | ||
| 3933 | tempWidth = strtoul (strind, &nextCharacter, 10); | ||
| 3934 | if (strind == nextCharacter) | ||
| 3935 | return 0; | ||
| 3936 | strind = nextCharacter; | ||
| 3937 | mask |= WidthValue; | ||
| 3938 | } | ||
| 3939 | |||
| 3940 | if (*strind == 'x' || *strind == 'X') | ||
| 3941 | { | ||
| 3942 | strind++; | ||
| 3943 | tempHeight = strtoul (strind, &nextCharacter, 10); | ||
| 3944 | if (strind == nextCharacter) | ||
| 3945 | return 0; | ||
| 3946 | strind = nextCharacter; | ||
| 3947 | mask |= HeightValue; | ||
| 3948 | } | ||
| 3949 | |||
| 3950 | if (*strind == '+' || *strind == '-') | ||
| 3951 | { | ||
| 3952 | if (*strind == '-') | ||
| 3953 | mask |= XNegative; | ||
| 3954 | tempX = strtol (strind, &nextCharacter, 10); | ||
| 3955 | if (strind == nextCharacter) | ||
| 3956 | return 0; | ||
| 3957 | strind = nextCharacter; | ||
| 3958 | mask |= XValue; | ||
| 3959 | if (*strind == '+' || *strind == '-') | ||
| 3960 | { | ||
| 3961 | if (*strind == '-') | ||
| 3962 | mask |= YNegative; | ||
| 3963 | tempY = strtol (strind, &nextCharacter, 10); | ||
| 3964 | if (strind == nextCharacter) | ||
| 3965 | return 0; | ||
| 3966 | strind = nextCharacter; | ||
| 3967 | mask |= YValue; | ||
| 3968 | } | ||
| 3969 | } | ||
| 3970 | |||
| 3971 | /* If strind isn't at the end of the string then it's an invalid | ||
| 3972 | geometry specification. */ | ||
| 3973 | |||
| 3974 | if (*strind != '\0') | ||
| 3975 | return 0; | ||
| 3976 | |||
| 3977 | if (mask & XValue) | ||
| 3978 | *x = clip_to_bounds (INT_MIN, tempX, INT_MAX); | ||
| 3979 | if (mask & YValue) | ||
| 3980 | *y = clip_to_bounds (INT_MIN, tempY, INT_MAX); | ||
| 3981 | if (mask & WidthValue) | ||
| 3982 | *width = min (tempWidth, UINT_MAX); | ||
| 3983 | if (mask & HeightValue) | ||
| 3984 | *height = min (tempHeight, UINT_MAX); | ||
| 3985 | return mask; | ||
| 3986 | } | ||
| 3987 | |||
| 3988 | #endif /* !defined (HAVE_X_WINDOWS) && defined (NoValue) */ | ||
| 3900 | 3989 | ||
| 3901 | 3990 | ||
| 3902 | /* NS used to define x-parse-geometry in ns-win.el, but that confused | 3991 | /* NS used to define x-parse-geometry in ns-win.el, but that confused |
| @@ -3917,15 +4006,16 @@ or a list (- N) meaning -N pixels relative to bottom/right corner. | |||
| 3917 | On Nextstep, this just calls `ns-parse-geometry'. */) | 4006 | On Nextstep, this just calls `ns-parse-geometry'. */) |
| 3918 | (Lisp_Object string) | 4007 | (Lisp_Object string) |
| 3919 | { | 4008 | { |
| 3920 | #ifdef HAVE_NS | ||
| 3921 | return call1 (Qns_parse_geometry, string); | ||
| 3922 | #else | ||
| 3923 | int geometry, x, y; | 4009 | int geometry, x, y; |
| 3924 | unsigned int width, height; | 4010 | unsigned int width, height; |
| 3925 | Lisp_Object result; | 4011 | Lisp_Object result; |
| 3926 | 4012 | ||
| 3927 | CHECK_STRING (string); | 4013 | CHECK_STRING (string); |
| 3928 | 4014 | ||
| 4015 | #ifdef HAVE_NS | ||
| 4016 | if (strchr (SSDATA (string), ' ') != NULL) | ||
| 4017 | return call1 (Qns_parse_geometry, string); | ||
| 4018 | #endif | ||
| 3929 | geometry = XParseGeometry (SSDATA (string), | 4019 | geometry = XParseGeometry (SSDATA (string), |
| 3930 | &x, &y, &width, &height); | 4020 | &x, &y, &width, &height); |
| 3931 | result = Qnil; | 4021 | result = Qnil; |
| @@ -3961,7 +4051,6 @@ On Nextstep, this just calls `ns-parse-geometry'. */) | |||
| 3961 | result = Fcons (Fcons (Qheight, make_number (height)), result); | 4051 | result = Fcons (Fcons (Qheight, make_number (height)), result); |
| 3962 | 4052 | ||
| 3963 | return result; | 4053 | return result; |
| 3964 | #endif /* HAVE_NS */ | ||
| 3965 | } | 4054 | } |
| 3966 | 4055 | ||
| 3967 | 4056 | ||
diff --git a/src/nsfns.m b/src/nsfns.m index 072005d2d3d..e2c8c3722c0 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -870,16 +870,6 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 870 | } | 870 | } |
| 871 | 871 | ||
| 872 | 872 | ||
| 873 | /* Xism; we stub out (we do implement this in ns-win.el) */ | ||
| 874 | int | ||
| 875 | XParseGeometry (char *string, int *x, int *y, | ||
| 876 | unsigned int *width, unsigned int *height) | ||
| 877 | { | ||
| 878 | message1 ("Warning: XParseGeometry not supported under NS.\n"); | ||
| 879 | return 0; | ||
| 880 | } | ||
| 881 | |||
| 882 | |||
| 883 | /* TODO: move to nsterm? */ | 873 | /* TODO: move to nsterm? */ |
| 884 | int | 874 | int |
| 885 | ns_lisp_to_cursor_type (Lisp_Object arg) | 875 | ns_lisp_to_cursor_type (Lisp_Object arg) |
| @@ -1399,6 +1389,9 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1399 | 1389 | ||
| 1400 | UNGCPRO; | 1390 | UNGCPRO; |
| 1401 | 1391 | ||
| 1392 | if (window_prompting & USPosition) | ||
| 1393 | x_set_offset (f, f->left_pos, f->top_pos, 1); | ||
| 1394 | |||
| 1402 | /* Make sure windows on this frame appear in calls to next-window | 1395 | /* Make sure windows on this frame appear in calls to next-window |
| 1403 | and similar functions. */ | 1396 | and similar functions. */ |
| 1404 | Vwindow_list = Qnil; | 1397 | Vwindow_list = Qnil; |
diff --git a/src/w32inevt.c b/src/w32inevt.c index ee07db5335b..d4cc620335c 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -747,7 +747,7 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 747 | int expected, | 747 | int expected, |
| 748 | struct input_event *hold_quit) | 748 | struct input_event *hold_quit) |
| 749 | { | 749 | { |
| 750 | int nev, ret = 0, add; | 750 | int nev, add; |
| 751 | int isdead; | 751 | int isdead; |
| 752 | 752 | ||
| 753 | if (interrupt_input_blocked) | 753 | if (interrupt_input_blocked) |
| @@ -767,8 +767,7 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 767 | /* If nev == -1, there was some kind of error | 767 | /* If nev == -1, there was some kind of error |
| 768 | If nev == 0 then waitp must be zero and no events were available | 768 | If nev == 0 then waitp must be zero and no events were available |
| 769 | so return. */ | 769 | so return. */ |
| 770 | UNBLOCK_INPUT; | 770 | break; |
| 771 | return nev; | ||
| 772 | } | 771 | } |
| 773 | 772 | ||
| 774 | while (nev > 0) | 773 | while (nev > 0) |
| @@ -812,9 +811,6 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 812 | queue_ptr++; | 811 | queue_ptr++; |
| 813 | nev--; | 812 | nev--; |
| 814 | } | 813 | } |
| 815 | |||
| 816 | if (ret > 0 || expected == 0) | ||
| 817 | break; | ||
| 818 | } | 814 | } |
| 819 | 815 | ||
| 820 | /* We don't get told about changes in the window size (only the buffer | 816 | /* We don't get told about changes in the window size (only the buffer |
| @@ -824,5 +820,5 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 824 | maybe_generate_resize_event (); | 820 | maybe_generate_resize_event (); |
| 825 | 821 | ||
| 826 | UNBLOCK_INPUT; | 822 | UNBLOCK_INPUT; |
| 827 | return ret; | 823 | return nev; |
| 828 | } | 824 | } |
diff --git a/src/w32xfns.c b/src/w32xfns.c index 33f40fc7c01..018dd14cb80 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -303,138 +303,6 @@ drain_message_queue (void) | |||
| 303 | } | 303 | } |
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | |||
| 307 | /* | ||
| 308 | * XParseGeometry parses strings of the form | ||
| 309 | * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where | ||
| 310 | * width, height, xoffset, and yoffset are unsigned integers. | ||
| 311 | * Example: "=80x24+300-49" | ||
| 312 | * The equal sign is optional. | ||
| 313 | * It returns a bitmask that indicates which of the four values | ||
| 314 | * were actually found in the string. For each value found, | ||
| 315 | * the corresponding argument is updated; for each value | ||
| 316 | * not found, the corresponding argument is left unchanged. | ||
| 317 | */ | ||
| 318 | |||
| 319 | static int | ||
| 320 | read_integer (register char *string, char **NextString) | ||
| 321 | { | ||
| 322 | register int Result = 0; | ||
| 323 | int Sign = 1; | ||
| 324 | |||
| 325 | if (*string == '+') | ||
| 326 | string++; | ||
| 327 | else if (*string == '-') | ||
| 328 | { | ||
| 329 | string++; | ||
| 330 | Sign = -1; | ||
| 331 | } | ||
| 332 | for (; (*string >= '0') && (*string <= '9'); string++) | ||
| 333 | { | ||
| 334 | Result = (Result * 10) + (*string - '0'); | ||
| 335 | } | ||
| 336 | *NextString = string; | ||
| 337 | if (Sign >= 0) | ||
| 338 | return (Result); | ||
| 339 | else | ||
| 340 | return (-Result); | ||
| 341 | } | ||
| 342 | |||
| 343 | int | ||
| 344 | XParseGeometry (char *string, | ||
| 345 | int *x, int *y, | ||
| 346 | unsigned int *width, unsigned int *height) | ||
| 347 | { | ||
| 348 | int mask = NoValue; | ||
| 349 | register char *strind; | ||
| 350 | unsigned int tempWidth, tempHeight; | ||
| 351 | int tempX, tempY; | ||
| 352 | char *nextCharacter; | ||
| 353 | |||
| 354 | if ((string == NULL) || (*string == '\0')) return (mask); | ||
| 355 | if (*string == '=') | ||
| 356 | string++; /* ignore possible '=' at beg of geometry spec */ | ||
| 357 | |||
| 358 | strind = (char *)string; | ||
| 359 | if (*strind != '+' && *strind != '-' && *strind != 'x') | ||
| 360 | { | ||
| 361 | tempWidth = read_integer (strind, &nextCharacter); | ||
| 362 | if (strind == nextCharacter) | ||
| 363 | return (0); | ||
| 364 | strind = nextCharacter; | ||
| 365 | mask |= WidthValue; | ||
| 366 | } | ||
| 367 | |||
| 368 | if (*strind == 'x' || *strind == 'X') | ||
| 369 | { | ||
| 370 | strind++; | ||
| 371 | tempHeight = read_integer (strind, &nextCharacter); | ||
| 372 | if (strind == nextCharacter) | ||
| 373 | return (0); | ||
| 374 | strind = nextCharacter; | ||
| 375 | mask |= HeightValue; | ||
| 376 | } | ||
| 377 | |||
| 378 | if ((*strind == '+') || (*strind == '-')) | ||
| 379 | { | ||
| 380 | if (*strind == '-') | ||
| 381 | { | ||
| 382 | strind++; | ||
| 383 | tempX = -read_integer (strind, &nextCharacter); | ||
| 384 | if (strind == nextCharacter) | ||
| 385 | return (0); | ||
| 386 | strind = nextCharacter; | ||
| 387 | mask |= XNegative; | ||
| 388 | |||
| 389 | } | ||
| 390 | else | ||
| 391 | { | ||
| 392 | strind++; | ||
| 393 | tempX = read_integer (strind, &nextCharacter); | ||
| 394 | if (strind == nextCharacter) | ||
| 395 | return (0); | ||
| 396 | strind = nextCharacter; | ||
| 397 | } | ||
| 398 | mask |= XValue; | ||
| 399 | if ((*strind == '+') || (*strind == '-')) | ||
| 400 | { | ||
| 401 | if (*strind == '-') | ||
| 402 | { | ||
| 403 | strind++; | ||
| 404 | tempY = -read_integer (strind, &nextCharacter); | ||
| 405 | if (strind == nextCharacter) | ||
| 406 | return (0); | ||
| 407 | strind = nextCharacter; | ||
| 408 | mask |= YNegative; | ||
| 409 | } | ||
| 410 | else | ||
| 411 | { | ||
| 412 | strind++; | ||
| 413 | tempY = read_integer (strind, &nextCharacter); | ||
| 414 | if (strind == nextCharacter) | ||
| 415 | return (0); | ||
| 416 | strind = nextCharacter; | ||
| 417 | } | ||
| 418 | mask |= YValue; | ||
| 419 | } | ||
| 420 | } | ||
| 421 | |||
| 422 | /* If strind isn't at the end of the string then it's an invalid | ||
| 423 | geometry specification. */ | ||
| 424 | |||
| 425 | if (*strind != '\0') return (0); | ||
| 426 | |||
| 427 | if (mask & XValue) | ||
| 428 | *x = tempX; | ||
| 429 | if (mask & YValue) | ||
| 430 | *y = tempY; | ||
| 431 | if (mask & WidthValue) | ||
| 432 | *width = tempWidth; | ||
| 433 | if (mask & HeightValue) | ||
| 434 | *height = tempHeight; | ||
| 435 | return (mask); | ||
| 436 | } | ||
| 437 | |||
| 438 | /* x_sync is a no-op on W32. */ | 306 | /* x_sync is a no-op on W32. */ |
| 439 | void | 307 | void |
| 440 | x_sync (struct frame *f) | 308 | x_sync (struct frame *f) |