Mercurial > hg > xemacs-beta
changeset 4684:15c42a3f4065
Do not move cursor position in gnuclient started buffer if user did
not requested..
author | It's me FKtPp \;) <m_pupil@yahoo.com.cn> |
---|---|
date | Sat, 29 Aug 2009 22:37:50 +0800 |
parents | 0cc9d22c3732 |
children | 945247a8112f |
files | lib-src/ChangeLog lib-src/gnuclient.c lisp/ChangeLog lisp/gnuserv.el |
diffstat | 4 files changed, 21 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/ChangeLog Thu Aug 27 15:18:51 2009 +0100 +++ b/lib-src/ChangeLog Sat Aug 29 22:37:50 2009 +0800 @@ -1,3 +1,8 @@ +2009-08-15 It's me FKtPp ;) <m_pupil@yahoo.com.cn> + + * gnuclient.c (main): Do not set start point position if user + didn't requested to do so + 2009-07-28 Stephen Turnbull <stephen@xemacs.org> * make-docfile.c (write_c_args): Parse UNUSED and USED_IF right.
--- a/lib-src/gnuclient.c Thu Aug 27 15:18:51 2009 +0100 +++ b/lib-src/gnuclient.c Sat Aug 29 22:37:50 2009 +0800 @@ -299,7 +299,7 @@ int main (int argc, char *argv[]) { - int starting_line = 1; /* line to start editing at */ + int starting_line = 0; /* line to start editing at */ char command[QXE_PATH_MAX+50];/* emacs command buffer */ char fullpath[QXE_PATH_MAX+1];/* full pathname to file */ char *eval_form = NULL; /* form to evaluate with `-eval' */ @@ -661,14 +661,10 @@ { if (i < argc - 1 && *argv[i] == '+') starting_line = atoi (argv[i++]); - else - starting_line = 1; + /* If the last argument is +something, treat it as a file. */ - if (i == argc) - { - starting_line = 1; - --i; - } + if (i == argc) --i; + filename_expand (fullpath, argv[i]); #ifdef INTERNET_DOMAIN_SOCKETS path = (char *) malloc (strlen (remotepath) + strlen (fullpath) + 1); @@ -676,7 +672,12 @@ #else path = my_strdup (fullpath); #endif - sprintf (command, "(%d . %s)", starting_line, clean_string (path)); + if ( starting_line ) { + sprintf (command, "(%d . %s)", starting_line, clean_string (path)); + } else { + sprintf (command, "(nil . %s)", clean_string (path)); + } + send_string (s, command); free (path); } /* for */
--- a/lisp/ChangeLog Thu Aug 27 15:18:51 2009 +0100 +++ b/lisp/ChangeLog Sat Aug 29 22:37:50 2009 +0800 @@ -23,6 +23,11 @@ Call (featurep 'x) when faces.elc is dumped, not repeatedly (myriad times) at image instantiation time. +2009-08-15 It's me FKtPp ;) <m_pupil@yahoo.com.cn> + + * gnuserv.el (gnuserv-edit-files): Don't run goto line if the + gnuclient request to open a file only (a linenumber of nil). + 2009-08-14 Aidan Kehoe <kehoea@parhasard.net> * minibuf.el (read-from-minibuffer):
--- a/lisp/gnuserv.el Thu Aug 27 15:18:51 2009 +0100 +++ b/lisp/gnuserv.el Sat Aug 29 22:37:50 2009 +0800 @@ -481,7 +481,7 @@ gnuserv-view-file-function gnuserv-find-file-function) path) - (goto-line line) + (when line (goto-line line)) ;; Don't memorize the quick and view buffers. (unless (or quick view) (pushnew (current-buffer) (gnuclient-buffers client))