[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r118249: Merge from emacs-24; up to 117656
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r118249: Merge from emacs-24; up to 117656 |
Date: |
Sat, 01 Nov 2014 18:06:20 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 118249 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-11-01 11:05:30 -0700
message:
Merge from emacs-24; up to 117656
modified:
admin/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-2226
admin/notes/repo bzr-20100518025134-ebvhi2w74h1r56u7-1
doc/man/emacsclient.1
emacsclient.1-20091113204419-o5vbwnq5f7feedwu-6124
etc/emacs.desktop
emacs.desktop-20091113204419-o5vbwnq5f7feedwu-8191
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/Makefile.in
makefile.in-20091113204419-o5vbwnq5f7feedwu-1831
lisp/delsel.el delsel.el-20091113204419-o5vbwnq5f7feedwu-540
lisp/emulation/cua-base.el cuabase.el-20091113204419-o5vbwnq5f7feedwu-2415
lisp/net/tramp-cache.el
trampcache.el-20091113204419-o5vbwnq5f7feedwu-5065
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
lisp/progmodes/compile.el compile.el-20091113204419-o5vbwnq5f7feedwu-126
lisp/progmodes/vhdl-mode.el
vhdlmode.el-20091113204419-o5vbwnq5f7feedwu-1258
lisp/simple.el simple.el-20091113204419-o5vbwnq5f7feedwu-403
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/emacs.c emacs.c-20091113204419-o5vbwnq5f7feedwu-241
src/macfont.m macfont.m-20130915173740-04lgloz0557bz98l-2
src/nsfns.m nsfns.m-20091113204419-o5vbwnq5f7feedwu-8741
src/nsterm.h nsterm.h-20091113204419-o5vbwnq5f7feedwu-8746
src/nsterm.m nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog 2014-10-27 00:50:32 +0000
+++ b/admin/ChangeLog 2014-11-01 18:05:30 +0000
@@ -1,7 +1,13 @@
+2014-11-01 Eli Zaretskii <address@hidden>
+
+ * notes/repo (Notes): Reword the stylistic guidance for commit log
+ messages so that they are in line with Emacs development practices
+ and style guidance.
+
2014-10-27 Eric S. Raymond <address@hidden>
- * notes/bzr: Renamed to notes/repo, reorganixed to separate
- VCS-dependent from VCS-independent stuff. Added guidance about
+ * notes/bzr: Rename to notes/repo, reorganize to separate
+ VCS-dependent from VCS-independent stuff. Add guidance about
commit-comment format under DVCSes.
* notes/BRANCH: Merged into notes/repo.
=== modified file 'admin/notes/repo'
--- a/admin/notes/repo 2014-10-27 00:50:32 +0000
+++ b/admin/notes/repo 2014-11-01 18:05:30 +0000
@@ -5,18 +5,15 @@
Commits should follow the conventions used in all modern distributed
version-control systems. That is, they should consist of
-- A self-contained topic line no more than 75 chars long.
-
-- If other content follows the topic line, there should be
- a blank line separating the two.
-
-Try to keep your commits - and your commit comments - small. If
-you feel an urge to put a bullet list in your commit comment, it's
-doing too many things at once.
-
-Yes, these directins are a departure from historical Emacs practice,
-but it helps modern log-viewing and summary tools work better so that
-other people can comprehend your code.
+- A self-contained topic line, preferably no more than 75 chars long.
+
+- If other content follows the topic line, there should be a blank
+ line separating the two.
+
+- Follow the blank line with ChangeLog-like entries for the specific
+ changes you made, if any. (As long as Emacs maintains ChangeLog
+ files, just copy the entries you made in them to the commit message
+ after the blank line.)
* Commit to the right branch
@@ -184,7 +181,7 @@
trunk version. Prior to bzr 2.2.3, this may fail. You can just
delete the .OTHER etc files by hand and use bzr resolve path/to/file.
-* Sanity-checking branch merges
+* Sanity-checking branch merges
Inspect the ChangeLog entries (e.g. in case too many entries have been
included or whitespace between entries needs fixing). bzrmerge tries
=== modified file 'doc/man/emacsclient.1'
--- a/doc/man/emacsclient.1 2011-10-06 15:13:45 +0000
+++ b/doc/man/emacsclient.1 2014-10-30 23:18:53 +0000
@@ -52,7 +52,7 @@
.B \-a, \-\-alternate-editor=EDITOR
if the Emacs server is not running, run the specified editor instead.
This can also be specified via the `ALTERNATE_EDITOR' environment variable.
-If the value of EDITOR is the empty string, run `emacs --daemon' to
+If the value of EDITOR is the empty string, run `emacs \-\-daemon' to
start Emacs in daemon mode, and try to connect to it.
.TP
.B -c, \-\-create-frame
=== modified file 'etc/emacs.desktop'
--- a/etc/emacs.desktop 2008-01-03 07:35:30 +0000
+++ b/etc/emacs.desktop 2014-10-31 04:10:19 +0000
@@ -9,3 +9,4 @@
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
+Keywords=Text;Editor;
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-11-01 17:29:14 +0000
+++ b/lisp/ChangeLog 2014-11-01 18:05:30 +0000
@@ -1,3 +1,44 @@
+2014-11-01 Michael Albinus <address@hidden>
+
+ * net/tramp-cache.el (tramp-get-file-property)
+ (tramp-set-file-property): Check that `tramp-cache-get-count-*'
+ and `tramp-cache-set-count-*' are bound. Otherwise, there might
+ be compiler warnings.
+
+ * net/tramp-sh.el (tramp-get-remote-uid, tramp-get-remote-gid):
+ Return -1 respective "UNKNOWN", if uid or gid cannot be determined.
+
+2014-11-01 Eli Zaretskii <address@hidden>
+
+ * progmodes/compile.el (compilation-mode): Turn off deferred
+ fontifications locally. (Bug#18856)
+
+2014-11-01 Wolfgang Jenkner <address@hidden>
+
+ * net/tramp-sh.el (tramp-send-command): Fix the case where the
+ remote-echo connection property is non-nil (bug#18858).
+
+2014-11-01 Stefan Monnier <address@hidden>
+
+ * simple.el (newline): Add assertions to try and help catch bug#18913.
+
+ * emulation/cua-base.el (cua-delete-region): Use delete-active-region
+ (bug#18886).
+ (cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove.
+
+2014-11-01 Kim F. Storm <address@hidden>
+
+ Restore cua-delete-copy-to-register-0 and M-v command (bug#18886).
+ * delsel.el (delete-selection-save-to-register)
+ (delsel--replace-text-or-position): New vars.
+ (delete-active-region): Use them.
+ (delete-selection-repeat-replace-region): New command, moved from
+ cua-base.el.
+ * emulation/cua-base.el (cua--repeat-replace-text): Remove var.
+ (cua-repeat-replace-region): Move command to delsel.el.
+ (cua--init-keymaps): Update binding accordingly.
+ (cua-mode): Set delete-selection-save-to-register.
+
2014-11-01 Alan Mackenzie <address@hidden>
Make blink-parens work with a closing template delimiter.
=== modified file 'lisp/Makefile.in'
--- a/lisp/Makefile.in 2014-10-30 05:15:28 +0000
+++ b/lisp/Makefile.in 2014-11-01 18:05:30 +0000
@@ -201,12 +201,12 @@
# Some modes of make-dist use this.
updates: update-subdirs autoloads finder-data custom-deps
-# This is useful after a repostiory fetch; but it doesn't do anything that a
-# plain "make" at top-level doesn't.
-# The only difference between this and this directory's "all" rule
-# is that this runs "autoloads" as well (because it uses "compile"
-# rather than "compile-main"). In a bootstrap, $(lisp) in src/Makefile
-# triggers this directory's autoloads rule.
+# This is useful after updating from the repository; but it doesn't do
+# anything that a plain "make" at top-level doesn't. The only
+# difference between this and this directory's "all" rule is that this
+# runs "autoloads" as well (because it uses "compile" rather than
+# "compile-main"). In a bootstrap, $(lisp) in src/Makefile triggers
+# this directory's autoloads rule.
repo-update: compile finder-data custom-deps
# Update the AUTHORS file.
=== modified file 'lisp/delsel.el'
--- a/lisp/delsel.el 2014-06-17 13:40:03 +0000
+++ b/lisp/delsel.el 2014-10-30 19:19:49 +0000
@@ -54,6 +54,10 @@
;;; Code:
+(defvar delete-selection-save-to-register nil
+ "If non-nil, deleted region text is stored in this register.
+Value must be the register (key) to use.")
+
;;;###autoload
(defalias 'pending-delete-mode 'delete-selection-mode)
@@ -72,16 +76,78 @@
(remove-hook 'pre-command-hook 'delete-selection-pre-hook)
(add-hook 'pre-command-hook 'delete-selection-pre-hook)))
+(defvar delsel--replace-text-or-position nil)
+
(defun delete-active-region (&optional killp)
"Delete the active region.
If KILLP in not-nil, the active region is killed instead of deleted."
- (if killp
- ;; Don't allow `kill-region' to change the value of `this-command'.
- (let (this-command)
- (kill-region (point) (mark) t))
- (funcall region-extract-function 'delete-only))
+ (cond
+ (killp
+ ;; Don't allow `kill-region' to change the value of `this-command'.
+ (let (this-command)
+ (kill-region (point) (mark) t)))
+ (delete-selection-save-to-register
+ (set-register delete-selection-save-to-register
+ (funcall region-extract-function t))
+ (setq delsel--replace-text-or-position
+ (cons (current-buffer)
+ (and (consp buffer-undo-list) (car buffer-undo-list)))))
+ (t
+ (funcall region-extract-function 'delete-only)))
t)
+(defun delete-selection-repeat-replace-region (arg)
+ "Repeat replacing text of highlighted region with typed text.
+Search for the next stretch of text identical to the region last replaced
+by typing text over it and replaces it with the same stretch of text.
+With ARG, repeat that many times. `C-u' means until end of buffer."
+ (interactive "P")
+ (let ((old-text (and delete-selection-save-to-register
+ (get-register delete-selection-save-to-register)))
+ (count (if (consp arg) (point-max)
+ (prefix-numeric-value current-prefix-arg))))
+ (if (not (and old-text
+ (> (length old-text) 0)
+ (or (stringp delsel--replace-text-or-position)
+ (buffer-live-p (car delsel--replace-text-or-position)))))
+ (message "No known previous replacement")
+ ;; If this is the first use after overwriting regions,
+ ;; find the replacement text by looking at the undo list.
+ (when (consp delsel--replace-text-or-position)
+ (let ((buffer (car delsel--replace-text-or-position))
+ (elt (cdr delsel--replace-text-or-position)))
+ (setq delsel--replace-text-or-position nil)
+ (with-current-buffer buffer
+ (save-restriction
+ (widen)
+ ;; Find the text that replaced the region via the undo list.
+ (let ((ul buffer-undo-list) u s e)
+ (when elt
+ (while (consp ul)
+ (setq u (car ul) ul (cdr ul))
+ (cond
+ ((eq u elt) ;; got it
+ (setq ul nil))
+ ((and (consp u) (integerp (car u)) (integerp (cdr u)))
+ (if (and s (= (cdr u) s))
+ (setq s (car u))
+ (setq s (car u) e (cdr u)))))))
+ (cond ((and s e (<= s e) (= s (mark t)))
+ (setq delsel--replace-text-or-position
+ (filter-buffer-substring s e))
+ (set-text-properties
+ 0 (length delsel--replace-text-or-position)
+ nil delsel--replace-text-or-position))
+ ((and (null s) (eq u elt)) ;; Nothing inserted.
+ (setq delsel--replace-text-or-position ""))
+ (t
+ (message "Cannot locate replacement text"))))))))
+ (while (and (> count 0)
+ delsel--replace-text-or-position
+ (search-forward old-text nil t))
+ (replace-match delsel--replace-text-or-position nil t)
+ (setq count (1- count))))))
+
(defun delete-selection-helper (type)
"Delete selection according to TYPE:
`yank'
=== modified file 'lisp/emulation/cua-base.el'
--- a/lisp/emulation/cua-base.el 2014-04-11 01:06:35 +0000
+++ b/lisp/emulation/cua-base.el 2014-11-01 18:05:30 +0000
@@ -277,7 +277,7 @@
(defcustom cua-remap-control-v t
"If non-nil, C-v binding is used for paste (yank).
-Also, M-v is mapped to `cua-repeat-replace-region'."
+Also, M-v is mapped to `delete-selection-repeat-replace-region'."
:type 'boolean
:group 'cua)
@@ -350,6 +350,8 @@
:group 'cua)
(defcustom cua-delete-copy-to-register-0 t
+ ;; FIXME: Obey delete-selection-save-to-register rather than hardcoding
+ ;; register 0.
"If non-nil, save last deleted region or rectangle to register 0."
:type 'boolean
:group 'cua)
@@ -788,26 +790,12 @@
;;; Region specific commands
-(defvar cua--last-deleted-region-pos nil)
-(defvar cua--last-deleted-region-text nil)
-
(defun cua-delete-region ()
"Delete the active region.
Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil."
(interactive)
- (let ((start (mark)) (end (point)))
- (or (<= start end)
- (setq start (prog1 end (setq end start))))
- (setq cua--last-deleted-region-text
- (funcall region-extract-function t))
- (if cua-delete-copy-to-register-0
- (set-register ?0 cua--last-deleted-region-text))
- (setq cua--last-deleted-region-pos
- (cons (current-buffer)
- (and (consp buffer-undo-list)
- (car buffer-undo-list))))
- (cua--deactivate)
- (/= start end)))
+ (require 'delsel)
+ (delete-active-region))
(defun cua-copy-region (arg)
"Copy the region to the kill ring.
@@ -958,48 +946,8 @@
(t
(let (mark-active)
(exchange-point-and-mark)
- (if cua--rectangle
- (cua--rectangle-corner 0))))))
-
-;; Typed text that replaced the highlighted region.
-(defvar cua--repeat-replace-text nil)
-
-(defun cua-repeat-replace-region (arg)
- "Repeat replacing text of highlighted region with typed text.
-Searches for the next stretch of text identical to the region last
-replaced by typing text over it and replaces it with the same stretch
-of text."
- (interactive "P")
- (when cua--last-deleted-region-pos
- (with-current-buffer (car cua--last-deleted-region-pos)
- (save-restriction
- (widen)
- ;; Find the text that replaced the region via the undo list.
- (let ((ul buffer-undo-list)
- (elt (cdr cua--last-deleted-region-pos))
- u s e)
- (when elt
- (while (consp ul)
- (setq u (car ul) ul (cdr ul))
- (cond
- ((eq u elt) ;; got it
- (setq ul nil))
- ((and (consp u) (integerp (car u)) (integerp (cdr u)))
- (if (and s (= (cdr u) s))
- (setq s (car u))
- (setq s (car u) e (cdr u)))))))
- (cond ((and s e (<= s e) (= s (mark t)))
- (setq cua--repeat-replace-text (cua--filter-buffer-noprops s
e)))
- ((and (null s) (eq u elt)) ;; nothing inserted
- (setq cua--repeat-replace-text
- ""))
- (t
- (message "Cannot locate replacement text"))))))
- (setq cua--last-deleted-region-pos nil))
- (if (and cua--last-deleted-region-text
- cua--repeat-replace-text
- (search-forward cua--last-deleted-region-text nil t nil))
- (replace-match cua--repeat-replace-text arg t)))
+ (if cua--rectangle
+ (cua--rectangle-corner 0))))))
(defun cua-help-for-region (&optional help)
"Show region specific help in echo area."
@@ -1320,7 +1268,8 @@
(define-key cua--cua-keys-keymap [(control z)] 'undo))
(when cua-remap-control-v
(define-key cua--cua-keys-keymap [(control v)] 'yank)
- (define-key cua--cua-keys-keymap [(meta v)] 'cua-repeat-replace-region))
+ (define-key cua--cua-keys-keymap [(meta v)]
+ 'delete-selection-repeat-replace-region))
(define-key cua--prefix-override-keymap [(control x)]
'cua--prefix-override-handler)
(define-key cua--prefix-override-keymap [(control c)]
'cua--prefix-override-handler)
@@ -1359,6 +1308,7 @@
;; delete-selection-mode
(defvar cua--saved-state nil)
+(defvar delete-selection-save-to-register)
;;;###autoload
(define-minor-mode cua-mode
@@ -1426,6 +1376,8 @@
(if (and (boundp 'delete-selection-mode) delete-selection-mode)
(delete-selection-mode -1)))
(if cua-highlight-region-shift-only (transient-mark-mode -1))
+ (if cua-delete-copy-to-register-0
+ (setq delete-selection-save-to-register ?0))
(cua--deactivate))
(cua--saved-state
(if (nth 0 cua--saved-state)
=== modified file 'lisp/net/tramp-cache.el'
--- a/lisp/net/tramp-cache.el 2014-09-14 09:00:11 +0000
+++ b/lisp/net/tramp-cache.el 2014-11-01 18:05:30 +0000
@@ -144,7 +144,7 @@
(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-get-count-" property)))
- (val (or (ignore-errors (symbol-value var)) 0)))
+ (val (or (and (boundp var) (symbol-value var)) 0)))
(set var (1+ val))))
value))
@@ -161,7 +161,7 @@
(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-set-count-" property)))
- (val (or (ignore-errors (symbol-value var)) 0)))
+ (val (or (and (boundp var) (symbol-value var)) 0)))
(set var (1+ val))))
value))
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2014-10-29 01:42:51 +0000
+++ b/lisp/net/tramp-sh.el 2014-11-01 18:05:30 +0000
@@ -4769,6 +4769,17 @@
(when (tramp-get-connection-property p "remote-echo" nil)
;; We mark the command string that it can be erased in the output buffer.
(tramp-set-connection-property p "check-remote-echo" t)
+ ;; If we put `tramp-echo-mark' after a trailing newline (which
+ ;; is assumed to be unquoted) `tramp-send-string' doesn't see
+ ;; that newline and adds `tramp-rsh-end-of-line' right after
+ ;; `tramp-echo-mark', so the remote shell sees two consecutive
+ ;; trailing line endings and sends two prompts after executing
+ ;; the command, which confuses `tramp-wait-for-output'.
+ (when (and (not (string= command ""))
+ (string-equal (substring command -1) "\n"))
+ (setq command (substring command 0 -1)))
+ ;; No need to restore a trailing newline here since `tramp-send-string'
+ ;; makes sure that the string ends in `tramp-rsh-end-of-line', anyway.
(setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
;; Send the command.
(tramp-message vec 6 "%s" command)
@@ -5278,17 +5289,20 @@
(defun tramp-get-remote-uid (vec id-format)
(with-tramp-connection-property vec (format "uid-%s" id-format)
- (let ((res (cond
- ((tramp-get-remote-id vec)
- (tramp-get-remote-uid-with-id vec id-format))
- ((tramp-get-remote-perl vec)
- (tramp-get-remote-uid-with-perl vec id-format))
- ((tramp-get-remote-python vec)
- (tramp-get-remote-uid-with-python vec id-format))
- (t (tramp-error
- vec 'file-error "Cannot determine remote uid")))))
- ;; The command might not always return a number.
- (if (and (equal id-format 'integer) (not (integerp res))) -1 res))))
+ (let ((res
+ (ignore-errors
+ (cond
+ ((tramp-get-remote-id vec)
+ (tramp-get-remote-uid-with-id vec id-format))
+ ((tramp-get-remote-perl vec)
+ (tramp-get-remote-uid-with-perl vec id-format))
+ ((tramp-get-remote-python vec)
+ (tramp-get-remote-uid-with-python vec id-format))))))
+ ;; Ensure there is a valid result.
+ (cond
+ ((and (equal id-format 'integer) (not (integerp res))) -1)
+ ((and (equal id-format 'string) (not (stringp res))) "UNKNOWN")
+ (t res)))))
(defun tramp-get-remote-gid-with-id (vec id-format)
(tramp-send-command-and-read
@@ -5319,17 +5333,20 @@
(defun tramp-get-remote-gid (vec id-format)
(with-tramp-connection-property vec (format "gid-%s" id-format)
- (let ((res (cond
- ((tramp-get-remote-id vec)
- (tramp-get-remote-gid-with-id vec id-format))
- ((tramp-get-remote-perl vec)
- (tramp-get-remote-gid-with-perl vec id-format))
- ((tramp-get-remote-python vec)
- (tramp-get-remote-gid-with-python vec id-format))
- (t (tramp-error
- vec 'file-error "Cannot determine remote gid")))))
- ;; The command might not always return a number.
- (if (and (equal id-format 'integer) (not (integerp res))) -1 res))))
+ (let ((res
+ (ignore-errors
+ (cond
+ ((tramp-get-remote-id vec)
+ (tramp-get-remote-gid-with-id vec id-format))
+ ((tramp-get-remote-perl vec)
+ (tramp-get-remote-gid-with-perl vec id-format))
+ ((tramp-get-remote-python vec)
+ (tramp-get-remote-gid-with-python vec id-format))))))
+ ;; Ensure there is a valid result.
+ (cond
+ ((and (equal id-format 'integer) (not (integerp res))) -1)
+ ((and (equal id-format 'string) (not (stringp res))) "UNKNOWN")
+ (t res)))))
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)
=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2014-10-30 05:15:28 +0000
+++ b/lisp/progmodes/compile.el 2014-11-01 18:05:30 +0000
@@ -1984,6 +1984,12 @@
compilation-page-delimiter)
;; (set (make-local-variable 'compilation-buffer-modtime) nil)
(compilation-setup)
+ ;; Turn off deferred fontifications in the compilation buffer, if
+ ;; the user turned them on globally. This is because idle timers
+ ;; aren't re-run after receiving input from a subprocess, so the
+ ;; buffer is left unfontified after the compilation exits, until
+ ;; some other input event happens.
+ (set (make-local-variable 'jit-lock-defer-time) nil)
(setq buffer-read-only t)
(run-mode-hooks 'compilation-mode-hook))
=== modified file 'lisp/progmodes/vhdl-mode.el'
--- a/lisp/progmodes/vhdl-mode.el 2014-03-31 00:49:05 +0000
+++ b/lisp/progmodes/vhdl-mode.el 2014-11-01 18:05:30 +0000
@@ -503,7 +503,7 @@
"List of default target names in Makefiles.
Automatically generated Makefiles include three default targets to compile
the entire design, clean the entire design and to create the design library.
-This option allows to change the names of these targets to avoid conflicts
+This option allows you to change the names of these targets to avoid conflicts
with other user Makefiles."
:type '(list (string :tag "Compile entire design")
(string :tag "Clean entire design ")
@@ -513,7 +513,7 @@
(defcustom vhdl-makefile-generation-hook nil
"Functions to run at the end of Makefile generation.
-Allows to insert user specific parts into a Makefile.
+Allows you to insert user specific parts into a Makefile.
Example:
\(lambda nil
@@ -590,8 +590,8 @@
Environment variables (e.g. \"$EXAMPLE2\") are resolved. If no sources are
specified, the default directory is taken as source directory. Otherwise,
the default directory is only taken as source directory if there is a sources
-entry with the empty string or \"./\". Exclude regexp allows to filter out
-specific file and directory names from the list of sources (e.g. CVS
+entry with the empty string or \"./\". Exclude regexp allows you to filter
+out specific file and directory names from the list of sources (e.g. CVS
directories).
Files are compiled in the compile directory. Makefiles are also placed into
@@ -606,7 +606,7 @@
File-specific compiler options (highest priority) overwrite project-specific
options which overwrite default options (lowest priority). Lower priority
-options can be inserted in higher priority options. This allows to reuse
+options can be inserted in higher priority options. This allows you to reuse
default options (e.g. \"-file\") in project- or file-specific options (e.g.
\"-93 -file\").
@@ -671,7 +671,7 @@
(defcustom vhdl-project-file-name '("\\1.prj")
"List of file names/paths for importing/exporting project setups.
\"\\1\" is replaced by the project name (SPC is replaced by `_'), \"\\2\" is
-replaced by the user name (allows to have user-specific project setups).
+replaced by the user name (allows you to have user-specific project setups).
The first entry is used as file name to import/export individual project
setups. All entries are used to automatically import project setups at
startup (see option `vhdl-project-auto-load'). Projects loaded from the
@@ -1540,8 +1540,8 @@
:group 'vhdl-beautify)
(defcustom vhdl-beautify-options '(t t t t t)
- "List of options for beautifying code. Allows to disable individual
-features of code beautification."
+ "List of options for beautifying code.
+Allows you to disable individual features of code beautification."
:type '(list (boolean :tag "Whitespace cleanup ")
(boolean :tag "Single statement per line")
(boolean :tag "Indentation ")
@@ -4449,7 +4449,7 @@
and vice versa.
Syntax-based indentation can be very slow in large files. Option
- `vhdl-indent-syntax-based' allows to use faster but simpler indentation.
+ `vhdl-indent-syntax-based' allows you to use faster but simpler
indentation.
Option `vhdl-indent-comment-like-next-code-line' controls whether
comment lines are indented like the preceding or like the following code
@@ -4482,7 +4482,7 @@
CODE FILLING:
- Code filling allows to condense code (e.g. sensitivity lists or port
+ Code filling allows you to condense code (e.g. sensitivity lists or port
maps) by removing comments and newlines and re-wrapping so that all
lines are maximally filled (block filling). `C-c C-f C-f' fills a list
enclosed by parenthesis, `C-c C-f C-g' a group of lines separated by
@@ -4742,7 +4742,7 @@
Words with special syntax can be highlighted by specifying their
syntax and color in option `vhdl-special-syntax-alist' and by setting
- option `vhdl-highlight-special-words' to non-nil. This allows to
+ option `vhdl-highlight-special-words' to non-nil. This allows you to
establish some naming conventions (e.g. to distinguish different kinds
of signals or other objects by using name suffices) and to support them
visually.
@@ -16964,7 +16964,7 @@
(defun vhdl-make (&optional target)
"Call make command for compilation of all updated source files (requires
-`Makefile'). Optional argument TARGET allows to compile the design
+`Makefile'). Optional argument TARGET allows you to compile the design
specified by a target."
(interactive)
(setq vhdl-make-target
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2014-10-21 15:27:18 +0000
+++ b/lisp/simple.el 2014-11-01 18:05:30 +0000
@@ -28,6 +28,8 @@
;;; Code:
+(eval-when-compile (require 'cl-lib))
+
(declare-function widget-convert "wid-edit" (type &rest args))
(declare-function shell-mode "shell" ())
@@ -410,6 +412,7 @@
;; Do the rest in post-self-insert-hook, because we want to do it
;; *before* other functions on that hook.
(lambda ()
+ (cl-assert (eq ?\n (char-before)))
;; Mark the newline(s) `hard'.
(if use-hard-newlines
(set-hard-newline-properties
@@ -428,7 +431,8 @@
;; starts a page.
(or was-page-start
(move-to-left-margin nil t)))))
- (if (not interactive)
+ (unwind-protect
+ (if (not interactive)
;; FIXME: For non-interactive uses, many calls actually just want
;; (insert "\n"), so maybe we should do just that, so as to avoid
;; the risk of filling or running abbrevs unexpectedly.
@@ -441,7 +445,9 @@
;; We first used let-binding to protect the hook, but that was naive
;; since add-hook affects the symbol-default value of the variable,
;; whereas the let-binding might only protect the buffer-local value.
- (remove-hook 'post-self-insert-hook postproc))))
+ (remove-hook 'post-self-insert-hook postproc)))
+ (cl-assert (not (member postproc post-self-insert-hook)))
+ (cl-assert (not (member postproc (default-value
'post-self-insert-hook))))))
nil)
(defun set-hard-newline-properties (from to)
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-11-01 14:22:32 +0000
+++ b/src/ChangeLog 2014-11-01 18:05:30 +0000
@@ -1,3 +1,33 @@
+2014-11-01 Jan Djärv <address@hidden>
+
+ * macfont.m (macfont_glyph_extents): Turn off synthetic bold
+ if force_integral_p (i.e. no antialias).
+ (macfont_draw): Check ns_antialias_text, also turn off synthetic
+ bold if no antialias (Bug#18876).
+
+ * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
+ was given (Bug#18846).
+
+ * nsterm.h (ns_set_doc_edited): Declare taking no args.
+
+ * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
+ instead of in xdisp.c, function now takes void. (Bug#18884).
+
+ * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
+ (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
+
+ * nsterm.h (EmacsScroller): Replace Lisp_Object win with
+ struct window* (Bug#18889).
+ Remove getMouseMotionPart.
+ (ns_output): Make icon_top/left int.
+
+ * nsfns.m (x_icon): icon_top/left is int.
+
+ * nsterm.m (ns_mouse_position): Remove unused code.
+ (initFrame:window:, dealloc): Use window instead of win.
+ (getMouseMotionPart:window:x:y:): Remove, unused.
+ (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
+
2014-11-01 Eli Zaretskii <address@hidden>
* keyboard.c (readable_events): When FLAGS include
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2014-10-12 06:09:50 +0000
+++ b/src/emacs.c 2014-11-01 18:05:30 +0000
@@ -721,7 +721,7 @@
#ifdef DAEMON_MUST_EXEC
char dname_arg2[80];
#endif
- char *ch_to_dir;
+ char *ch_to_dir = 0;
/* If we use --chdir, this records the original directory. */
char *original_pwd = 0;
@@ -1230,19 +1230,19 @@
/* Started from GUI? */
/* FIXME: Do the right thing if getenv returns NULL, or if
chdir fails. */
- if (! inhibit_window_system && ! isatty (0))
+ if (! inhibit_window_system && ! isatty (0) && ! ch_to_dir)
chdir (getenv ("HOME"));
if (skip_args < argc)
{
if (!strncmp (argv[skip_args], "-psn", 4))
{
skip_args += 1;
- chdir (getenv ("HOME"));
+ if (! ch_to_dir) chdir (getenv ("HOME"));
}
else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn",
4))
{
skip_args += 2;
- chdir (getenv ("HOME"));
+ if (! ch_to_dir) chdir (getenv ("HOME"));
}
}
#endif /* COCOA */
=== modified file 'src/macfont.m'
--- a/src/macfont.m 2014-10-12 14:56:58 +0000
+++ b/src/macfont.m 2014-11-01 18:05:30 +0000
@@ -1086,7 +1086,7 @@
bounds.size =
CGSizeApplyAffineTransform (bounds.size,
synthetic_italic_atfm);
}
- if (macfont_info->synthetic_bold_p)
+ if (macfont_info->synthetic_bold_p && ! force_integral_p)
{
CGFloat d =
- synthetic_bold_factor * mac_font_get_size (macfont) / 2;
@@ -2692,7 +2692,8 @@
CGPoint *positions;
CGFloat font_size = mac_font_get_size (macfont_info->macfont);
bool no_antialias_p =
- (macfont_info->antialias == MACFONT_ANTIALIAS_OFF
+ (NILP (ns_antialias_text)
+ || macfont_info->antialias == MACFONT_ANTIALIAS_OFF
|| (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
&& font_size <= macfont_antialias_threshold));
int len = to - from;
@@ -2755,7 +2756,7 @@
atfm = synthetic_italic_atfm;
else
atfm = CGAffineTransformIdentity;
- if (macfont_info->synthetic_bold_p)
+ if (macfont_info->synthetic_bold_p && ! no_antialias_p))
{
CGContextSetTextDrawingMode (context, kCGTextFillStroke);
CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
=== modified file 'src/nsfns.m'
--- a/src/nsfns.m 2014-10-14 12:45:41 +0000
+++ b/src/nsfns.m 2014-11-01 18:05:30 +0000
@@ -629,18 +629,26 @@
void
-ns_set_doc_edited (struct frame *f, Lisp_Object arg)
+ns_set_doc_edited (void)
{
- NSView *view = FRAME_NS_VIEW (f);
NSAutoreleasePool *pool;
- if (!MINI_WINDOW_P (XWINDOW (f->selected_window)))
+ Lisp_Object tail, frame;
+ block_input ();
+ pool = [[NSAutoreleasePool alloc] init];
+ FOR_EACH_FRAME (tail, frame)
{
- block_input ();
- pool = [[NSAutoreleasePool alloc] init];
- [[view window] setDocumentEdited: !NILP (arg)];
- [pool release];
- unblock_input ();
+ BOOL edited = NO;
+ struct frame *f = XFRAME (frame);
+ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
+ NSView *view = FRAME_NS_VIEW (f);
+ if (!MINI_WINDOW_P (w))
+ edited = ! NILP (Fbuffer_modified_p (w->contents)) &&
+ ! NILP (Fbuffer_file_name (w->contents));
+ [[view window] setDocumentEdited: edited];
}
+
+ [pool release];
+ unblock_input ();
}
@@ -935,8 +943,8 @@
Lisp_Object icon_x, icon_y;
struct ns_display_info *dpyinfo = check_ns_display_info (Qnil);
- f->output_data.ns->icon_top = Qnil;
- f->output_data.ns->icon_left = Qnil;
+ f->output_data.ns->icon_top = -1;
+ f->output_data.ns->icon_left = -1;
/* Set the position of the icon. */
icon_x = x_get_arg (dpyinfo, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
@@ -945,8 +953,8 @@
{
CHECK_NUMBER (icon_x);
CHECK_NUMBER (icon_y);
- f->output_data.ns->icon_top = icon_y;
- f->output_data.ns->icon_left = icon_x;
+ f->output_data.ns->icon_top = XINT (icon_y);
+ f->output_data.ns->icon_left = XINT (icon_x);
}
else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
error ("Both left and top icon corners of icon must be specified");
=== modified file 'src/nsterm.h'
--- a/src/nsterm.h 2014-10-12 08:35:50 +0000
+++ b/src/nsterm.h 2014-11-01 18:05:30 +0000
@@ -373,7 +373,7 @@
@interface EmacsScroller : NSScroller
{
- Lisp_Object win;
+ struct window *window;
struct frame *frame;
NSResponder *prevResponder;
@@ -397,8 +397,6 @@
- setPosition: (int) position portion: (int) portion whole: (int) whole;
- (int) checkSamePosition: (int)position portion: (int)portion
whole: (int)whole;
-- (void) getMouseMotionPart: (int *)part window: (Lisp_Object *)window
- x: (Lisp_Object *)x y: ( Lisp_Object *)y;
- (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e;
- repeatScroll: (NSTimer *)sender;
- condemn;
@@ -667,8 +665,8 @@
value contains an ID of the fontset, else -1. */
int fontset; /* only used with font_backend */
- Lisp_Object icon_top;
- Lisp_Object icon_left;
+ int icon_top;
+ int icon_left;
/* The size of the extra width currently allotted for vertical
scroll bars, in pixels. */
@@ -817,7 +815,7 @@
extern int ns_lisp_to_cursor_type (Lisp_Object arg);
extern Lisp_Object ns_cursor_type_to_lisp (int arg);
extern void ns_set_name_as_filename (struct frame *f);
-extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg);
+extern void ns_set_doc_edited (void);
extern bool
ns_defined_color (struct frame *f,
=== modified file 'src/nsterm.m'
--- a/src/nsterm.m 2014-10-12 14:56:58 +0000
+++ b/src/nsterm.m 2014-11-01 18:05:30 +0000
@@ -1892,14 +1892,36 @@
block_input ();
- if (dpyinfo->last_mouse_scroll_bar != nil && insist == 0)
+ /* Clear the mouse-moved flag for every frame on this display. */
+ FOR_EACH_FRAME (tail, frame)
+ if (FRAME_NS_P (XFRAME (frame))
+ && FRAME_NS_DISPLAY (XFRAME (frame)) == FRAME_NS_DISPLAY (*fp))
+ XFRAME (frame)->mouse_moved = 0;
+
+ dpyinfo->last_mouse_scroll_bar = nil;
+ if (dpyinfo->last_mouse_frame
+ && FRAME_LIVE_P (dpyinfo->last_mouse_frame))
+ f = dpyinfo->last_mouse_frame;
+ else
+ f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame : SELECTED_FRAME ();
+
+ if (f && FRAME_NS_P (f))
{
- /* TODO: we do not use this path at the moment because drag events will
- go directly to the EmacsScroller. Leaving code in for now. */
- [dpyinfo->last_mouse_scroll_bar
- getMouseMotionPart: (int *)part window: bar_window x: x y: y];
+ view = FRAME_NS_VIEW (*fp);
+
+ position = [[view window] mouseLocationOutsideOfEventStream];
+ position = [view convertPoint: position fromView: nil];
+ remember_mouse_glyph (f, position.x, position.y,
+ &dpyinfo->last_mouse_glyph);
+/*fprintf (stderr, "ns_mouse_position: %.0f, %.0f\n", position.x, position.y);
*/
+
+ if (bar_window) *bar_window = Qnil;
+ if (part) *part = 0; /*scroll_bar_handle; */
+
+ if (x) XSETINT (*x, lrint (position.x));
+ if (y) XSETINT (*y, lrint (position.y));
if (time)
- *time = dpyinfo->last_mouse_movement_time;
+ *time = dpyinfo->last_mouse_movement_time;
dpyinfo->last_mouse_scroll_bar = nil;
}
else
@@ -7164,13 +7186,13 @@
[self setAutoresizingMask: NSViewMinXMargin | NSViewHeightSizable];
#endif
- win = nwin;
+ window = XWINDOW (nwin);
condemned = NO;
pixel_height = NSHeight (r);
if (pixel_height == 0) pixel_height = 1;
min_portion = 20 / pixel_height;
- frame = XFRAME (XWINDOW (win)->frame);
+ frame = XFRAME (window->frame);
if (FRAME_LIVE_P (frame))
{
int i;
@@ -7302,30 +7324,17 @@
return self;
}
-/* FIXME: unused at moment (see ns_mouse_position) at the moment because
- drag events will go directly to the EmacsScroller. Leaving in for now. */
--(void)getMouseMotionPart: (int *)part window: (Lisp_Object *)window
- x: (Lisp_Object *)x y: ( Lisp_Object *)y
-{
- *part = last_hit_part;
- *window = win;
- XSETINT (*y, pixel_height);
- if ([self floatValue] > 0.999F)
- XSETINT (*x, pixel_height);
- else
- XSETINT (*x, pixel_height * [self floatValue]);
-}
-
-
/* set up emacs_event */
- (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e
{
+ Lisp_Object win;
if (!emacs_event)
return;
emacs_event->part = last_hit_part;
emacs_event->code = 0;
emacs_event->modifiers = EV_MODIFIERS (e) | down_modifier;
+ XSETWINDOW (win, window);
emacs_event->frame_or_window = win;
emacs_event->timestamp = EV_TIMESTAMP (e);
emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2014-10-30 05:15:28 +0000
+++ b/src/xdisp.c 2014-11-01 18:05:30 +0000
@@ -11785,12 +11785,6 @@
#ifdef HAVE_WINDOW_SYSTEM
update_tool_bar (f, 0);
#endif
-#ifdef HAVE_NS
- if (windows_or_buffers_changed
- && FRAME_NS_P (f))
- ns_set_doc_edited
- (f, Fbuffer_modified_p (XWINDOW (f->selected_window)->contents));
-#endif
UNGCPRO;
}
@@ -14121,6 +14115,9 @@
#endif /* HAVE_WINDOW_SYSTEM */
end_of_redisplay:
+#ifdef HAVE_NS
+ ns_set_doc_edited ();
+#endif
if (interrupt_input && interrupts_deferred)
request_sigio ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r118249: Merge from emacs-24; up to 117656,
Glenn Morris <=