diff options
| author | Glenn Morris | 2014-11-01 11:05:30 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-11-01 11:05:30 -0700 |
| commit | d5d8ca30e5f481a32414c42bcc3b5a042061ff07 (patch) | |
| tree | febc223f19801e8e01b9498c5ba9d6c7bfcfa091 | |
| parent | e54c5e4e25098be9df9d9c46d32165887b0ff9d3 (diff) | |
| parent | b99e8f833671a2b52be654eb477830294c624a97 (diff) | |
| download | emacs-d5d8ca30e5f481a32414c42bcc3b5a042061ff07.tar.gz emacs-d5d8ca30e5f481a32414c42bcc3b5a042061ff07.zip | |
Merge from emacs-24; up to 117656
| -rw-r--r-- | admin/ChangeLog | 10 | ||||
| -rw-r--r-- | admin/notes/repo | 19 | ||||
| -rw-r--r-- | doc/man/emacsclient.1 | 2 | ||||
| -rw-r--r-- | etc/emacs.desktop | 1 | ||||
| -rw-r--r-- | lisp/ChangeLog | 41 | ||||
| -rw-r--r-- | lisp/Makefile.in | 12 | ||||
| -rw-r--r-- | lisp/delsel.el | 76 | ||||
| -rw-r--r-- | lisp/emulation/cua-base.el | 72 | ||||
| -rw-r--r-- | lisp/net/tramp-cache.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 61 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 24 | ||||
| -rw-r--r-- | lisp/simple.el | 10 | ||||
| -rw-r--r-- | src/ChangeLog | 30 | ||||
| -rw-r--r-- | src/emacs.c | 8 | ||||
| -rw-r--r-- | src/macfont.m | 7 | ||||
| -rw-r--r-- | src/nsfns.m | 32 | ||||
| -rw-r--r-- | src/nsterm.h | 10 | ||||
| -rw-r--r-- | src/nsterm.m | 55 | ||||
| -rw-r--r-- | src/xdisp.c | 9 |
20 files changed, 312 insertions, 177 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 6bd5ceaca55..5dcdc563e56 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | 2014-11-01 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * notes/repo (Notes): Reword the stylistic guidance for commit log | ||
| 4 | messages so that they are in line with Emacs development practices | ||
| 5 | and style guidance. | ||
| 6 | |||
| 1 | 2014-10-27 Eric S. Raymond <esr@thyrsus.com> | 7 | 2014-10-27 Eric S. Raymond <esr@thyrsus.com> |
| 2 | 8 | ||
| 3 | * notes/bzr: Renamed to notes/repo, reorganixed to separate | 9 | * notes/bzr: Rename to notes/repo, reorganize to separate |
| 4 | VCS-dependent from VCS-independent stuff. Added guidance about | 10 | VCS-dependent from VCS-independent stuff. Add guidance about |
| 5 | commit-comment format under DVCSes. | 11 | commit-comment format under DVCSes. |
| 6 | 12 | ||
| 7 | * notes/BRANCH: Merged into notes/repo. | 13 | * notes/BRANCH: Merged into notes/repo. |
diff --git a/admin/notes/repo b/admin/notes/repo index 2044bb9ea2d..276dd372b37 100644 --- a/admin/notes/repo +++ b/admin/notes/repo | |||
| @@ -5,18 +5,15 @@ NOTES ON COMMITTING TO EMACS'S REPOSITORY -*- outline -*- | |||
| 5 | Commits should follow the conventions used in all modern distributed | 5 | Commits should follow the conventions used in all modern distributed |
| 6 | version-control systems. That is, they should consist of | 6 | version-control systems. That is, they should consist of |
| 7 | 7 | ||
| 8 | - A self-contained topic line no more than 75 chars long. | 8 | - A self-contained topic line, preferably no more than 75 chars long. |
| 9 | 9 | ||
| 10 | - If other content follows the topic line, there should be | 10 | - If other content follows the topic line, there should be a blank |
| 11 | a blank line separating the two. | 11 | line separating the two. |
| 12 | 12 | ||
| 13 | Try to keep your commits - and your commit comments - small. If | 13 | - Follow the blank line with ChangeLog-like entries for the specific |
| 14 | you feel an urge to put a bullet list in your commit comment, it's | 14 | changes you made, if any. (As long as Emacs maintains ChangeLog |
| 15 | doing too many things at once. | 15 | files, just copy the entries you made in them to the commit message |
| 16 | 16 | after the blank line.) | |
| 17 | Yes, these directins are a departure from historical Emacs practice, | ||
| 18 | but it helps modern log-viewing and summary tools work better so that | ||
| 19 | other people can comprehend your code. | ||
| 20 | 17 | ||
| 21 | * Commit to the right branch | 18 | * Commit to the right branch |
| 22 | 19 | ||
| @@ -184,7 +181,7 @@ the trunk at all, use `bzr resolve path/to/file --take-this' to keep the | |||
| 184 | trunk version. Prior to bzr 2.2.3, this may fail. You can just | 181 | trunk version. Prior to bzr 2.2.3, this may fail. You can just |
| 185 | delete the .OTHER etc files by hand and use bzr resolve path/to/file. | 182 | delete the .OTHER etc files by hand and use bzr resolve path/to/file. |
| 186 | 183 | ||
| 187 | * Sanity-checking branch merges | 184 | * Sanity-checking branch merges |
| 188 | 185 | ||
| 189 | Inspect the ChangeLog entries (e.g. in case too many entries have been | 186 | Inspect the ChangeLog entries (e.g. in case too many entries have been |
| 190 | included or whitespace between entries needs fixing). bzrmerge tries | 187 | included or whitespace between entries needs fixing). bzrmerge tries |
diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1 index a5abcff0d5d..6930271e548 100644 --- a/doc/man/emacsclient.1 +++ b/doc/man/emacsclient.1 | |||
| @@ -52,7 +52,7 @@ options starting with two dashes (`-'). | |||
| 52 | .B \-a, \-\-alternate-editor=EDITOR | 52 | .B \-a, \-\-alternate-editor=EDITOR |
| 53 | if the Emacs server is not running, run the specified editor instead. | 53 | if the Emacs server is not running, run the specified editor instead. |
| 54 | This can also be specified via the `ALTERNATE_EDITOR' environment variable. | 54 | This can also be specified via the `ALTERNATE_EDITOR' environment variable. |
| 55 | If the value of EDITOR is the empty string, run `emacs --daemon' to | 55 | If the value of EDITOR is the empty string, run `emacs \-\-daemon' to |
| 56 | start Emacs in daemon mode, and try to connect to it. | 56 | start Emacs in daemon mode, and try to connect to it. |
| 57 | .TP | 57 | .TP |
| 58 | .B -c, \-\-create-frame | 58 | .B -c, \-\-create-frame |
diff --git a/etc/emacs.desktop b/etc/emacs.desktop index ff303a61536..2e6496e58c9 100644 --- a/etc/emacs.desktop +++ b/etc/emacs.desktop | |||
| @@ -9,3 +9,4 @@ Type=Application | |||
| 9 | Terminal=false | 9 | Terminal=false |
| 10 | Categories=Development;TextEditor; | 10 | Categories=Development;TextEditor; |
| 11 | StartupWMClass=Emacs | 11 | StartupWMClass=Emacs |
| 12 | Keywords=Text;Editor; | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba63ff7772a..fc7e7392551 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,44 @@ | |||
| 1 | 2014-11-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp-cache.el (tramp-get-file-property) | ||
| 4 | (tramp-set-file-property): Check that `tramp-cache-get-count-*' | ||
| 5 | and `tramp-cache-set-count-*' are bound. Otherwise, there might | ||
| 6 | be compiler warnings. | ||
| 7 | |||
| 8 | * net/tramp-sh.el (tramp-get-remote-uid, tramp-get-remote-gid): | ||
| 9 | Return -1 respective "UNKNOWN", if uid or gid cannot be determined. | ||
| 10 | |||
| 11 | 2014-11-01 Eli Zaretskii <eliz@gnu.org> | ||
| 12 | |||
| 13 | * progmodes/compile.el (compilation-mode): Turn off deferred | ||
| 14 | fontifications locally. (Bug#18856) | ||
| 15 | |||
| 16 | 2014-11-01 Wolfgang Jenkner <wjenkner@inode.at> | ||
| 17 | |||
| 18 | * net/tramp-sh.el (tramp-send-command): Fix the case where the | ||
| 19 | remote-echo connection property is non-nil (bug#18858). | ||
| 20 | |||
| 21 | 2014-11-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 22 | |||
| 23 | * simple.el (newline): Add assertions to try and help catch bug#18913. | ||
| 24 | |||
| 25 | * emulation/cua-base.el (cua-delete-region): Use delete-active-region | ||
| 26 | (bug#18886). | ||
| 27 | (cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove. | ||
| 28 | |||
| 29 | 2014-11-01 Kim F. Storm <storm@cua.dk> | ||
| 30 | |||
| 31 | Restore cua-delete-copy-to-register-0 and M-v command (bug#18886). | ||
| 32 | * delsel.el (delete-selection-save-to-register) | ||
| 33 | (delsel--replace-text-or-position): New vars. | ||
| 34 | (delete-active-region): Use them. | ||
| 35 | (delete-selection-repeat-replace-region): New command, moved from | ||
| 36 | cua-base.el. | ||
| 37 | * emulation/cua-base.el (cua--repeat-replace-text): Remove var. | ||
| 38 | (cua-repeat-replace-region): Move command to delsel.el. | ||
| 39 | (cua--init-keymaps): Update binding accordingly. | ||
| 40 | (cua-mode): Set delete-selection-save-to-register. | ||
| 41 | |||
| 1 | 2014-11-01 Alan Mackenzie <acm@muc.de> | 42 | 2014-11-01 Alan Mackenzie <acm@muc.de> |
| 2 | 43 | ||
| 3 | Make blink-parens work with a closing template delimiter. | 44 | Make blink-parens work with a closing template delimiter. |
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index b8b03a47362..84d92c21e7b 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -201,12 +201,12 @@ update-subdirs: | |||
| 201 | # Some modes of make-dist use this. | 201 | # Some modes of make-dist use this. |
| 202 | updates: update-subdirs autoloads finder-data custom-deps | 202 | updates: update-subdirs autoloads finder-data custom-deps |
| 203 | 203 | ||
| 204 | # This is useful after a repostiory fetch; but it doesn't do anything that a | 204 | # This is useful after updating from the repository; but it doesn't do |
| 205 | # plain "make" at top-level doesn't. | 205 | # anything that a plain "make" at top-level doesn't. The only |
| 206 | # The only difference between this and this directory's "all" rule | 206 | # difference between this and this directory's "all" rule is that this |
| 207 | # is that this runs "autoloads" as well (because it uses "compile" | 207 | # runs "autoloads" as well (because it uses "compile" rather than |
| 208 | # rather than "compile-main"). In a bootstrap, $(lisp) in src/Makefile | 208 | # "compile-main"). In a bootstrap, $(lisp) in src/Makefile triggers |
| 209 | # triggers this directory's autoloads rule. | 209 | # this directory's autoloads rule. |
| 210 | repo-update: compile finder-data custom-deps | 210 | repo-update: compile finder-data custom-deps |
| 211 | 211 | ||
| 212 | # Update the AUTHORS file. | 212 | # Update the AUTHORS file. |
diff --git a/lisp/delsel.el b/lisp/delsel.el index 1ada02705fe..96794fce7aa 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el | |||
| @@ -54,6 +54,10 @@ | |||
| 54 | 54 | ||
| 55 | ;;; Code: | 55 | ;;; Code: |
| 56 | 56 | ||
| 57 | (defvar delete-selection-save-to-register nil | ||
| 58 | "If non-nil, deleted region text is stored in this register. | ||
| 59 | Value must be the register (key) to use.") | ||
| 60 | |||
| 57 | ;;;###autoload | 61 | ;;;###autoload |
| 58 | (defalias 'pending-delete-mode 'delete-selection-mode) | 62 | (defalias 'pending-delete-mode 'delete-selection-mode) |
| 59 | 63 | ||
| @@ -72,16 +76,78 @@ point regardless of any selection." | |||
| 72 | (remove-hook 'pre-command-hook 'delete-selection-pre-hook) | 76 | (remove-hook 'pre-command-hook 'delete-selection-pre-hook) |
| 73 | (add-hook 'pre-command-hook 'delete-selection-pre-hook))) | 77 | (add-hook 'pre-command-hook 'delete-selection-pre-hook))) |
| 74 | 78 | ||
| 79 | (defvar delsel--replace-text-or-position nil) | ||
| 80 | |||
| 75 | (defun delete-active-region (&optional killp) | 81 | (defun delete-active-region (&optional killp) |
| 76 | "Delete the active region. | 82 | "Delete the active region. |
| 77 | If KILLP in not-nil, the active region is killed instead of deleted." | 83 | If KILLP in not-nil, the active region is killed instead of deleted." |
| 78 | (if killp | 84 | (cond |
| 79 | ;; Don't allow `kill-region' to change the value of `this-command'. | 85 | (killp |
| 80 | (let (this-command) | 86 | ;; Don't allow `kill-region' to change the value of `this-command'. |
| 81 | (kill-region (point) (mark) t)) | 87 | (let (this-command) |
| 82 | (funcall region-extract-function 'delete-only)) | 88 | (kill-region (point) (mark) t))) |
| 89 | (delete-selection-save-to-register | ||
| 90 | (set-register delete-selection-save-to-register | ||
| 91 | (funcall region-extract-function t)) | ||
| 92 | (setq delsel--replace-text-or-position | ||
| 93 | (cons (current-buffer) | ||
| 94 | (and (consp buffer-undo-list) (car buffer-undo-list))))) | ||
| 95 | (t | ||
| 96 | (funcall region-extract-function 'delete-only))) | ||
| 83 | t) | 97 | t) |
| 84 | 98 | ||
| 99 | (defun delete-selection-repeat-replace-region (arg) | ||
| 100 | "Repeat replacing text of highlighted region with typed text. | ||
| 101 | Search for the next stretch of text identical to the region last replaced | ||
| 102 | by typing text over it and replaces it with the same stretch of text. | ||
| 103 | With ARG, repeat that many times. `C-u' means until end of buffer." | ||
| 104 | (interactive "P") | ||
| 105 | (let ((old-text (and delete-selection-save-to-register | ||
| 106 | (get-register delete-selection-save-to-register))) | ||
| 107 | (count (if (consp arg) (point-max) | ||
| 108 | (prefix-numeric-value current-prefix-arg)))) | ||
| 109 | (if (not (and old-text | ||
| 110 | (> (length old-text) 0) | ||
| 111 | (or (stringp delsel--replace-text-or-position) | ||
| 112 | (buffer-live-p (car delsel--replace-text-or-position))))) | ||
| 113 | (message "No known previous replacement") | ||
| 114 | ;; If this is the first use after overwriting regions, | ||
| 115 | ;; find the replacement text by looking at the undo list. | ||
| 116 | (when (consp delsel--replace-text-or-position) | ||
| 117 | (let ((buffer (car delsel--replace-text-or-position)) | ||
| 118 | (elt (cdr delsel--replace-text-or-position))) | ||
| 119 | (setq delsel--replace-text-or-position nil) | ||
| 120 | (with-current-buffer buffer | ||
| 121 | (save-restriction | ||
| 122 | (widen) | ||
| 123 | ;; Find the text that replaced the region via the undo list. | ||
| 124 | (let ((ul buffer-undo-list) u s e) | ||
| 125 | (when elt | ||
| 126 | (while (consp ul) | ||
| 127 | (setq u (car ul) ul (cdr ul)) | ||
| 128 | (cond | ||
| 129 | ((eq u elt) ;; got it | ||
| 130 | (setq ul nil)) | ||
| 131 | ((and (consp u) (integerp (car u)) (integerp (cdr u))) | ||
| 132 | (if (and s (= (cdr u) s)) | ||
| 133 | (setq s (car u)) | ||
| 134 | (setq s (car u) e (cdr u))))))) | ||
| 135 | (cond ((and s e (<= s e) (= s (mark t))) | ||
| 136 | (setq delsel--replace-text-or-position | ||
| 137 | (filter-buffer-substring s e)) | ||
| 138 | (set-text-properties | ||
| 139 | 0 (length delsel--replace-text-or-position) | ||
| 140 | nil delsel--replace-text-or-position)) | ||
| 141 | ((and (null s) (eq u elt)) ;; Nothing inserted. | ||
| 142 | (setq delsel--replace-text-or-position "")) | ||
| 143 | (t | ||
| 144 | (message "Cannot locate replacement text")))))))) | ||
| 145 | (while (and (> count 0) | ||
| 146 | delsel--replace-text-or-position | ||
| 147 | (search-forward old-text nil t)) | ||
| 148 | (replace-match delsel--replace-text-or-position nil t) | ||
| 149 | (setq count (1- count)))))) | ||
| 150 | |||
| 85 | (defun delete-selection-helper (type) | 151 | (defun delete-selection-helper (type) |
| 86 | "Delete selection according to TYPE: | 152 | "Delete selection according to TYPE: |
| 87 | `yank' | 153 | `yank' |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index ee70071b7ec..0b6891d6d6d 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -277,7 +277,7 @@ enabled." | |||
| 277 | 277 | ||
| 278 | (defcustom cua-remap-control-v t | 278 | (defcustom cua-remap-control-v t |
| 279 | "If non-nil, C-v binding is used for paste (yank). | 279 | "If non-nil, C-v binding is used for paste (yank). |
| 280 | Also, M-v is mapped to `cua-repeat-replace-region'." | 280 | Also, M-v is mapped to `delete-selection-repeat-replace-region'." |
| 281 | :type 'boolean | 281 | :type 'boolean |
| 282 | :group 'cua) | 282 | :group 'cua) |
| 283 | 283 | ||
| @@ -350,6 +350,8 @@ interpreted as a register number." | |||
| 350 | :group 'cua) | 350 | :group 'cua) |
| 351 | 351 | ||
| 352 | (defcustom cua-delete-copy-to-register-0 t | 352 | (defcustom cua-delete-copy-to-register-0 t |
| 353 | ;; FIXME: Obey delete-selection-save-to-register rather than hardcoding | ||
| 354 | ;; register 0. | ||
| 353 | "If non-nil, save last deleted region or rectangle to register 0." | 355 | "If non-nil, save last deleted region or rectangle to register 0." |
| 354 | :type 'boolean | 356 | :type 'boolean |
| 355 | :group 'cua) | 357 | :group 'cua) |
| @@ -788,26 +790,12 @@ Repeating prefix key when region is active works as a single prefix key." | |||
| 788 | 790 | ||
| 789 | ;;; Region specific commands | 791 | ;;; Region specific commands |
| 790 | 792 | ||
| 791 | (defvar cua--last-deleted-region-pos nil) | ||
| 792 | (defvar cua--last-deleted-region-text nil) | ||
| 793 | |||
| 794 | (defun cua-delete-region () | 793 | (defun cua-delete-region () |
| 795 | "Delete the active region. | 794 | "Delete the active region. |
| 796 | Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil." | 795 | Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil." |
| 797 | (interactive) | 796 | (interactive) |
| 798 | (let ((start (mark)) (end (point))) | 797 | (require 'delsel) |
| 799 | (or (<= start end) | 798 | (delete-active-region)) |
| 800 | (setq start (prog1 end (setq end start)))) | ||
| 801 | (setq cua--last-deleted-region-text | ||
| 802 | (funcall region-extract-function t)) | ||
| 803 | (if cua-delete-copy-to-register-0 | ||
| 804 | (set-register ?0 cua--last-deleted-region-text)) | ||
| 805 | (setq cua--last-deleted-region-pos | ||
| 806 | (cons (current-buffer) | ||
| 807 | (and (consp buffer-undo-list) | ||
| 808 | (car buffer-undo-list)))) | ||
| 809 | (cua--deactivate) | ||
| 810 | (/= start end))) | ||
| 811 | 799 | ||
| 812 | (defun cua-copy-region (arg) | 800 | (defun cua-copy-region (arg) |
| 813 | "Copy the region to the kill ring. | 801 | "Copy the region to the kill ring. |
| @@ -958,48 +946,8 @@ See also `exchange-point-and-mark'." | |||
| 958 | (t | 946 | (t |
| 959 | (let (mark-active) | 947 | (let (mark-active) |
| 960 | (exchange-point-and-mark) | 948 | (exchange-point-and-mark) |
| 961 | (if cua--rectangle | 949 | (if cua--rectangle |
| 962 | (cua--rectangle-corner 0)))))) | 950 | (cua--rectangle-corner 0)))))) |
| 963 | |||
| 964 | ;; Typed text that replaced the highlighted region. | ||
| 965 | (defvar cua--repeat-replace-text nil) | ||
| 966 | |||
| 967 | (defun cua-repeat-replace-region (arg) | ||
| 968 | "Repeat replacing text of highlighted region with typed text. | ||
| 969 | Searches for the next stretch of text identical to the region last | ||
| 970 | replaced by typing text over it and replaces it with the same stretch | ||
| 971 | of text." | ||
| 972 | (interactive "P") | ||
| 973 | (when cua--last-deleted-region-pos | ||
| 974 | (with-current-buffer (car cua--last-deleted-region-pos) | ||
| 975 | (save-restriction | ||
| 976 | (widen) | ||
| 977 | ;; Find the text that replaced the region via the undo list. | ||
| 978 | (let ((ul buffer-undo-list) | ||
| 979 | (elt (cdr cua--last-deleted-region-pos)) | ||
| 980 | u s e) | ||
| 981 | (when elt | ||
| 982 | (while (consp ul) | ||
| 983 | (setq u (car ul) ul (cdr ul)) | ||
| 984 | (cond | ||
| 985 | ((eq u elt) ;; got it | ||
| 986 | (setq ul nil)) | ||
| 987 | ((and (consp u) (integerp (car u)) (integerp (cdr u))) | ||
| 988 | (if (and s (= (cdr u) s)) | ||
| 989 | (setq s (car u)) | ||
| 990 | (setq s (car u) e (cdr u))))))) | ||
| 991 | (cond ((and s e (<= s e) (= s (mark t))) | ||
| 992 | (setq cua--repeat-replace-text (cua--filter-buffer-noprops s e))) | ||
| 993 | ((and (null s) (eq u elt)) ;; nothing inserted | ||
| 994 | (setq cua--repeat-replace-text | ||
| 995 | "")) | ||
| 996 | (t | ||
| 997 | (message "Cannot locate replacement text")))))) | ||
| 998 | (setq cua--last-deleted-region-pos nil)) | ||
| 999 | (if (and cua--last-deleted-region-text | ||
| 1000 | cua--repeat-replace-text | ||
| 1001 | (search-forward cua--last-deleted-region-text nil t nil)) | ||
| 1002 | (replace-match cua--repeat-replace-text arg t))) | ||
| 1003 | 951 | ||
| 1004 | (defun cua-help-for-region (&optional help) | 952 | (defun cua-help-for-region (&optional help) |
| 1005 | "Show region specific help in echo area." | 953 | "Show region specific help in echo area." |
| @@ -1320,7 +1268,8 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1320 | (define-key cua--cua-keys-keymap [(control z)] 'undo)) | 1268 | (define-key cua--cua-keys-keymap [(control z)] 'undo)) |
| 1321 | (when cua-remap-control-v | 1269 | (when cua-remap-control-v |
| 1322 | (define-key cua--cua-keys-keymap [(control v)] 'yank) | 1270 | (define-key cua--cua-keys-keymap [(control v)] 'yank) |
| 1323 | (define-key cua--cua-keys-keymap [(meta v)] 'cua-repeat-replace-region)) | 1271 | (define-key cua--cua-keys-keymap [(meta v)] |
| 1272 | 'delete-selection-repeat-replace-region)) | ||
| 1324 | 1273 | ||
| 1325 | (define-key cua--prefix-override-keymap [(control x)] 'cua--prefix-override-handler) | 1274 | (define-key cua--prefix-override-keymap [(control x)] 'cua--prefix-override-handler) |
| 1326 | (define-key cua--prefix-override-keymap [(control c)] 'cua--prefix-override-handler) | 1275 | (define-key cua--prefix-override-keymap [(control c)] 'cua--prefix-override-handler) |
| @@ -1359,6 +1308,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1359 | ;; delete-selection-mode | 1308 | ;; delete-selection-mode |
| 1360 | 1309 | ||
| 1361 | (defvar cua--saved-state nil) | 1310 | (defvar cua--saved-state nil) |
| 1311 | (defvar delete-selection-save-to-register) | ||
| 1362 | 1312 | ||
| 1363 | ;;;###autoload | 1313 | ;;;###autoload |
| 1364 | (define-minor-mode cua-mode | 1314 | (define-minor-mode cua-mode |
| @@ -1426,6 +1376,8 @@ the prefix fallback behavior." | |||
| 1426 | (if (and (boundp 'delete-selection-mode) delete-selection-mode) | 1376 | (if (and (boundp 'delete-selection-mode) delete-selection-mode) |
| 1427 | (delete-selection-mode -1))) | 1377 | (delete-selection-mode -1))) |
| 1428 | (if cua-highlight-region-shift-only (transient-mark-mode -1)) | 1378 | (if cua-highlight-region-shift-only (transient-mark-mode -1)) |
| 1379 | (if cua-delete-copy-to-register-0 | ||
| 1380 | (setq delete-selection-save-to-register ?0)) | ||
| 1429 | (cua--deactivate)) | 1381 | (cua--deactivate)) |
| 1430 | (cua--saved-state | 1382 | (cua--saved-state |
| 1431 | (if (nth 0 cua--saved-state) | 1383 | (if (nth 0 cua--saved-state) |
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 056b1bdaf91..a6b7500433b 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -144,7 +144,7 @@ Returns DEFAULT if not set." | |||
| 144 | (tramp-message key 8 "%s %s %s" file property value) | 144 | (tramp-message key 8 "%s %s %s" file property value) |
| 145 | (when (>= tramp-verbose 10) | 145 | (when (>= tramp-verbose 10) |
| 146 | (let* ((var (intern (concat "tramp-cache-get-count-" property))) | 146 | (let* ((var (intern (concat "tramp-cache-get-count-" property))) |
| 147 | (val (or (ignore-errors (symbol-value var)) 0))) | 147 | (val (or (and (boundp var) (symbol-value var)) 0))) |
| 148 | (set var (1+ val)))) | 148 | (set var (1+ val)))) |
| 149 | value)) | 149 | value)) |
| 150 | 150 | ||
| @@ -161,7 +161,7 @@ Returns VALUE." | |||
| 161 | (tramp-message key 8 "%s %s %s" file property value) | 161 | (tramp-message key 8 "%s %s %s" file property value) |
| 162 | (when (>= tramp-verbose 10) | 162 | (when (>= tramp-verbose 10) |
| 163 | (let* ((var (intern (concat "tramp-cache-set-count-" property))) | 163 | (let* ((var (intern (concat "tramp-cache-set-count-" property))) |
| 164 | (val (or (ignore-errors (symbol-value var)) 0))) | 164 | (val (or (and (boundp var) (symbol-value var)) 0))) |
| 165 | (set var (1+ val)))) | 165 | (set var (1+ val)))) |
| 166 | value)) | 166 | value)) |
| 167 | 167 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1976e0e7f66..e120aedfc01 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4769,6 +4769,17 @@ function waits for output unless NOOUTPUT is set." | |||
| 4769 | (when (tramp-get-connection-property p "remote-echo" nil) | 4769 | (when (tramp-get-connection-property p "remote-echo" nil) |
| 4770 | ;; We mark the command string that it can be erased in the output buffer. | 4770 | ;; We mark the command string that it can be erased in the output buffer. |
| 4771 | (tramp-set-connection-property p "check-remote-echo" t) | 4771 | (tramp-set-connection-property p "check-remote-echo" t) |
| 4772 | ;; If we put `tramp-echo-mark' after a trailing newline (which | ||
| 4773 | ;; is assumed to be unquoted) `tramp-send-string' doesn't see | ||
| 4774 | ;; that newline and adds `tramp-rsh-end-of-line' right after | ||
| 4775 | ;; `tramp-echo-mark', so the remote shell sees two consecutive | ||
| 4776 | ;; trailing line endings and sends two prompts after executing | ||
| 4777 | ;; the command, which confuses `tramp-wait-for-output'. | ||
| 4778 | (when (and (not (string= command "")) | ||
| 4779 | (string-equal (substring command -1) "\n")) | ||
| 4780 | (setq command (substring command 0 -1))) | ||
| 4781 | ;; No need to restore a trailing newline here since `tramp-send-string' | ||
| 4782 | ;; makes sure that the string ends in `tramp-rsh-end-of-line', anyway. | ||
| 4772 | (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) | 4783 | (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) |
| 4773 | ;; Send the command. | 4784 | ;; Send the command. |
| 4774 | (tramp-message vec 6 "%s" command) | 4785 | (tramp-message vec 6 "%s" command) |
| @@ -5278,17 +5289,20 @@ Return ATTR." | |||
| 5278 | 5289 | ||
| 5279 | (defun tramp-get-remote-uid (vec id-format) | 5290 | (defun tramp-get-remote-uid (vec id-format) |
| 5280 | (with-tramp-connection-property vec (format "uid-%s" id-format) | 5291 | (with-tramp-connection-property vec (format "uid-%s" id-format) |
| 5281 | (let ((res (cond | 5292 | (let ((res |
| 5282 | ((tramp-get-remote-id vec) | 5293 | (ignore-errors |
| 5283 | (tramp-get-remote-uid-with-id vec id-format)) | 5294 | (cond |
| 5284 | ((tramp-get-remote-perl vec) | 5295 | ((tramp-get-remote-id vec) |
| 5285 | (tramp-get-remote-uid-with-perl vec id-format)) | 5296 | (tramp-get-remote-uid-with-id vec id-format)) |
| 5286 | ((tramp-get-remote-python vec) | 5297 | ((tramp-get-remote-perl vec) |
| 5287 | (tramp-get-remote-uid-with-python vec id-format)) | 5298 | (tramp-get-remote-uid-with-perl vec id-format)) |
| 5288 | (t (tramp-error | 5299 | ((tramp-get-remote-python vec) |
| 5289 | vec 'file-error "Cannot determine remote uid"))))) | 5300 | (tramp-get-remote-uid-with-python vec id-format)))))) |
| 5290 | ;; The command might not always return a number. | 5301 | ;; Ensure there is a valid result. |
| 5291 | (if (and (equal id-format 'integer) (not (integerp res))) -1 res)))) | 5302 | (cond |
| 5303 | ((and (equal id-format 'integer) (not (integerp res))) -1) | ||
| 5304 | ((and (equal id-format 'string) (not (stringp res))) "UNKNOWN") | ||
| 5305 | (t res))))) | ||
| 5292 | 5306 | ||
| 5293 | (defun tramp-get-remote-gid-with-id (vec id-format) | 5307 | (defun tramp-get-remote-gid-with-id (vec id-format) |
| 5294 | (tramp-send-command-and-read | 5308 | (tramp-send-command-and-read |
| @@ -5319,17 +5333,20 @@ Return ATTR." | |||
| 5319 | 5333 | ||
| 5320 | (defun tramp-get-remote-gid (vec id-format) | 5334 | (defun tramp-get-remote-gid (vec id-format) |
| 5321 | (with-tramp-connection-property vec (format "gid-%s" id-format) | 5335 | (with-tramp-connection-property vec (format "gid-%s" id-format) |
| 5322 | (let ((res (cond | 5336 | (let ((res |
| 5323 | ((tramp-get-remote-id vec) | 5337 | (ignore-errors |
| 5324 | (tramp-get-remote-gid-with-id vec id-format)) | 5338 | (cond |
| 5325 | ((tramp-get-remote-perl vec) | 5339 | ((tramp-get-remote-id vec) |
| 5326 | (tramp-get-remote-gid-with-perl vec id-format)) | 5340 | (tramp-get-remote-gid-with-id vec id-format)) |
| 5327 | ((tramp-get-remote-python vec) | 5341 | ((tramp-get-remote-perl vec) |
| 5328 | (tramp-get-remote-gid-with-python vec id-format)) | 5342 | (tramp-get-remote-gid-with-perl vec id-format)) |
| 5329 | (t (tramp-error | 5343 | ((tramp-get-remote-python vec) |
| 5330 | vec 'file-error "Cannot determine remote gid"))))) | 5344 | (tramp-get-remote-gid-with-python vec id-format)))))) |
| 5331 | ;; The command might not always return a number. | 5345 | ;; Ensure there is a valid result. |
| 5332 | (if (and (equal id-format 'integer) (not (integerp res))) -1 res)))) | 5346 | (cond |
| 5347 | ((and (equal id-format 'integer) (not (integerp res))) -1) | ||
| 5348 | ((and (equal id-format 'string) (not (stringp res))) "UNKNOWN") | ||
| 5349 | (t res))))) | ||
| 5333 | 5350 | ||
| 5334 | ;; Some predefined connection properties. | 5351 | ;; Some predefined connection properties. |
| 5335 | (defun tramp-get-inline-compress (vec prop size) | 5352 | (defun tramp-get-inline-compress (vec prop size) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d3d03cd2030..5de2c6afa53 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1984,6 +1984,12 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see). | |||
| 1984 | compilation-page-delimiter) | 1984 | compilation-page-delimiter) |
| 1985 | ;; (set (make-local-variable 'compilation-buffer-modtime) nil) | 1985 | ;; (set (make-local-variable 'compilation-buffer-modtime) nil) |
| 1986 | (compilation-setup) | 1986 | (compilation-setup) |
| 1987 | ;; Turn off deferred fontifications in the compilation buffer, if | ||
| 1988 | ;; the user turned them on globally. This is because idle timers | ||
| 1989 | ;; aren't re-run after receiving input from a subprocess, so the | ||
| 1990 | ;; buffer is left unfontified after the compilation exits, until | ||
| 1991 | ;; some other input event happens. | ||
| 1992 | (set (make-local-variable 'jit-lock-defer-time) nil) | ||
| 1987 | (setq buffer-read-only t) | 1993 | (setq buffer-read-only t) |
| 1988 | (run-mode-hooks 'compilation-mode-hook)) | 1994 | (run-mode-hooks 'compilation-mode-hook)) |
| 1989 | 1995 | ||
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 3d5a3980a94..9f54b246eff 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -503,7 +503,7 @@ NOTE: Activate the new setting by restarting Emacs." | |||
| 503 | "List of default target names in Makefiles. | 503 | "List of default target names in Makefiles. |
| 504 | Automatically generated Makefiles include three default targets to compile | 504 | Automatically generated Makefiles include three default targets to compile |
| 505 | the entire design, clean the entire design and to create the design library. | 505 | the entire design, clean the entire design and to create the design library. |
| 506 | This option allows to change the names of these targets to avoid conflicts | 506 | This option allows you to change the names of these targets to avoid conflicts |
| 507 | with other user Makefiles." | 507 | with other user Makefiles." |
| 508 | :type '(list (string :tag "Compile entire design") | 508 | :type '(list (string :tag "Compile entire design") |
| 509 | (string :tag "Clean entire design ") | 509 | (string :tag "Clean entire design ") |
| @@ -513,7 +513,7 @@ with other user Makefiles." | |||
| 513 | 513 | ||
| 514 | (defcustom vhdl-makefile-generation-hook nil | 514 | (defcustom vhdl-makefile-generation-hook nil |
| 515 | "Functions to run at the end of Makefile generation. | 515 | "Functions to run at the end of Makefile generation. |
| 516 | Allows to insert user specific parts into a Makefile. | 516 | Allows you to insert user specific parts into a Makefile. |
| 517 | 517 | ||
| 518 | Example: | 518 | Example: |
| 519 | \(lambda nil | 519 | \(lambda nil |
| @@ -590,8 +590,8 @@ well as \"./\" and \"../\" (\"sh\" syntax). Paths can also be absolute. | |||
| 590 | Environment variables (e.g. \"$EXAMPLE2\") are resolved. If no sources are | 590 | Environment variables (e.g. \"$EXAMPLE2\") are resolved. If no sources are |
| 591 | specified, the default directory is taken as source directory. Otherwise, | 591 | specified, the default directory is taken as source directory. Otherwise, |
| 592 | the default directory is only taken as source directory if there is a sources | 592 | the default directory is only taken as source directory if there is a sources |
| 593 | entry with the empty string or \"./\". Exclude regexp allows to filter out | 593 | entry with the empty string or \"./\". Exclude regexp allows you to filter |
| 594 | specific file and directory names from the list of sources (e.g. CVS | 594 | out specific file and directory names from the list of sources (e.g. CVS |
| 595 | directories). | 595 | directories). |
| 596 | 596 | ||
| 597 | Files are compiled in the compile directory. Makefiles are also placed into | 597 | Files are compiled in the compile directory. Makefiles are also placed into |
| @@ -606,7 +606,7 @@ overwrite the settings of the current compiler. | |||
| 606 | 606 | ||
| 607 | File-specific compiler options (highest priority) overwrite project-specific | 607 | File-specific compiler options (highest priority) overwrite project-specific |
| 608 | options which overwrite default options (lowest priority). Lower priority | 608 | options which overwrite default options (lowest priority). Lower priority |
| 609 | options can be inserted in higher priority options. This allows to reuse | 609 | options can be inserted in higher priority options. This allows you to reuse |
| 610 | default options (e.g. \"-file\") in project- or file-specific options (e.g. | 610 | default options (e.g. \"-file\") in project- or file-specific options (e.g. |
| 611 | \"-93 -file\"). | 611 | \"-93 -file\"). |
| 612 | 612 | ||
| @@ -671,7 +671,7 @@ browser. The current project can also be changed temporarily in the menu." | |||
| 671 | (defcustom vhdl-project-file-name '("\\1.prj") | 671 | (defcustom vhdl-project-file-name '("\\1.prj") |
| 672 | "List of file names/paths for importing/exporting project setups. | 672 | "List of file names/paths for importing/exporting project setups. |
| 673 | \"\\1\" is replaced by the project name (SPC is replaced by `_'), \"\\2\" is | 673 | \"\\1\" is replaced by the project name (SPC is replaced by `_'), \"\\2\" is |
| 674 | replaced by the user name (allows to have user-specific project setups). | 674 | replaced by the user name (allows you to have user-specific project setups). |
| 675 | The first entry is used as file name to import/export individual project | 675 | The first entry is used as file name to import/export individual project |
| 676 | setups. All entries are used to automatically import project setups at | 676 | setups. All entries are used to automatically import project setups at |
| 677 | startup (see option `vhdl-project-auto-load'). Projects loaded from the | 677 | startup (see option `vhdl-project-auto-load'). Projects loaded from the |
| @@ -1540,8 +1540,8 @@ Option `vhdl-align-groups' still applies within these blocks." | |||
| 1540 | :group 'vhdl-beautify) | 1540 | :group 'vhdl-beautify) |
| 1541 | 1541 | ||
| 1542 | (defcustom vhdl-beautify-options '(t t t t t) | 1542 | (defcustom vhdl-beautify-options '(t t t t t) |
| 1543 | "List of options for beautifying code. Allows to disable individual | 1543 | "List of options for beautifying code. |
| 1544 | features of code beautification." | 1544 | Allows you to disable individual features of code beautification." |
| 1545 | :type '(list (boolean :tag "Whitespace cleanup ") | 1545 | :type '(list (boolean :tag "Whitespace cleanup ") |
| 1546 | (boolean :tag "Single statement per line") | 1546 | (boolean :tag "Single statement per line") |
| 1547 | (boolean :tag "Indentation ") | 1547 | (boolean :tag "Indentation ") |
| @@ -4449,7 +4449,7 @@ Usage: | |||
| 4449 | and vice versa. | 4449 | and vice versa. |
| 4450 | 4450 | ||
| 4451 | Syntax-based indentation can be very slow in large files. Option | 4451 | Syntax-based indentation can be very slow in large files. Option |
| 4452 | `vhdl-indent-syntax-based' allows to use faster but simpler indentation. | 4452 | `vhdl-indent-syntax-based' allows you to use faster but simpler indentation. |
| 4453 | 4453 | ||
| 4454 | Option `vhdl-indent-comment-like-next-code-line' controls whether | 4454 | Option `vhdl-indent-comment-like-next-code-line' controls whether |
| 4455 | comment lines are indented like the preceding or like the following code | 4455 | comment lines are indented like the preceding or like the following code |
| @@ -4482,7 +4482,7 @@ Usage: | |||
| 4482 | 4482 | ||
| 4483 | 4483 | ||
| 4484 | CODE FILLING: | 4484 | CODE FILLING: |
| 4485 | Code filling allows to condense code (e.g. sensitivity lists or port | 4485 | Code filling allows you to condense code (e.g. sensitivity lists or port |
| 4486 | maps) by removing comments and newlines and re-wrapping so that all | 4486 | maps) by removing comments and newlines and re-wrapping so that all |
| 4487 | lines are maximally filled (block filling). `C-c C-f C-f' fills a list | 4487 | lines are maximally filled (block filling). `C-c C-f C-f' fills a list |
| 4488 | enclosed by parenthesis, `C-c C-f C-g' a group of lines separated by | 4488 | enclosed by parenthesis, `C-c C-f C-g' a group of lines separated by |
| @@ -4742,7 +4742,7 @@ Usage: | |||
| 4742 | 4742 | ||
| 4743 | Words with special syntax can be highlighted by specifying their | 4743 | Words with special syntax can be highlighted by specifying their |
| 4744 | syntax and color in option `vhdl-special-syntax-alist' and by setting | 4744 | syntax and color in option `vhdl-special-syntax-alist' and by setting |
| 4745 | option `vhdl-highlight-special-words' to non-nil. This allows to | 4745 | option `vhdl-highlight-special-words' to non-nil. This allows you to |
| 4746 | establish some naming conventions (e.g. to distinguish different kinds | 4746 | establish some naming conventions (e.g. to distinguish different kinds |
| 4747 | of signals or other objects by using name suffices) and to support them | 4747 | of signals or other objects by using name suffices) and to support them |
| 4748 | visually. | 4748 | visually. |
| @@ -16964,7 +16964,7 @@ do not print any file names." | |||
| 16964 | 16964 | ||
| 16965 | (defun vhdl-make (&optional target) | 16965 | (defun vhdl-make (&optional target) |
| 16966 | "Call make command for compilation of all updated source files (requires | 16966 | "Call make command for compilation of all updated source files (requires |
| 16967 | `Makefile'). Optional argument TARGET allows to compile the design | 16967 | `Makefile'). Optional argument TARGET allows you to compile the design |
| 16968 | specified by a target." | 16968 | specified by a target." |
| 16969 | (interactive) | 16969 | (interactive) |
| 16970 | (setq vhdl-make-target | 16970 | (setq vhdl-make-target |
diff --git a/lisp/simple.el b/lisp/simple.el index a50294e54fd..1a596cf11db 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (eval-when-compile (require 'cl-lib)) | ||
| 32 | |||
| 31 | (declare-function widget-convert "wid-edit" (type &rest args)) | 33 | (declare-function widget-convert "wid-edit" (type &rest args)) |
| 32 | (declare-function shell-mode "shell" ()) | 34 | (declare-function shell-mode "shell" ()) |
| 33 | 35 | ||
| @@ -410,6 +412,7 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." | |||
| 410 | ;; Do the rest in post-self-insert-hook, because we want to do it | 412 | ;; Do the rest in post-self-insert-hook, because we want to do it |
| 411 | ;; *before* other functions on that hook. | 413 | ;; *before* other functions on that hook. |
| 412 | (lambda () | 414 | (lambda () |
| 415 | (cl-assert (eq ?\n (char-before))) | ||
| 413 | ;; Mark the newline(s) `hard'. | 416 | ;; Mark the newline(s) `hard'. |
| 414 | (if use-hard-newlines | 417 | (if use-hard-newlines |
| 415 | (set-hard-newline-properties | 418 | (set-hard-newline-properties |
| @@ -428,7 +431,8 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." | |||
| 428 | ;; starts a page. | 431 | ;; starts a page. |
| 429 | (or was-page-start | 432 | (or was-page-start |
| 430 | (move-to-left-margin nil t))))) | 433 | (move-to-left-margin nil t))))) |
| 431 | (if (not interactive) | 434 | (unwind-protect |
| 435 | (if (not interactive) | ||
| 432 | ;; FIXME: For non-interactive uses, many calls actually just want | 436 | ;; FIXME: For non-interactive uses, many calls actually just want |
| 433 | ;; (insert "\n"), so maybe we should do just that, so as to avoid | 437 | ;; (insert "\n"), so maybe we should do just that, so as to avoid |
| 434 | ;; the risk of filling or running abbrevs unexpectedly. | 438 | ;; the risk of filling or running abbrevs unexpectedly. |
| @@ -441,7 +445,9 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." | |||
| 441 | ;; We first used let-binding to protect the hook, but that was naive | 445 | ;; We first used let-binding to protect the hook, but that was naive |
| 442 | ;; since add-hook affects the symbol-default value of the variable, | 446 | ;; since add-hook affects the symbol-default value of the variable, |
| 443 | ;; whereas the let-binding might only protect the buffer-local value. | 447 | ;; whereas the let-binding might only protect the buffer-local value. |
| 444 | (remove-hook 'post-self-insert-hook postproc)))) | 448 | (remove-hook 'post-self-insert-hook postproc))) |
| 449 | (cl-assert (not (member postproc post-self-insert-hook))) | ||
| 450 | (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) | ||
| 445 | nil) | 451 | nil) |
| 446 | 452 | ||
| 447 | (defun set-hard-newline-properties (from to) | 453 | (defun set-hard-newline-properties (from to) |
diff --git a/src/ChangeLog b/src/ChangeLog index d2cfa0dbfc3..4fb50118444 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,33 @@ | |||
| 1 | 2014-11-01 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * macfont.m (macfont_glyph_extents): Turn off synthetic bold | ||
| 4 | if force_integral_p (i.e. no antialias). | ||
| 5 | (macfont_draw): Check ns_antialias_text, also turn off synthetic | ||
| 6 | bold if no antialias (Bug#18876). | ||
| 7 | |||
| 8 | * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir | ||
| 9 | was given (Bug#18846). | ||
| 10 | |||
| 11 | * nsterm.h (ns_set_doc_edited): Declare taking no args. | ||
| 12 | |||
| 13 | * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here | ||
| 14 | instead of in xdisp.c, function now takes void. (Bug#18884). | ||
| 15 | |||
| 16 | * xdisp.c (prepare_menu_bars): Remove HAVE_NS code. | ||
| 17 | (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884). | ||
| 18 | |||
| 19 | * nsterm.h (EmacsScroller): Replace Lisp_Object win with | ||
| 20 | struct window* (Bug#18889). | ||
| 21 | Remove getMouseMotionPart. | ||
| 22 | (ns_output): Make icon_top/left int. | ||
| 23 | |||
| 24 | * nsfns.m (x_icon): icon_top/left is int. | ||
| 25 | |||
| 26 | * nsterm.m (ns_mouse_position): Remove unused code. | ||
| 27 | (initFrame:window:, dealloc): Use window instead of win. | ||
| 28 | (getMouseMotionPart:window:x:y:): Remove, unused. | ||
| 29 | (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window. | ||
| 30 | |||
| 1 | 2014-11-01 Eli Zaretskii <eliz@gnu.org> | 31 | 2014-11-01 Eli Zaretskii <eliz@gnu.org> |
| 2 | 32 | ||
| 3 | * keyboard.c (readable_events): When FLAGS include | 33 | * keyboard.c (readable_events): When FLAGS include |
diff --git a/src/emacs.c b/src/emacs.c index 90182e53e70..62f03c6ea12 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -721,7 +721,7 @@ main (int argc, char **argv) | |||
| 721 | #ifdef DAEMON_MUST_EXEC | 721 | #ifdef DAEMON_MUST_EXEC |
| 722 | char dname_arg2[80]; | 722 | char dname_arg2[80]; |
| 723 | #endif | 723 | #endif |
| 724 | char *ch_to_dir; | 724 | char *ch_to_dir = 0; |
| 725 | 725 | ||
| 726 | /* If we use --chdir, this records the original directory. */ | 726 | /* If we use --chdir, this records the original directory. */ |
| 727 | char *original_pwd = 0; | 727 | char *original_pwd = 0; |
| @@ -1230,19 +1230,19 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1230 | /* Started from GUI? */ | 1230 | /* Started from GUI? */ |
| 1231 | /* FIXME: Do the right thing if getenv returns NULL, or if | 1231 | /* FIXME: Do the right thing if getenv returns NULL, or if |
| 1232 | chdir fails. */ | 1232 | chdir fails. */ |
| 1233 | if (! inhibit_window_system && ! isatty (0)) | 1233 | if (! inhibit_window_system && ! isatty (0) && ! ch_to_dir) |
| 1234 | chdir (getenv ("HOME")); | 1234 | chdir (getenv ("HOME")); |
| 1235 | if (skip_args < argc) | 1235 | if (skip_args < argc) |
| 1236 | { | 1236 | { |
| 1237 | if (!strncmp (argv[skip_args], "-psn", 4)) | 1237 | if (!strncmp (argv[skip_args], "-psn", 4)) |
| 1238 | { | 1238 | { |
| 1239 | skip_args += 1; | 1239 | skip_args += 1; |
| 1240 | chdir (getenv ("HOME")); | 1240 | if (! ch_to_dir) chdir (getenv ("HOME")); |
| 1241 | } | 1241 | } |
| 1242 | else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4)) | 1242 | else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4)) |
| 1243 | { | 1243 | { |
| 1244 | skip_args += 2; | 1244 | skip_args += 2; |
| 1245 | chdir (getenv ("HOME")); | 1245 | if (! ch_to_dir) chdir (getenv ("HOME")); |
| 1246 | } | 1246 | } |
| 1247 | } | 1247 | } |
| 1248 | #endif /* COCOA */ | 1248 | #endif /* COCOA */ |
diff --git a/src/macfont.m b/src/macfont.m index 366d087f8c2..c29ecc03f23 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -1086,7 +1086,7 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph, | |||
| 1086 | bounds.size = | 1086 | bounds.size = |
| 1087 | CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm); | 1087 | CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm); |
| 1088 | } | 1088 | } |
| 1089 | if (macfont_info->synthetic_bold_p) | 1089 | if (macfont_info->synthetic_bold_p && ! force_integral_p) |
| 1090 | { | 1090 | { |
| 1091 | CGFloat d = | 1091 | CGFloat d = |
| 1092 | - synthetic_bold_factor * mac_font_get_size (macfont) / 2; | 1092 | - synthetic_bold_factor * mac_font_get_size (macfont) / 2; |
| @@ -2692,7 +2692,8 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 2692 | CGPoint *positions; | 2692 | CGPoint *positions; |
| 2693 | CGFloat font_size = mac_font_get_size (macfont_info->macfont); | 2693 | CGFloat font_size = mac_font_get_size (macfont_info->macfont); |
| 2694 | bool no_antialias_p = | 2694 | bool no_antialias_p = |
| 2695 | (macfont_info->antialias == MACFONT_ANTIALIAS_OFF | 2695 | (NILP (ns_antialias_text) |
| 2696 | || macfont_info->antialias == MACFONT_ANTIALIAS_OFF | ||
| 2696 | || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT | 2697 | || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT |
| 2697 | && font_size <= macfont_antialias_threshold)); | 2698 | && font_size <= macfont_antialias_threshold)); |
| 2698 | int len = to - from; | 2699 | int len = to - from; |
| @@ -2755,7 +2756,7 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 2755 | atfm = synthetic_italic_atfm; | 2756 | atfm = synthetic_italic_atfm; |
| 2756 | else | 2757 | else |
| 2757 | atfm = CGAffineTransformIdentity; | 2758 | atfm = CGAffineTransformIdentity; |
| 2758 | if (macfont_info->synthetic_bold_p) | 2759 | if (macfont_info->synthetic_bold_p && ! no_antialias_p)) |
| 2759 | { | 2760 | { |
| 2760 | CGContextSetTextDrawingMode (context, kCGTextFillStroke); | 2761 | CGContextSetTextDrawingMode (context, kCGTextFillStroke); |
| 2761 | CGContextSetLineWidth (context, synthetic_bold_factor * font_size); | 2762 | CGContextSetLineWidth (context, synthetic_bold_factor * font_size); |
diff --git a/src/nsfns.m b/src/nsfns.m index a93b2724403..ce859e8333d 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -629,18 +629,26 @@ ns_set_name_as_filename (struct frame *f) | |||
| 629 | 629 | ||
| 630 | 630 | ||
| 631 | void | 631 | void |
| 632 | ns_set_doc_edited (struct frame *f, Lisp_Object arg) | 632 | ns_set_doc_edited (void) |
| 633 | { | 633 | { |
| 634 | NSView *view = FRAME_NS_VIEW (f); | ||
| 635 | NSAutoreleasePool *pool; | 634 | NSAutoreleasePool *pool; |
| 636 | if (!MINI_WINDOW_P (XWINDOW (f->selected_window))) | 635 | Lisp_Object tail, frame; |
| 636 | block_input (); | ||
| 637 | pool = [[NSAutoreleasePool alloc] init]; | ||
| 638 | FOR_EACH_FRAME (tail, frame) | ||
| 637 | { | 639 | { |
| 638 | block_input (); | 640 | BOOL edited = NO; |
| 639 | pool = [[NSAutoreleasePool alloc] init]; | 641 | struct frame *f = XFRAME (frame); |
| 640 | [[view window] setDocumentEdited: !NILP (arg)]; | 642 | struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); |
| 641 | [pool release]; | 643 | NSView *view = FRAME_NS_VIEW (f); |
| 642 | unblock_input (); | 644 | if (!MINI_WINDOW_P (w)) |
| 645 | edited = ! NILP (Fbuffer_modified_p (w->contents)) && | ||
| 646 | ! NILP (Fbuffer_file_name (w->contents)); | ||
| 647 | [[view window] setDocumentEdited: edited]; | ||
| 643 | } | 648 | } |
| 649 | |||
| 650 | [pool release]; | ||
| 651 | unblock_input (); | ||
| 644 | } | 652 | } |
| 645 | 653 | ||
| 646 | 654 | ||
| @@ -935,8 +943,8 @@ x_icon (struct frame *f, Lisp_Object parms) | |||
| 935 | Lisp_Object icon_x, icon_y; | 943 | Lisp_Object icon_x, icon_y; |
| 936 | struct ns_display_info *dpyinfo = check_ns_display_info (Qnil); | 944 | struct ns_display_info *dpyinfo = check_ns_display_info (Qnil); |
| 937 | 945 | ||
| 938 | f->output_data.ns->icon_top = Qnil; | 946 | f->output_data.ns->icon_top = -1; |
| 939 | f->output_data.ns->icon_left = Qnil; | 947 | f->output_data.ns->icon_left = -1; |
| 940 | 948 | ||
| 941 | /* Set the position of the icon. */ | 949 | /* Set the position of the icon. */ |
| 942 | icon_x = x_get_arg (dpyinfo, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER); | 950 | icon_x = x_get_arg (dpyinfo, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER); |
| @@ -945,8 +953,8 @@ x_icon (struct frame *f, Lisp_Object parms) | |||
| 945 | { | 953 | { |
| 946 | CHECK_NUMBER (icon_x); | 954 | CHECK_NUMBER (icon_x); |
| 947 | CHECK_NUMBER (icon_y); | 955 | CHECK_NUMBER (icon_y); |
| 948 | f->output_data.ns->icon_top = icon_y; | 956 | f->output_data.ns->icon_top = XINT (icon_y); |
| 949 | f->output_data.ns->icon_left = icon_x; | 957 | f->output_data.ns->icon_left = XINT (icon_x); |
| 950 | } | 958 | } |
| 951 | else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) | 959 | else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) |
| 952 | error ("Both left and top icon corners of icon must be specified"); | 960 | error ("Both left and top icon corners of icon must be specified"); |
diff --git a/src/nsterm.h b/src/nsterm.h index f59405fe9af..b665ac1dd52 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -373,7 +373,7 @@ typedef float EmacsCGFloat; | |||
| 373 | 373 | ||
| 374 | @interface EmacsScroller : NSScroller | 374 | @interface EmacsScroller : NSScroller |
| 375 | { | 375 | { |
| 376 | Lisp_Object win; | 376 | struct window *window; |
| 377 | struct frame *frame; | 377 | struct frame *frame; |
| 378 | NSResponder *prevResponder; | 378 | NSResponder *prevResponder; |
| 379 | 379 | ||
| @@ -397,8 +397,6 @@ typedef float EmacsCGFloat; | |||
| 397 | - setPosition: (int) position portion: (int) portion whole: (int) whole; | 397 | - setPosition: (int) position portion: (int) portion whole: (int) whole; |
| 398 | - (int) checkSamePosition: (int)position portion: (int)portion | 398 | - (int) checkSamePosition: (int)position portion: (int)portion |
| 399 | whole: (int)whole; | 399 | whole: (int)whole; |
| 400 | - (void) getMouseMotionPart: (int *)part window: (Lisp_Object *)window | ||
| 401 | x: (Lisp_Object *)x y: ( Lisp_Object *)y; | ||
| 402 | - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e; | 400 | - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e; |
| 403 | - repeatScroll: (NSTimer *)sender; | 401 | - repeatScroll: (NSTimer *)sender; |
| 404 | - condemn; | 402 | - condemn; |
| @@ -667,8 +665,8 @@ struct ns_output | |||
| 667 | value contains an ID of the fontset, else -1. */ | 665 | value contains an ID of the fontset, else -1. */ |
| 668 | int fontset; /* only used with font_backend */ | 666 | int fontset; /* only used with font_backend */ |
| 669 | 667 | ||
| 670 | Lisp_Object icon_top; | 668 | int icon_top; |
| 671 | Lisp_Object icon_left; | 669 | int icon_left; |
| 672 | 670 | ||
| 673 | /* The size of the extra width currently allotted for vertical | 671 | /* The size of the extra width currently allotted for vertical |
| 674 | scroll bars, in pixels. */ | 672 | scroll bars, in pixels. */ |
| @@ -817,7 +815,7 @@ extern void nxatoms_of_nsselect (void); | |||
| 817 | extern int ns_lisp_to_cursor_type (Lisp_Object arg); | 815 | extern int ns_lisp_to_cursor_type (Lisp_Object arg); |
| 818 | extern Lisp_Object ns_cursor_type_to_lisp (int arg); | 816 | extern Lisp_Object ns_cursor_type_to_lisp (int arg); |
| 819 | extern void ns_set_name_as_filename (struct frame *f); | 817 | extern void ns_set_name_as_filename (struct frame *f); |
| 820 | extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); | 818 | extern void ns_set_doc_edited (void); |
| 821 | 819 | ||
| 822 | extern bool | 820 | extern bool |
| 823 | ns_defined_color (struct frame *f, | 821 | ns_defined_color (struct frame *f, |
diff --git a/src/nsterm.m b/src/nsterm.m index 3ae4146dc20..c814e63f12e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1892,14 +1892,36 @@ ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, | |||
| 1892 | 1892 | ||
| 1893 | block_input (); | 1893 | block_input (); |
| 1894 | 1894 | ||
| 1895 | if (dpyinfo->last_mouse_scroll_bar != nil && insist == 0) | 1895 | /* Clear the mouse-moved flag for every frame on this display. */ |
| 1896 | FOR_EACH_FRAME (tail, frame) | ||
| 1897 | if (FRAME_NS_P (XFRAME (frame)) | ||
| 1898 | && FRAME_NS_DISPLAY (XFRAME (frame)) == FRAME_NS_DISPLAY (*fp)) | ||
| 1899 | XFRAME (frame)->mouse_moved = 0; | ||
| 1900 | |||
| 1901 | dpyinfo->last_mouse_scroll_bar = nil; | ||
| 1902 | if (dpyinfo->last_mouse_frame | ||
| 1903 | && FRAME_LIVE_P (dpyinfo->last_mouse_frame)) | ||
| 1904 | f = dpyinfo->last_mouse_frame; | ||
| 1905 | else | ||
| 1906 | f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame : SELECTED_FRAME (); | ||
| 1907 | |||
| 1908 | if (f && FRAME_NS_P (f)) | ||
| 1896 | { | 1909 | { |
| 1897 | /* TODO: we do not use this path at the moment because drag events will | 1910 | view = FRAME_NS_VIEW (*fp); |
| 1898 | go directly to the EmacsScroller. Leaving code in for now. */ | 1911 | |
| 1899 | [dpyinfo->last_mouse_scroll_bar | 1912 | position = [[view window] mouseLocationOutsideOfEventStream]; |
| 1900 | getMouseMotionPart: (int *)part window: bar_window x: x y: y]; | 1913 | position = [view convertPoint: position fromView: nil]; |
| 1914 | remember_mouse_glyph (f, position.x, position.y, | ||
| 1915 | &dpyinfo->last_mouse_glyph); | ||
| 1916 | /*fprintf (stderr, "ns_mouse_position: %.0f, %.0f\n", position.x, position.y); */ | ||
| 1917 | |||
| 1918 | if (bar_window) *bar_window = Qnil; | ||
| 1919 | if (part) *part = 0; /*scroll_bar_handle; */ | ||
| 1920 | |||
| 1921 | if (x) XSETINT (*x, lrint (position.x)); | ||
| 1922 | if (y) XSETINT (*y, lrint (position.y)); | ||
| 1901 | if (time) | 1923 | if (time) |
| 1902 | *time = dpyinfo->last_mouse_movement_time; | 1924 | *time = dpyinfo->last_mouse_movement_time; |
| 1903 | dpyinfo->last_mouse_scroll_bar = nil; | 1925 | dpyinfo->last_mouse_scroll_bar = nil; |
| 1904 | } | 1926 | } |
| 1905 | else | 1927 | else |
| @@ -7164,13 +7186,13 @@ if (cols > 0 && rows > 0) | |||
| 7164 | [self setAutoresizingMask: NSViewMinXMargin | NSViewHeightSizable]; | 7186 | [self setAutoresizingMask: NSViewMinXMargin | NSViewHeightSizable]; |
| 7165 | #endif | 7187 | #endif |
| 7166 | 7188 | ||
| 7167 | win = nwin; | 7189 | window = XWINDOW (nwin); |
| 7168 | condemned = NO; | 7190 | condemned = NO; |
| 7169 | pixel_height = NSHeight (r); | 7191 | pixel_height = NSHeight (r); |
| 7170 | if (pixel_height == 0) pixel_height = 1; | 7192 | if (pixel_height == 0) pixel_height = 1; |
| 7171 | min_portion = 20 / pixel_height; | 7193 | min_portion = 20 / pixel_height; |
| 7172 | 7194 | ||
| 7173 | frame = XFRAME (XWINDOW (win)->frame); | 7195 | frame = XFRAME (window->frame); |
| 7174 | if (FRAME_LIVE_P (frame)) | 7196 | if (FRAME_LIVE_P (frame)) |
| 7175 | { | 7197 | { |
| 7176 | int i; | 7198 | int i; |
| @@ -7302,30 +7324,17 @@ if (cols > 0 && rows > 0) | |||
| 7302 | return self; | 7324 | return self; |
| 7303 | } | 7325 | } |
| 7304 | 7326 | ||
| 7305 | /* FIXME: unused at moment (see ns_mouse_position) at the moment because | ||
| 7306 | drag events will go directly to the EmacsScroller. Leaving in for now. */ | ||
| 7307 | -(void)getMouseMotionPart: (int *)part window: (Lisp_Object *)window | ||
| 7308 | x: (Lisp_Object *)x y: ( Lisp_Object *)y | ||
| 7309 | { | ||
| 7310 | *part = last_hit_part; | ||
| 7311 | *window = win; | ||
| 7312 | XSETINT (*y, pixel_height); | ||
| 7313 | if ([self floatValue] > 0.999F) | ||
| 7314 | XSETINT (*x, pixel_height); | ||
| 7315 | else | ||
| 7316 | XSETINT (*x, pixel_height * [self floatValue]); | ||
| 7317 | } | ||
| 7318 | |||
| 7319 | |||
| 7320 | /* set up emacs_event */ | 7327 | /* set up emacs_event */ |
| 7321 | - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e | 7328 | - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e |
| 7322 | { | 7329 | { |
| 7330 | Lisp_Object win; | ||
| 7323 | if (!emacs_event) | 7331 | if (!emacs_event) |
| 7324 | return; | 7332 | return; |
| 7325 | 7333 | ||
| 7326 | emacs_event->part = last_hit_part; | 7334 | emacs_event->part = last_hit_part; |
| 7327 | emacs_event->code = 0; | 7335 | emacs_event->code = 0; |
| 7328 | emacs_event->modifiers = EV_MODIFIERS (e) | down_modifier; | 7336 | emacs_event->modifiers = EV_MODIFIERS (e) | down_modifier; |
| 7337 | XSETWINDOW (win, window); | ||
| 7329 | emacs_event->frame_or_window = win; | 7338 | emacs_event->frame_or_window = win; |
| 7330 | emacs_event->timestamp = EV_TIMESTAMP (e); | 7339 | emacs_event->timestamp = EV_TIMESTAMP (e); |
| 7331 | emacs_event->kind = SCROLL_BAR_CLICK_EVENT; | 7340 | emacs_event->kind = SCROLL_BAR_CLICK_EVENT; |
diff --git a/src/xdisp.c b/src/xdisp.c index d27d76d8f5b..228b6cb586d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11785,12 +11785,6 @@ prepare_menu_bars (void) | |||
| 11785 | #ifdef HAVE_WINDOW_SYSTEM | 11785 | #ifdef HAVE_WINDOW_SYSTEM |
| 11786 | update_tool_bar (f, 0); | 11786 | update_tool_bar (f, 0); |
| 11787 | #endif | 11787 | #endif |
| 11788 | #ifdef HAVE_NS | ||
| 11789 | if (windows_or_buffers_changed | ||
| 11790 | && FRAME_NS_P (f)) | ||
| 11791 | ns_set_doc_edited | ||
| 11792 | (f, Fbuffer_modified_p (XWINDOW (f->selected_window)->contents)); | ||
| 11793 | #endif | ||
| 11794 | UNGCPRO; | 11788 | UNGCPRO; |
| 11795 | } | 11789 | } |
| 11796 | 11790 | ||
| @@ -14121,6 +14115,9 @@ redisplay_internal (void) | |||
| 14121 | #endif /* HAVE_WINDOW_SYSTEM */ | 14115 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 14122 | 14116 | ||
| 14123 | end_of_redisplay: | 14117 | end_of_redisplay: |
| 14118 | #ifdef HAVE_NS | ||
| 14119 | ns_set_doc_edited (); | ||
| 14120 | #endif | ||
| 14124 | if (interrupt_input && interrupts_deferred) | 14121 | if (interrupt_input && interrupts_deferred) |
| 14125 | request_sigio (); | 14122 | request_sigio (); |
| 14126 | 14123 | ||