diff options
| author | Paul Eggert | 2011-02-11 21:15:47 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-11 21:15:47 -0800 |
| commit | 7cd330deb66863a144d7e2c36210f13d10db5245 (patch) | |
| tree | 23bfb062fc6e34d3e86fabc5e99379e82d4d6346 | |
| parent | 78998ca9cf65cc65579c8b756d35a2db9d3c8ef7 (diff) | |
| parent | af59aa6e3c661fcd547df8bc4175750f9edb20ec (diff) | |
| download | emacs-7cd330deb66863a144d7e2c36210f13d10db5245.tar.gz emacs-7cd330deb66863a144d7e2c36210f13d10db5245.zip | |
Merge from mainline.
| -rw-r--r-- | lib/getopt_.h | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 32 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-specs.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 9 | ||||
| -rw-r--r-- | lisp/files.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/mml2015.el | 2 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 18 | ||||
| -rw-r--r-- | lisp/simple.el | 30 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 36 | ||||
| -rw-r--r-- | lwlib/ChangeLog | 16 | ||||
| -rw-r--r-- | lwlib/Makefile.in | 53 | ||||
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/xftfont.c | 8 | ||||
| -rw-r--r-- | src/xsettings.c | 23 | ||||
| -rw-r--r-- | src/xterm.c | 5 |
15 files changed, 163 insertions, 94 deletions
diff --git a/lib/getopt_.h b/lib/getopt_.h index 7d634f89a42..43acccc0bfc 100644 --- a/lib/getopt_.h +++ b/lib/getopt_.h | |||
| @@ -138,7 +138,7 @@ | |||
| 138 | This program is distributed in the hope that it will be useful, | 138 | This program is distributed in the hope that it will be useful, |
| 139 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 139 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 140 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 140 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 141 | Lesser General Public License for more details. | 141 | General Public License for more details. |
| 142 | 142 | ||
| 143 | You should have received a copy of the GNU General Public License | 143 | You should have received a copy of the GNU General Public License |
| 144 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 144 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 392510c63d0..e8308059963 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2011-02-12 Phil Hagelberg <phil@hagelb.org> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el: Allow packages to be reinstalled. | ||
| 4 | (package--write-file-no-coding): Remove EXCL arg. | ||
| 5 | (package-unpack-single): Don't use it. | ||
| 6 | |||
| 7 | 2011-02-12 Karl Pflästerer <k@rl.pflaesterer.de> (tiny change) | ||
| 8 | |||
| 9 | * vc/vc-svn.el: Adapt to Subversion change, with no .svn directory | ||
| 10 | in each sub directory. | ||
| 11 | (vc-svn-registered): Use vc-svn-root. | ||
| 12 | (vc-svn-root): New function. Make vc-svn-responsible-p an alias. | ||
| 13 | (vc-svn-repository-hostname): Use "svn info". | ||
| 14 | |||
| 15 | 2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 16 | |||
| 17 | * simple.el (delete-trailing-whitespace): New optional buffer | ||
| 18 | bound parameters. | ||
| 19 | |||
| 20 | 2011-02-11 Bastien Guerry <bzg@altern.org> | ||
| 21 | |||
| 22 | * files.el (basic-save-buffer): save unmodified buffers when | ||
| 23 | the file pointed by buffer-file-name doesn't exist. | ||
| 24 | |||
| 25 | 2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 26 | |||
| 27 | * net/rcirc.el (defun-rcirc-join): Accept multiple channels. | ||
| 28 | |||
| 29 | 2011-02-11 Glenn Morris <rgm@gnu.org> | ||
| 30 | |||
| 31 | * emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec. | ||
| 32 | |||
| 1 | 2011-02-11 Juanma Barranquero <lekktu@gmail.com> | 33 | 2011-02-11 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 34 | ||
| 3 | * net/rcirc.el (rcirc-send-ctcp): Remove spurious arg to `format'. | 35 | * net/rcirc.el (rcirc-send-ctcp): Remove spurious arg to `format'. |
diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index 7359da65e07..3556b6c1ecf 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | (def-edebug-spec multiple-value-list (form)) | 67 | (def-edebug-spec multiple-value-list (form)) |
| 68 | (def-edebug-spec multiple-value-call (function-form body)) | 68 | (def-edebug-spec multiple-value-call (function-form body)) |
| 69 | (def-edebug-spec multiple-value-bind | 69 | (def-edebug-spec multiple-value-bind |
| 70 | ((&rest symbolp) form cl-declarations body)) | 70 | ((&rest symbolp) form body)) |
| 71 | (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) | 71 | (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) |
| 72 | (def-edebug-spec multiple-value-prog1 (form body)) | 72 | (def-edebug-spec multiple-value-prog1 (form body)) |
| 73 | 73 | ||
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index af97bb1bd21..20b6514a02a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -577,23 +577,22 @@ Otherwise it uses an external `tar' program. | |||
| 577 | (let ((load-path (cons pkg-dir load-path))) | 577 | (let ((load-path (cons pkg-dir load-path))) |
| 578 | (byte-recompile-directory pkg-dir 0 t))))) | 578 | (byte-recompile-directory pkg-dir 0 t))))) |
| 579 | 579 | ||
| 580 | (defun package--write-file-no-coding (file-name excl) | 580 | (defun package--write-file-no-coding (file-name) |
| 581 | (let ((buffer-file-coding-system 'no-conversion)) | 581 | (let ((buffer-file-coding-system 'no-conversion)) |
| 582 | (write-region (point-min) (point-max) file-name nil nil nil excl))) | 582 | (write-region (point-min) (point-max) file-name))) |
| 583 | 583 | ||
| 584 | (defun package-unpack-single (file-name version desc requires) | 584 | (defun package-unpack-single (file-name version desc requires) |
| 585 | "Install the contents of the current buffer as a package." | 585 | "Install the contents of the current buffer as a package." |
| 586 | ;; Special case "package". | 586 | ;; Special case "package". |
| 587 | (if (string= file-name "package") | 587 | (if (string= file-name "package") |
| 588 | (package--write-file-no-coding | 588 | (package--write-file-no-coding |
| 589 | (expand-file-name (concat file-name ".el") package-user-dir) | 589 | (expand-file-name (concat file-name ".el") package-user-dir)) |
| 590 | nil) | ||
| 591 | (let* ((pkg-dir (expand-file-name (concat file-name "-" version) | 590 | (let* ((pkg-dir (expand-file-name (concat file-name "-" version) |
| 592 | package-user-dir)) | 591 | package-user-dir)) |
| 593 | (el-file (expand-file-name (concat file-name ".el") pkg-dir)) | 592 | (el-file (expand-file-name (concat file-name ".el") pkg-dir)) |
| 594 | (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) | 593 | (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) |
| 595 | (make-directory pkg-dir t) | 594 | (make-directory pkg-dir t) |
| 596 | (package--write-file-no-coding el-file 'excl) | 595 | (package--write-file-no-coding el-file) |
| 597 | (let ((print-level nil) | 596 | (let ((print-level nil) |
| 598 | (print-length nil)) | 597 | (print-length nil)) |
| 599 | (write-region | 598 | (write-region |
diff --git a/lisp/files.el b/lisp/files.el index 8b42eaaddb8..43b31cb0a7a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4309,7 +4309,11 @@ Before and after saving the buffer, this function runs | |||
| 4309 | ;; In an indirect buffer, save its base buffer instead. | 4309 | ;; In an indirect buffer, save its base buffer instead. |
| 4310 | (if (buffer-base-buffer) | 4310 | (if (buffer-base-buffer) |
| 4311 | (set-buffer (buffer-base-buffer))) | 4311 | (set-buffer (buffer-base-buffer))) |
| 4312 | (if (buffer-modified-p) | 4312 | (if (or (buffer-modified-p) |
| 4313 | ;; handle the case when no modification has been made but | ||
| 4314 | ;; the file disappeared since visited | ||
| 4315 | (and buffer-file-name | ||
| 4316 | (not (file-exists-p buffer-file-name)))) | ||
| 4313 | (let ((recent-save (recent-auto-save-p)) | 4317 | (let ((recent-save (recent-auto-save-p)) |
| 4314 | setmodes) | 4318 | setmodes) |
| 4315 | ;; If buffer has no file name, ask user for one. | 4319 | ;; If buffer has no file name, ask user for one. |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 1271168fffc..df106bb6de8 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -116,7 +116,7 @@ Whether the passphrase is cached at all is controlled by | |||
| 116 | :type 'integer) | 116 | :type 'integer) |
| 117 | 117 | ||
| 118 | (defcustom mml2015-signers nil | 118 | (defcustom mml2015-signers nil |
| 119 | "A list of your own key ID which will be used to sign a message. | 119 | "A list of your own key ID(s) which will be used to sign a message. |
| 120 | If set, it overrides the setting of `mml2015-sign-with-sender'." | 120 | If set, it overrides the setting of `mml2015-sign-with-sender'." |
| 121 | :group 'mime-security | 121 | :group 'mime-security |
| 122 | :type '(repeat (string :tag "Key ID"))) | 122 | :type '(repeat (string :tag "Key ID"))) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c3e4f3d6169..8657dc58bf4 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -2098,14 +2098,18 @@ activity. Only run if the buffer is not visible and | |||
| 2098 | (when (not existing-buffer) | 2098 | (when (not existing-buffer) |
| 2099 | (rcirc-cmd-whois nick)))) | 2099 | (rcirc-cmd-whois nick)))) |
| 2100 | 2100 | ||
| 2101 | (defun-rcirc-command join (channel) | 2101 | (defun-rcirc-command join (channels) |
| 2102 | "Join CHANNEL." | 2102 | "Join CHANNELS. |
| 2103 | (interactive "sJoin channel: ") | 2103 | CHANNELS is a comma- or space-separated string of channel names." |
| 2104 | (let ((buffer (rcirc-get-buffer-create process | 2104 | (interactive "sJoin channels: ") |
| 2105 | (car (split-string channel))))) | 2105 | (let* ((split-channels (split-string channels "[ ,]" t)) |
| 2106 | (rcirc-send-string process (concat "JOIN " channel)) | 2106 | (buffers (mapcar (lambda (ch) |
| 2107 | (rcirc-get-buffer-create process ch)) | ||
| 2108 | split-channels))) | ||
| 2109 | (rcirc-send-string process (concat "JOIN " channels)) | ||
| 2107 | (when (not (eq (selected-window) (minibuffer-window))) | 2110 | (when (not (eq (selected-window) (minibuffer-window))) |
| 2108 | (switch-to-buffer buffer)))) | 2111 | (dolist (b buffers) ;; order the new channel buffers in the buffer list |
| 2112 | (switch-to-buffer b))))) | ||
| 2109 | 2113 | ||
| 2110 | ;; TODO: /part #channel reason, or consider removing #channel altogether | 2114 | ;; TODO: /part #channel reason, or consider removing #channel altogether |
| 2111 | (defun-rcirc-command part (channel) | 2115 | (defun-rcirc-command part (channel) |
diff --git a/lisp/simple.el b/lisp/simple.el index 537c9a80838..f19525aba4c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -614,22 +614,30 @@ On nonblank line, delete any immediately following blank lines." | |||
| 614 | (if (looking-at "^[ \t]*\n\\'") | 614 | (if (looking-at "^[ \t]*\n\\'") |
| 615 | (delete-region (point) (point-max))))) | 615 | (delete-region (point) (point-max))))) |
| 616 | 616 | ||
| 617 | (defun delete-trailing-whitespace () | 617 | (defun delete-trailing-whitespace (&optional start end) |
| 618 | "Delete all the trailing whitespace across the current buffer. | 618 | "Delete all the trailing whitespace across the current buffer. |
| 619 | All whitespace after the last non-whitespace character in a line is deleted. | 619 | All whitespace after the last non-whitespace character in a line is deleted. |
| 620 | This respects narrowing, created by \\[narrow-to-region] and friends. | 620 | This respects narrowing, created by \\[narrow-to-region] and friends. |
| 621 | A formfeed is not considered whitespace by this function." | 621 | A formfeed is not considered whitespace by this function. |
| 622 | (interactive "*") | 622 | If the region is active, only delete whitespace within the region." |
| 623 | (interactive (progn | ||
| 624 | (barf-if-buffer-read-only) | ||
| 625 | (if (use-region-p) | ||
| 626 | (list (region-beginning) (region-end)) | ||
| 627 | (list nil nil)))) | ||
| 623 | (save-match-data | 628 | (save-match-data |
| 624 | (save-excursion | 629 | (save-excursion |
| 625 | (goto-char (point-min)) | 630 | (let ((end-marker (copy-marker (or end (point-max)))) |
| 626 | (while (re-search-forward "\\s-$" nil t) | 631 | (start (or start (point-min)))) |
| 627 | (skip-syntax-backward "-" (save-excursion (forward-line 0) (point))) | 632 | (goto-char start) |
| 628 | ;; Don't delete formfeeds, even if they are considered whitespace. | 633 | (while (re-search-forward "\\s-$" end-marker t) |
| 629 | (save-match-data | 634 | (skip-syntax-backward "-" (save-excursion (forward-line 0) (point))) |
| 630 | (if (looking-at ".*\f") | 635 | ;; Don't delete formfeeds, even if they are considered whitespace. |
| 631 | (goto-char (match-end 0)))) | 636 | (save-match-data |
| 632 | (delete-region (point) (match-end 0)))))) | 637 | (if (looking-at ".*\f") |
| 638 | (goto-char (match-end 0)))) | ||
| 639 | (delete-region (point) (match-end 0))) | ||
| 640 | (set-marker end-marker nil))))) | ||
| 633 | 641 | ||
| 634 | (defun newline-and-indent () | 642 | (defun newline-and-indent () |
| 635 | "Insert a newline, then indent according to major mode. | 643 | "Insert a newline, then indent according to major mode. |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index aefef50cf79..20c7689f401 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -117,17 +117,13 @@ If you want to force an empty list of arguments, use t." | |||
| 117 | ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) | 117 | ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) |
| 118 | ;;;###autoload "_svn") | 118 | ;;;###autoload "_svn") |
| 119 | ;;;###autoload (t ".svn")))) | 119 | ;;;###autoload (t ".svn")))) |
| 120 | ;;;###autoload (when (file-readable-p (expand-file-name | 120 | ;;;###autoload (when (vc-find-root f admin-dir) |
| 121 | ;;;###autoload (concat admin-dir "/entries") | ||
| 122 | ;;;###autoload (file-name-directory f))) | ||
| 123 | ;;;###autoload (load "vc-svn") | 121 | ;;;###autoload (load "vc-svn") |
| 124 | ;;;###autoload (vc-svn-registered f)))) | 122 | ;;;###autoload (vc-svn-registered f)))) |
| 125 | 123 | ||
| 126 | (defun vc-svn-registered (file) | 124 | (defun vc-svn-registered (file) |
| 127 | "Check if FILE is SVN registered." | 125 | "Check if FILE is SVN registered." |
| 128 | (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory | 126 | (when (vc-svn-root file) |
| 129 | "/entries") | ||
| 130 | (file-name-directory file))) | ||
| 131 | (with-temp-buffer | 127 | (with-temp-buffer |
| 132 | (cd (file-name-directory file)) | 128 | (cd (file-name-directory file)) |
| 133 | (let* (process-file-side-effects | 129 | (let* (process-file-side-effects |
| @@ -275,14 +271,12 @@ Passes either `vc-svn-register-switches' or `vc-register-switches' | |||
| 275 | to the SVN command." | 271 | to the SVN command." |
| 276 | (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register))) | 272 | (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register))) |
| 277 | 273 | ||
| 278 | (defun vc-svn-responsible-p (file) | 274 | (defun vc-svn-root (file) |
| 279 | "Return non-nil if SVN thinks it is responsible for FILE." | 275 | (vc-find-root file vc-svn-admin-directory)) |
| 280 | (file-directory-p (expand-file-name vc-svn-admin-directory | ||
| 281 | (if (file-directory-p file) | ||
| 282 | file | ||
| 283 | (file-name-directory file))))) | ||
| 284 | 276 | ||
| 285 | (defalias 'vc-svn-could-register 'vc-svn-responsible-p | 277 | (defalias 'vc-svn-responsible-p 'vc-svn-root) |
| 278 | |||
| 279 | (defalias 'vc-svn-could-register 'vc-svn-root | ||
| 286 | "Return non-nil if FILE could be registered in SVN. | 280 | "Return non-nil if FILE could be registered in SVN. |
| 287 | This is only possible if SVN is responsible for FILE's directory.") | 281 | This is only possible if SVN is responsible for FILE's directory.") |
| 288 | 282 | ||
| @@ -594,20 +588,10 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 594 | 588 | ||
| 595 | (defun vc-svn-repository-hostname (dirname) | 589 | (defun vc-svn-repository-hostname (dirname) |
| 596 | (with-temp-buffer | 590 | (with-temp-buffer |
| 597 | (let ((coding-system-for-read | 591 | (let (process-file-side-effects) |
| 598 | (or file-name-coding-system | 592 | (vc-svn-command t t dirname "info" "--xml")) |
| 599 | default-file-name-coding-system))) | ||
| 600 | (vc-insert-file (expand-file-name (concat vc-svn-admin-directory | ||
| 601 | "/entries") | ||
| 602 | dirname))) | ||
| 603 | (goto-char (point-min)) | 593 | (goto-char (point-min)) |
| 604 | (when (re-search-forward | 594 | (when (re-search-forward "<url>\\(.*\\)</url>" nil t) |
| 605 | ;; Old `svn' used name="svn:this_dir", newer use just name="". | ||
| 606 | (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" | ||
| 607 | "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | ||
| 608 | "url=\"\\(?1:[^\"]+\\)\"" | ||
| 609 | ;; Yet newer ones don't use XML any more. | ||
| 610 | "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t) | ||
| 611 | ;; This is not a hostname but a URL. This may actually be considered | 595 | ;; This is not a hostname but a URL. This may actually be considered |
| 612 | ;; as a feature since it allows vc-svn-stay-local to specify different | 596 | ;; as a feature since it allows vc-svn-stay-local to specify different |
| 613 | ;; behavior for different modules on the same server. | 597 | ;; behavior for different modules on the same server. |
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index d1cd1c04e00..60defac0b18 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2011-02-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (USE_X_TOOLKIT, RM, TOOLKIT_DEFINES): Remove. | ||
| 4 | (ALL_CFLAGS): Remove -I. | ||
| 5 | (config_h, lisp_h, src_h): New variables. | ||
| 6 | (globals_h): Rename from $globals. | ||
| 7 | ($(globals_h)): Check cd exit status. | ||
| 8 | (lwlib.o): Remove special rule. | ||
| 9 | (lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o) | ||
| 10 | (xlwmenu.o): Add lisp.h and config.h to prereqs. | ||
| 11 | (lwlib-utils.o): Add lwlib.h to prereqs. | ||
| 12 | (lwlib.o): Add lwlib-utils.h and lwlib-Xm.h to prereqs. | ||
| 13 | (lwlib-Xlw.o): Add xlwmenu.h to prereqs. | ||
| 14 | (xlwmenu.o): Add ../src/xterm.h to prereqs. | ||
| 15 | (mostlyclean): Forget about "core" files. | ||
| 16 | |||
| 1 | 2011-02-10 Glenn Morris <rgm@gnu.org> | 17 | 2011-02-10 Glenn Morris <rgm@gnu.org> |
| 2 | 18 | ||
| 3 | * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c: | 19 | * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c: |
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index 68b465dff30..baaa198d7b9 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in | |||
| @@ -36,61 +36,64 @@ CC=@CC@ | |||
| 36 | CFLAGS=@CFLAGS@ | 36 | CFLAGS=@CFLAGS@ |
| 37 | CPPFLAGS=@CPPFLAGS@ | 37 | CPPFLAGS=@CPPFLAGS@ |
| 38 | RANLIB=@RANLIB@ | 38 | RANLIB=@RANLIB@ |
| 39 | # See below--@X_TOOLKIT_TYPE@ is used below. | ||
| 40 | USE_X_TOOLKIT=@X_TOOLKIT_TYPE@ | ||
| 41 | 39 | ||
| 42 | AR = ar cq | 40 | AR = ar cq |
| 43 | RM = rm -f | ||
| 44 | 41 | ||
| 45 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o | 42 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o |
| 46 | MOTIF_OBJS = lwlib-Xm.o | 43 | MOTIF_OBJS = lwlib-Xm.o |
| 47 | 44 | ||
| 48 | TOOLKIT_DEFINES = | 45 | ## LUCID_OBJS or MOTIF_OBJS. |
| 49 | TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS) | 46 | TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS) |
| 50 | 47 | ||
| 51 | OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o | 48 | OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o |
| 52 | 49 | ||
| 53 | # ../src is needed to find config.h. | 50 | ## ../src is where the generated file (config.h, globals.h) are. |
| 51 | ## $(srcdir)/../src is where the non-generated files (lisp.h) are. | ||
| 52 | ## (In an out-of-tree build, these two are not the same.) | ||
| 53 | ## $(srcdir) is where the lwlib sources are. | ||
| 54 | ## There are no generated lwlib files, hence no need for -I. | ||
| 54 | ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ | 55 | ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ |
| 55 | $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ | 56 | $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ |
| 56 | ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} $(CFLAGS) \ | 57 | $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \ |
| 57 | -DHAVE_CONFIG_H -Demacs -I. -I../src -I${srcdir} -I${srcdir}/../src | 58 | -DHAVE_CONFIG_H -Demacs -I../src -I$(srcdir) -I$(srcdir)/../src |
| 58 | 59 | ||
| 59 | .c.o: | 60 | .c.o: |
| 60 | $(CC) -c $(CPPFLAGS) ${ALL_CFLAGS} $< | 61 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
| 61 | 62 | ||
| 62 | all:: liblw.a | 63 | all:: liblw.a |
| 63 | 64 | ||
| 64 | liblw.a: $(OBJS) | 65 | liblw.a: $(OBJS) |
| 65 | $(RM) $@ | 66 | rm -f $@ |
| 66 | $(AR) $@ $(OBJS) | 67 | $(AR) $@ $(OBJS) |
| 67 | $(RANLIB) $@ | 68 | $(RANLIB) $@ |
| 68 | 69 | ||
| 70 | ## Generated files in ../src, non-generated in $(srcdir)/../src. | ||
| 71 | config_h = ../src/config.h | ||
| 72 | lisp_h = $(srcdir)/../src/lisp.h | ||
| 69 | ## lisp.h includes this. | 73 | ## lisp.h includes this. |
| 70 | globals = ../src/globals.h | 74 | globals_h = ../src/globals.h |
| 75 | src_h = $(config_h) $(lisp_h) $(globals_h) | ||
| 71 | 76 | ||
| 72 | $(globals): | 77 | $(globals_h): |
| 73 | cd ../src; $(MAKE) $(MFLAGS) globals.h | 78 | cd ../src && $(MAKE) $(MFLAGS) globals.h |
| 74 | 79 | ||
| 75 | # Depend on Makefile so that we recompile if TOOLKIT_DEFINES changes. | 80 | lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h |
| 76 | lwlib.o: $(srcdir)/lwlib.c Makefile | 81 | lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \ |
| 77 | $(CC) -c $(CPPFLAGS) $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c | 82 | lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h |
| 78 | 83 | lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h | |
| 79 | lwlib-utils.o: $(globals) lwlib-utils.c lwlib-utils.h | 84 | lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h |
| 80 | lwlib.o: $(globals) lwlib.c lwlib.h lwlib-int.h lwlib-Xaw.h lwlib-Xlw.h | 85 | lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h |
| 81 | lwlib-Xlw.o: $(globals) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h | 86 | xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \ |
| 82 | lwlib-Xaw.o: $(globals) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h | 87 | $(srcdir)/../src/xterm.h |
| 83 | lwlib-Xm.o: $(globals) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h | ||
| 84 | xlwmenu.o: $(globals) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h | ||
| 85 | 88 | ||
| 86 | mostlyclean: | 89 | mostlyclean: |
| 87 | $(RM) *.o core liblw.a \#* | 90 | rm -f *.o liblw.a \#* |
| 88 | 91 | ||
| 89 | clean: mostlyclean | 92 | clean: mostlyclean |
| 90 | distclean: clean | 93 | distclean: clean |
| 91 | $(RM) Makefile | 94 | rm -f Makefile |
| 92 | maintainer-clean: distclean | 95 | maintainer-clean: distclean |
| 93 | $(RM) TAGS | 96 | rm -f TAGS |
| 94 | 97 | ||
| 95 | TAGS: | 98 | TAGS: |
| 96 | ../lib-src/etags $(srcdir)/*.[ch] | 99 | ../lib-src/etags $(srcdir)/*.[ch] |
diff --git a/src/ChangeLog b/src/ChangeLog index 635a2d72f9c..617bd23ab78 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-02-10 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-02-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Remove no-longer needed getloadavg symbols. | 3 | Remove no-longer needed getloadavg symbols. |
| 4 | * m/alpha.h (LOAD_AVE_TYPE, LOAD_AVE_CVT): Remove. | 4 | * m/alpha.h (LOAD_AVE_TYPE, LOAD_AVE_CVT): Remove. |
| @@ -24,6 +24,19 @@ | |||
| 24 | * src/s/netbsd.h (HAVE_GETLOADAVG): Likewise. | 24 | * src/s/netbsd.h (HAVE_GETLOADAVG): Likewise. |
| 25 | * config.in: Regenerate. | 25 | * config.in: Regenerate. |
| 26 | 26 | ||
| 27 | 2011-02-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 28 | |||
| 29 | Port to Solaris 10, which doesn't support FC_HINT_STYLE. | ||
| 30 | * xftfont.c (FC_HINT_STYLE): #define to "hintstyle" if not | ||
| 31 | defined. | ||
| 32 | * xsettings.c (parse_settings, apply_xft_settings): Don't assume | ||
| 33 | FC_HINT_STYLE is supported. | ||
| 34 | |||
| 35 | 2011-02-11 Jan Djärv <jan.h.d@swipnet.se> | ||
| 36 | |||
| 37 | * xterm.c (x_set_frame_alpha): Access data before it is free:d. | ||
| 38 | Make sure we don't do x_catch_errors twice. | ||
| 39 | |||
| 27 | 2011-02-10 Glenn Morris <rgm@gnu.org> | 40 | 2011-02-10 Glenn Morris <rgm@gnu.org> |
| 28 | 41 | ||
| 29 | * Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. | 42 | * Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. |
diff --git a/src/xftfont.c b/src/xftfont.c index 084ca735171..695527c4236 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -187,17 +187,20 @@ xftfont_fix_match (FcPattern *pat, FcPattern *match) | |||
| 187 | double dpi; | 187 | double dpi; |
| 188 | 188 | ||
| 189 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b); | 189 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b); |
| 190 | if (! b) | 190 | if (! b) |
| 191 | { | 191 | { |
| 192 | FcPatternDel (match, FC_ANTIALIAS); | 192 | FcPatternDel (match, FC_ANTIALIAS); |
| 193 | FcPatternAddBool (match, FC_ANTIALIAS, FcFalse); | 193 | FcPatternAddBool (match, FC_ANTIALIAS, FcFalse); |
| 194 | } | 194 | } |
| 195 | FcPatternGetBool (pat, FC_HINTING, 0, &b); | 195 | FcPatternGetBool (pat, FC_HINTING, 0, &b); |
| 196 | if (! b) | 196 | if (! b) |
| 197 | { | 197 | { |
| 198 | FcPatternDel (match, FC_HINTING); | 198 | FcPatternDel (match, FC_HINTING); |
| 199 | FcPatternAddBool (match, FC_HINTING, FcFalse); | 199 | FcPatternAddBool (match, FC_HINTING, FcFalse); |
| 200 | } | 200 | } |
| 201 | #ifndef FC_HINT_STYLE | ||
| 202 | # define FC_HINT_STYLE "hintstyle" | ||
| 203 | #endif | ||
| 201 | if (FcResultMatch == FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i)) | 204 | if (FcResultMatch == FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i)) |
| 202 | { | 205 | { |
| 203 | FcPatternDel (match, FC_HINT_STYLE); | 206 | FcPatternDel (match, FC_HINT_STYLE); |
| @@ -781,4 +784,3 @@ syms_of_xftfont (void) | |||
| 781 | 784 | ||
| 782 | register_font_driver (&xftfont_driver, NULL); | 785 | register_font_driver (&xftfont_driver, NULL); |
| 783 | } | 786 | } |
| 784 | |||
diff --git a/src/xsettings.c b/src/xsettings.c index e3d2c6e9efb..097b2477e03 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -75,7 +75,7 @@ enum { | |||
| 75 | SEEN_FONT = 0x40, | 75 | SEEN_FONT = 0x40, |
| 76 | SEEN_TB_STYLE = 0x80, | 76 | SEEN_TB_STYLE = 0x80, |
| 77 | }; | 77 | }; |
| 78 | struct xsettings | 78 | struct xsettings |
| 79 | { | 79 | { |
| 80 | #ifdef HAVE_XFT | 80 | #ifdef HAVE_XFT |
| 81 | FcBool aa, hinting; | 81 | FcBool aa, hinting; |
| @@ -104,7 +104,7 @@ something_changedCB (GConfClient *client, | |||
| 104 | gpointer user_data) | 104 | gpointer user_data) |
| 105 | { | 105 | { |
| 106 | GConfValue *v = gconf_entry_get_value (entry); | 106 | GConfValue *v = gconf_entry_get_value (entry); |
| 107 | 107 | ||
| 108 | if (!v) return; | 108 | if (!v) return; |
| 109 | if (v->type == GCONF_VALUE_STRING) | 109 | if (v->type == GCONF_VALUE_STRING) |
| 110 | { | 110 | { |
| @@ -196,7 +196,7 @@ get_prop_window (struct x_display_info *dpyinfo) | |||
| 196 | 4 CARD32 last-change-serial | 196 | 4 CARD32 last-change-serial |
| 197 | 197 | ||
| 198 | and then the value, For string: | 198 | and then the value, For string: |
| 199 | 199 | ||
| 200 | bytes type what | 200 | bytes type what |
| 201 | ------------------------------------ | 201 | ------------------------------------ |
| 202 | 4 CARD32 n = value-length | 202 | 4 CARD32 n = value-length |
| @@ -280,7 +280,7 @@ parse_settings (unsigned char *prop, | |||
| 280 | (strcmp (XSETTINGS_FONT_NAME, name) == 0) | 280 | (strcmp (XSETTINGS_FONT_NAME, name) == 0) |
| 281 | || (strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0); | 281 | || (strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0); |
| 282 | 282 | ||
| 283 | switch (type) | 283 | switch (type) |
| 284 | { | 284 | { |
| 285 | case 0: /* Integer */ | 285 | case 0: /* Integer */ |
| 286 | if (bytes_parsed+4 > bytes) return BadLength; | 286 | if (bytes_parsed+4 > bytes) return BadLength; |
| @@ -310,14 +310,14 @@ parse_settings (unsigned char *prop, | |||
| 310 | case 2: /* RGB value */ | 310 | case 2: /* RGB value */ |
| 311 | /* No need to parse this */ | 311 | /* No need to parse this */ |
| 312 | if (bytes_parsed+8 > bytes) return BadLength; | 312 | if (bytes_parsed+8 > bytes) return BadLength; |
| 313 | bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */ | 313 | bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */ |
| 314 | break; | 314 | break; |
| 315 | 315 | ||
| 316 | default: /* Parse Error */ | 316 | default: /* Parse Error */ |
| 317 | return BadValue; | 317 | return BadValue; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | if (want_this) | 320 | if (want_this) |
| 321 | { | 321 | { |
| 322 | ++settings_seen; | 322 | ++settings_seen; |
| 323 | if (strcmp (name, XSETTINGS_FONT_NAME) == 0) | 323 | if (strcmp (name, XSETTINGS_FONT_NAME) == 0) |
| @@ -341,6 +341,7 @@ parse_settings (unsigned char *prop, | |||
| 341 | settings->seen |= SEEN_HINTING; | 341 | settings->seen |= SEEN_HINTING; |
| 342 | settings->hinting = ival != 0; | 342 | settings->hinting = ival != 0; |
| 343 | } | 343 | } |
| 344 | # ifdef FC_HINT_STYLE | ||
| 344 | else if (strcmp (name, "Xft/HintStyle") == 0) | 345 | else if (strcmp (name, "Xft/HintStyle") == 0) |
| 345 | { | 346 | { |
| 346 | settings->seen |= SEEN_HINTSTYLE; | 347 | settings->seen |= SEEN_HINTSTYLE; |
| @@ -355,6 +356,7 @@ parse_settings (unsigned char *prop, | |||
| 355 | else | 356 | else |
| 356 | settings->seen &= ~SEEN_HINTSTYLE; | 357 | settings->seen &= ~SEEN_HINTSTYLE; |
| 357 | } | 358 | } |
| 359 | # endif | ||
| 358 | else if (strcmp (name, "Xft/RGBA") == 0) | 360 | else if (strcmp (name, "Xft/RGBA") == 0) |
| 359 | { | 361 | { |
| 360 | settings->seen |= SEEN_RGBA; | 362 | settings->seen |= SEEN_RGBA; |
| @@ -442,7 +444,9 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 442 | pat); | 444 | pat); |
| 443 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); | 445 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); |
| 444 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); | 446 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); |
| 447 | # ifdef FC_HINT_STYLE | ||
| 445 | FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &oldsettings.hintstyle); | 448 | FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &oldsettings.hintstyle); |
| 449 | # endif | ||
| 446 | FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter); | 450 | FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter); |
| 447 | FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba); | 451 | FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba); |
| 448 | FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi); | 452 | FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi); |
| @@ -488,6 +492,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 488 | if (strlen (buf) > 0) strcat (buf, ", "); | 492 | if (strlen (buf) > 0) strcat (buf, ", "); |
| 489 | sprintf (buf+strlen (buf), "LCDFilter: %d", oldsettings.lcdfilter); | 493 | sprintf (buf+strlen (buf), "LCDFilter: %d", oldsettings.lcdfilter); |
| 490 | 494 | ||
| 495 | # ifdef FC_HINT_STYLE | ||
| 491 | if ((settings->seen & SEEN_HINTSTYLE) != 0 | 496 | if ((settings->seen & SEEN_HINTSTYLE) != 0 |
| 492 | && oldsettings.hintstyle != settings->hintstyle) | 497 | && oldsettings.hintstyle != settings->hintstyle) |
| 493 | { | 498 | { |
| @@ -496,6 +501,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 496 | ++changed; | 501 | ++changed; |
| 497 | oldsettings.hintstyle = settings->hintstyle; | 502 | oldsettings.hintstyle = settings->hintstyle; |
| 498 | } | 503 | } |
| 504 | # endif | ||
| 499 | if (strlen (buf) > 0) strcat (buf, ", "); | 505 | if (strlen (buf) > 0) strcat (buf, ", "); |
| 500 | sprintf (buf+strlen (buf), "Hintstyle: %d", oldsettings.hintstyle); | 506 | sprintf (buf+strlen (buf), "Hintstyle: %d", oldsettings.hintstyle); |
| 501 | 507 | ||
| @@ -508,7 +514,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 508 | FcPatternAddDouble (pat, FC_DPI, settings->dpi); | 514 | FcPatternAddDouble (pat, FC_DPI, settings->dpi); |
| 509 | ++changed; | 515 | ++changed; |
| 510 | oldsettings.dpi = settings->dpi; | 516 | oldsettings.dpi = settings->dpi; |
| 511 | 517 | ||
| 512 | /* Change the DPI on this display and all frames on the display. */ | 518 | /* Change the DPI on this display and all frames on the display. */ |
| 513 | dpyinfo->resy = dpyinfo->resx = settings->dpi; | 519 | dpyinfo->resy = dpyinfo->resx = settings->dpi; |
| 514 | FOR_EACH_FRAME (tail, frame) | 520 | FOR_EACH_FRAME (tail, frame) |
| @@ -565,7 +571,7 @@ read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p) | |||
| 565 | 571 | ||
| 566 | if (settings.seen & SEEN_FONT) | 572 | if (settings.seen & SEEN_FONT) |
| 567 | { | 573 | { |
| 568 | if (!current_font || strcmp (current_font, settings.font) != 0) | 574 | if (!current_font || strcmp (current_font, settings.font) != 0) |
| 569 | { | 575 | { |
| 570 | free (current_font); | 576 | free (current_font); |
| 571 | current_font = settings.font; | 577 | current_font = settings.font; |
| @@ -774,4 +780,3 @@ If this variable is nil, Emacs ignores system font changes. */); | |||
| 774 | 780 | ||
| 775 | Fprovide (intern_c_string ("dynamic-setting"), Qnil); | 781 | Fprovide (intern_c_string ("dynamic-setting"), Qnil); |
| 776 | } | 782 | } |
| 777 | |||
diff --git a/src/xterm.c b/src/xterm.c index 31f002fa05c..52d79e8dad7 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -488,17 +488,16 @@ x_set_frame_alpha (struct frame *f) | |||
| 488 | 488 | ||
| 489 | if (rc == Success && actual != None) | 489 | if (rc == Success && actual != None) |
| 490 | { | 490 | { |
| 491 | unsigned long value = *(unsigned long *)data; | ||
| 491 | XFree ((void *) data); | 492 | XFree ((void *) data); |
| 492 | if (*(unsigned long *)data == opac) | 493 | if (value == opac) |
| 493 | { | 494 | { |
| 494 | x_uncatch_errors (); | 495 | x_uncatch_errors (); |
| 495 | return; | 496 | return; |
| 496 | } | 497 | } |
| 497 | } | 498 | } |
| 498 | x_uncatch_errors (); | ||
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | x_catch_errors (dpy); | ||
| 502 | XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity, | 501 | XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity, |
| 503 | XA_CARDINAL, 32, PropModeReplace, | 502 | XA_CARDINAL, 32, PropModeReplace, |
| 504 | (unsigned char *) &opac, 1L); | 503 | (unsigned char *) &opac, 1L); |