Now on revision 109196. ------------------------------------------------------------ revno: 109196 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-24 10:45:44 +0400 message: Simplify copy_overlay. * buffer.c (copy_overlay): Simplify, use build_marker. * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-23 16:57:20 +0000 +++ src/ChangeLog 2012-07-24 06:45:44 +0000 @@ -1,3 +1,9 @@ +2012-07-24 Dmitry Antipov + + Simplify copy_overlay. + * buffer.c (copy_overlay): Simplify, use build_marker. + * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks. + 2012-07-23 Eli Zaretskii * print.c (print_object): Don't crash when a frame's name is nil === modified file 'src/buffer.c' --- src/buffer.c 2012-07-23 11:15:43 +0000 +++ src/buffer.c 2012-07-24 06:45:44 +0000 @@ -410,32 +410,24 @@ static struct Lisp_Overlay * copy_overlays (struct buffer *b, struct Lisp_Overlay *list) { - Lisp_Object buffer; struct Lisp_Overlay *result = NULL, *tail = NULL; - XSETBUFFER (buffer, b); - for (; list; list = list->next) { - Lisp_Object overlay, start, end, old_overlay; - ptrdiff_t charpos; - - XSETMISC (old_overlay, list); - charpos = marker_position (OVERLAY_START (old_overlay)); - start = Fmake_marker (); - Fset_marker (start, make_number (charpos), buffer); - XMARKER (start)->insertion_type - = XMARKER (OVERLAY_START (old_overlay))->insertion_type; - - charpos = marker_position (OVERLAY_END (old_overlay)); - end = Fmake_marker (); - Fset_marker (end, make_number (charpos), buffer); - XMARKER (end)->insertion_type - = XMARKER (OVERLAY_END (old_overlay))->insertion_type; - - overlay = build_overlay - (start, end, Fcopy_sequence (OVERLAY_PLIST (old_overlay))); - + Lisp_Object overlay, start, end; + struct Lisp_Marker *m; + + eassert (MARKERP (list->start)); + m = XMARKER (list->start); + start = build_marker (b, m->charpos, m->bytepos); + XMARKER (start)->insertion_type = m->insertion_type; + + eassert (MARKERP (list->end)); + m = XMARKER (list->end); + end = build_marker (b, m->charpos, m->bytepos); + XMARKER (end)->insertion_type = m->insertion_type; + + overlay = build_overlay (start, end, Fcopy_sequence (list->plist)); if (tail) tail = tail->next = XOVERLAY (overlay); else === modified file 'src/lisp.h' --- src/lisp.h 2012-07-23 11:15:43 +0000 +++ src/lisp.h 2012-07-24 06:45:44 +0000 @@ -1286,6 +1286,17 @@ /* START and END are markers in the overlay's buffer, and PLIST is the overlay's property list. */ struct Lisp_Overlay +/* An overlay's real data content is: + - plist + - buffer (really there are two buffer pointers, one per marker, + and both points to the same buffer) + - insertion type of both ends (per-marker fields) + - start & start byte (of start marker) + - end & end byte (of end marker) + - next (singly linked list of overlays) + - next fields of start and end markers (singly linked list of markers). + I.e. 9words plus 2 bits, 3words of which are for external linked lists. +*/ { ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_Overlay */ unsigned gcmarkbit : 1; ------------------------------------------------------------ revno: 109195 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-07-23 20:27:41 +0300 message: Fix displaying the user name in error message about no home directory. lisp/startup.el (command-line): Don't display an empty user name in the error message about non-existent home directory, when init-file-user was set to an empty string. See http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html for the details and context. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-22 21:14:12 +0000 +++ lisp/ChangeLog 2012-07-23 17:27:41 +0000 @@ -1,3 +1,11 @@ +2012-07-23 Eli Zaretskii + + * startup.el (command-line): Don't display an empty user name in + the error message about non-existent home directory, when + init-file-user was set to an empty string. See + http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html + for the details and context. + 2012-07-22 Vincent Belaïche * ses.el (ses-cell-formula-aset): New macro. === modified file 'lisp/startup.el' --- lisp/startup.el 2012-07-20 10:29:32 +0000 +++ lisp/startup.el 2012-07-23 17:27:41 +0000 @@ -1001,7 +1001,9 @@ nil (display-warning 'initialization (format "User %s has no home directory" - init-file-user) + (if (equal init-file-user "") + (user-real-login-name) + init-file-user)) :error)))) ;; Load that user's init file, or the default one, or none. ------------------------------------------------------------ revno: 109194 fixes bug(s): http://debbugs.gnu.org/12025 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-07-23 19:57:20 +0300 message: Fix bug #12025 with a crash when displaying tooltips. src/print.c (print_object): Don't crash when a frame's name is nil or invalid. src/window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as it signals an error when a tooltip frame is being created. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-23 11:15:43 +0000 +++ src/ChangeLog 2012-07-23 16:57:20 +0000 @@ -1,3 +1,11 @@ +2012-07-23 Eli Zaretskii + + * print.c (print_object): Don't crash when a frame's name is nil + or invalid. (Bug#12025) + + * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as + it signals an error when a tooltip frame is being created. + 2012-07-23 Dmitry Antipov Cleanup miscellaneous objects allocation and initialization. === modified file 'src/print.c' --- src/print.c 2012-07-05 18:35:48 +0000 +++ src/print.c 2012-07-23 16:57:20 +0000 @@ -1897,10 +1897,21 @@ else if (FRAMEP (obj)) { int len; + Lisp_Object frame_name = XFRAME (obj)->name; + strout ((FRAME_LIVE_P (XFRAME (obj)) ? "#name, printcharfun); + if (!STRINGP (frame_name)) + { + /* A frame could be too young and have no name yet; + don't crash. */ + if (SYMBOLP (frame_name)) + frame_name = Fsymbol_name (frame_name); + else /* can't happen: name should be either nil or string */ + frame_name = build_string ("*INVALID*FRAME*NAME*"); + } + print_string (frame_name, printcharfun); len = sprintf (buf, " %p", XFRAME (obj)); strout (buf, len, len, printcharfun); PRINTCHAR ('>'); === modified file 'src/window.c' --- src/window.c 2012-07-21 06:17:30 +0000 +++ src/window.c 2012-07-23 16:57:20 +0000 @@ -151,7 +151,8 @@ CHECK_WINDOW (window); w = XWINDOW (window); - CHECK_LIVE_FRAME (w->frame); + /* The following test throws up every time a tooltip frame is displayed. */ + /* CHECK_LIVE_FRAME (w->frame); */ return w; } ------------------------------------------------------------ revno: 109193 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2012-07-23 11:26:29 +0000 message: nnir.el ("nnir"): Revert last change, that's premature to merge from Gnus master diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-07-23 11:10:23 +0000 +++ lisp/gnus/ChangeLog 2012-07-23 11:26:29 +0000 @@ -1,3 +1,8 @@ +2012-07-23 Katsumi Yamaoka + + * nnir.el ("nnir"): Revert last change, that's premature to merge from + Gnus master. + 2012-07-22 Andrew Cohen * nnir.el ("nnir"): Add 'virtual ability to nnir backend. === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2012-07-23 11:10:23 +0000 +++ lisp/gnus/nnir.el 2012-07-23 11:26:29 +0000 @@ -288,7 +288,7 @@ (eval-when-compile (autoload 'nnimap-buffer "nnimap") (autoload 'nnimap-command "nnimap") - (autoload 'nnimap-change-group "nnimap") + (autoload 'nnimap-possibly-change-group "nnimap") (autoload 'nnimap-make-thread-query "nnimap") (autoload 'gnus-registry-action "gnus-registry")) @@ -298,7 +298,7 @@ (defvoo nnir-address nil "The address of the nnir server.") -(gnus-declare-backend "nnir" 'mail 'virtual) +(gnus-declare-backend "nnir" 'mail) ;;; User Customizable Variables: @@ -854,7 +854,7 @@ (lambda (group) (let (artlist) (condition-case () - (when (nnimap-change-group + (when (nnimap-possibly-change-group (gnus-group-short-name group) server) (with-current-buffer (nnimap-buffer) (message "Searching %s..." group) ------------------------------------------------------------ revno: 109192 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-07-23 15:15:43 +0400 message: Cleanup miscellaneous objects allocation and initialization. * alloc.c (allocate_misc): Change to static. Add argument to specify the subtype. Adjust comment and users. (build_overlay): New function. * buffer.c (copy_overlays, Fmake_overlay): Use it. * lisp.h (struct Lisp_Overlay): Remove obsolete comment. (allocate_misc): Remove prototype. (build_overlay): Add prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-23 07:14:58 +0000 +++ src/ChangeLog 2012-07-23 11:15:43 +0000 @@ -1,4 +1,15 @@ -2012-07-22 Dmitry Antipov +2012-07-23 Dmitry Antipov + + Cleanup miscellaneous objects allocation and initialization. + * alloc.c (allocate_misc): Change to static. Add argument to + specify the subtype. Adjust comment and users. + (build_overlay): New function. + * buffer.c (copy_overlays, Fmake_overlay): Use it. + * lisp.h (struct Lisp_Overlay): Remove obsolete comment. + (allocate_misc): Remove prototype. + (build_overlay): Add prototype. + +2012-07-23 Dmitry Antipov Swap buffer text indirection counters in Fbuffer_swap_text. * buffer.c (Fbuffer_swap_text): Swap indirections too. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-22 15:13:50 +0000 +++ src/alloc.c 2012-07-23 11:15:43 +0000 @@ -3564,10 +3564,10 @@ static union Lisp_Misc *marker_free_list; -/* Return a newly allocated Lisp_Misc object, with no substructure. */ +/* Return a newly allocated Lisp_Misc object of specified TYPE. */ -Lisp_Object -allocate_misc (void) +static Lisp_Object +allocate_misc (enum Lisp_Misc_Type type) { Lisp_Object val; @@ -3599,6 +3599,7 @@ --total_free_markers; consing_since_gc += sizeof (union Lisp_Misc); misc_objects_consed++; + XMISCTYPE (val) = type; XMISCANY (val)->gcmarkbit = 0; return val; } @@ -3625,8 +3626,7 @@ register Lisp_Object val; register struct Lisp_Save_Value *p; - val = allocate_misc (); - XMISCTYPE (val) = Lisp_Misc_Save_Value; + val = allocate_misc (Lisp_Misc_Save_Value); p = XSAVE_VALUE (val); p->pointer = pointer; p->integer = integer; @@ -3634,6 +3634,21 @@ return val; } +/* Return a Lisp_Misc_Overlay object with specified START, END and PLIST. */ + +Lisp_Object +build_overlay (Lisp_Object start, Lisp_Object end, Lisp_Object plist) +{ + register Lisp_Object overlay; + + overlay = allocate_misc (Lisp_Misc_Overlay); + OVERLAY_START (overlay) = start; + OVERLAY_END (overlay) = end; + OVERLAY_PLIST (overlay) = plist; + XOVERLAY (overlay)->next = NULL; + return overlay; +} + DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, doc: /* Return a newly allocated marker which does not point at any place. */) (void) @@ -3641,8 +3656,7 @@ register Lisp_Object val; register struct Lisp_Marker *p; - val = allocate_misc (); - XMISCTYPE (val) = Lisp_Misc_Marker; + val = allocate_misc (Lisp_Misc_Marker); p = XMARKER (val); p->buffer = 0; p->bytepos = 0; @@ -3667,8 +3681,7 @@ /* Every character is at least one byte. */ eassert (charpos <= bytepos); - obj = allocate_misc (); - XMISCTYPE (obj) = Lisp_Misc_Marker; + obj = allocate_misc (Lisp_Misc_Marker); m = XMARKER (obj); m->buffer = buf; m->charpos = charpos; === modified file 'src/buffer.c' --- src/buffer.c 2012-07-23 07:14:58 +0000 +++ src/buffer.c 2012-07-23 11:15:43 +0000 @@ -433,12 +433,8 @@ XMARKER (end)->insertion_type = XMARKER (OVERLAY_END (old_overlay))->insertion_type; - overlay = allocate_misc (); - XMISCTYPE (overlay) = Lisp_Misc_Overlay; - OVERLAY_START (overlay) = start; - OVERLAY_END (overlay) = end; - OVERLAY_PLIST (overlay) = Fcopy_sequence (OVERLAY_PLIST (old_overlay)); - XOVERLAY (overlay)->next = NULL; + overlay = build_overlay + (start, end, Fcopy_sequence (OVERLAY_PLIST (old_overlay))); if (tail) tail = tail->next = XOVERLAY (overlay); @@ -3640,12 +3636,7 @@ if (!NILP (rear_advance)) XMARKER (end)->insertion_type = 1; - overlay = allocate_misc (); - XMISCTYPE (overlay) = Lisp_Misc_Overlay; - XOVERLAY (overlay)->start = beg; - XOVERLAY (overlay)->end = end; - XOVERLAY (overlay)->plist = Qnil; - XOVERLAY (overlay)->next = NULL; + overlay = build_overlay (beg, end, Qnil); /* Put the new overlay on the wrong list. */ end = OVERLAY_END (overlay); === modified file 'src/lisp.h' --- src/lisp.h 2012-07-20 13:14:58 +0000 +++ src/lisp.h 2012-07-23 11:15:43 +0000 @@ -1286,16 +1286,6 @@ /* START and END are markers in the overlay's buffer, and PLIST is the overlay's property list. */ struct Lisp_Overlay -/* An overlay's real data content is: - - plist - - buffer - - insertion type of both ends - - start & start_byte - - end & end_byte - - next (singly linked list of overlays). - - start_next and end_next (singly linked list of markers). - I.e. 9words plus 2 bits, 3words of which are for external linked lists. -*/ { ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_Overlay */ unsigned gcmarkbit : 1; @@ -2605,7 +2595,6 @@ extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); -extern Lisp_Object allocate_misc (void); extern _Noreturn void string_overflow (void); extern Lisp_Object make_string (const char *, ptrdiff_t); extern Lisp_Object make_formatted_string (char *, const char *, ...) @@ -2667,6 +2656,7 @@ extern void display_malloc_warning (void); extern ptrdiff_t inhibit_garbage_collection (void); extern Lisp_Object make_save_value (void *, ptrdiff_t); +extern Lisp_Object build_overlay (Lisp_Object, Lisp_Object, Lisp_Object); extern void free_marker (Lisp_Object); extern void free_cons (struct Lisp_Cons *); extern void init_alloc_once (void); ------------------------------------------------------------ revno: 109191 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2012-07-23 11:10:23 +0000 message: nnir.el ("nnir"): Add 'virtual ability to nnir backend diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-07-21 11:05:32 +0000 +++ lisp/gnus/ChangeLog 2012-07-23 11:10:23 +0000 @@ -1,3 +1,7 @@ +2012-07-22 Andrew Cohen + + * nnir.el ("nnir"): Add 'virtual ability to nnir backend. + 2012-07-21 Julien Danjou * message.el (message-dont-reply-to-names): Replace deprecated === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2012-02-11 22:13:29 +0000 +++ lisp/gnus/nnir.el 2012-07-23 11:10:23 +0000 @@ -288,7 +288,7 @@ (eval-when-compile (autoload 'nnimap-buffer "nnimap") (autoload 'nnimap-command "nnimap") - (autoload 'nnimap-possibly-change-group "nnimap") + (autoload 'nnimap-change-group "nnimap") (autoload 'nnimap-make-thread-query "nnimap") (autoload 'gnus-registry-action "gnus-registry")) @@ -298,7 +298,7 @@ (defvoo nnir-address nil "The address of the nnir server.") -(gnus-declare-backend "nnir" 'mail) +(gnus-declare-backend "nnir" 'mail 'virtual) ;;; User Customizable Variables: @@ -854,7 +854,7 @@ (lambda (group) (let (artlist) (condition-case () - (when (nnimap-possibly-change-group + (when (nnimap-change-group (gnus-group-short-name group) server) (with-current-buffer (nnimap-buffer) (message "Searching %s..." group) ------------------------------------------------------------ revno: 109190 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-07-23 11:14:58 +0400 message: Swap buffer text indirection counters in Fbuffer_swap_text. * buffer.c (Fbuffer_swap_text): Swap indirections too. This avoids crash reported by Christoph Scholtes at http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-22 16:35:15 +0000 +++ src/ChangeLog 2012-07-23 07:14:58 +0000 @@ -1,3 +1,10 @@ +2012-07-22 Dmitry Antipov + + Swap buffer text indirection counters in Fbuffer_swap_text. + * buffer.c (Fbuffer_swap_text): Swap indirections too. + This avoids crash reported by Christoph Scholtes at + http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html. + 2012-07-22 Jan Djärv * nsmenu.m (Popdown_data): New struct. === modified file 'src/buffer.c' --- src/buffer.c 2012-07-20 16:05:47 +0000 +++ src/buffer.c 2012-07-23 07:14:58 +0000 @@ -2145,6 +2145,7 @@ swapfield (zv_byte, ptrdiff_t); eassert (!current_buffer->base_buffer); eassert (!other_buffer->base_buffer); + swapfield (indirections, ptrdiff_t); current_buffer->clip_changed = 1; other_buffer->clip_changed = 1; swapfield (newline_cache, struct region_cache *); swapfield (width_run_cache, struct region_cache *); ------------------------------------------------------------ revno: 109189 committer: Vincent Belaïche branch nick: trunk timestamp: Sun 2012-07-22 23:14:12 +0200 message: * ses.el (ses-cell-formula-aset): New macro. (ses-cell-references-aset): New macro. (ses-cell-p): New function. (ses-rename-cell): Do no longer rely on complex operations like ses-cell-set-formula or ses-set-cell to change the cell and handle the undo at the same time, but rather use lower level new macros `ses-cell-formula-aset' and `ses-cell-references-aset' and handle the undo directly. Refresh the mode line. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-21 06:13:23 +0000 +++ lisp/ChangeLog 2012-07-22 21:14:12 +0000 @@ -1,3 +1,14 @@ +2012-07-22 Vincent Belaïche + + * ses.el (ses-cell-formula-aset): New macro. + (ses-cell-references-aset): New macro. + (ses-cell-p): New function. + (ses-rename-cell): Do no longer rely on complex operations like + ses-cell-set-formula or ses-set-cell to change the cell and handle + the undo at the same time, but rather use lower level new macros + `ses-cell-formula-aset' and `ses-cell-references-aset' and handle + the undo directly. Refresh the mode line. + 2012-07-21 Leo Liu * progmodes/cc-cmds.el (c-defun-name): Use === modified file 'lisp/ses.el' --- lisp/ses.el 2012-07-22 04:11:49 +0000 +++ lisp/ses.el 2012-07-22 21:14:12 +0000 @@ -362,6 +362,10 @@ "From a CELL or a pair (ROW,COL), get the function that computes its value." `(aref ,(if col `(ses-get-cell ,row ,col) row) 1)) +(defmacro ses-cell-formula-aset (cell formula) + "From a CELL set the function that computes its value." + `(aset ,cell 1 ,formula)) + (defmacro ses-cell-printer (row &optional col) "From a CELL or a pair (ROW,COL), get the function that prints its value." `(aref ,(if col `(ses-get-cell ,row ,col) row) 2)) @@ -371,6 +375,19 @@ functions refer to its value." `(aref ,(if col `(ses-get-cell ,row ,col) row) 3)) +(defmacro ses-cell-references-aset (cell references) + "From a CELL set the list REFERENCES of symbols for cells the +function of which refer to its value." + `(aset ,cell 3 ,references)) + +(defun ses-cell-p (cell) + "Return non `nil' is CELL is a cell of current buffer." + (and (vectorp cell) + (= (length cell) 5) + (eq cell (let ((rowcol (ses-sym-rowcol (ses-cell-symbol cell)))) + (and (consp rowcol) + (ses-get-cell (car rowcol) (cdr rowcol))))))) + (defun ses-cell-property-get-fun (property-name cell) ;; To speed up property fetching, each time a property is found it is placed ;; in the first position. This way, after the first get, the full property @@ -3193,50 +3210,52 @@ (setq formula (cdr formula)))) new-formula)) -(defun ses-rename-cell (new-name) +(defun ses-rename-cell (new-name &optional cell) "Rename current cell." (interactive "*SEnter new name: ") - (ses-check-curcell) - (or - (and (local-variable-p new-name) - (ses-sym-rowcol new-name) - ;; this test is needed because ses-cell property of deleted cells - ;; is not deleted in case of subsequent undo - (memq new-name ses--renamed-cell-symb-list) - (error "Already a cell name")) - (and (boundp new-name) - (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? " - new-name))) - (error "Already a bound cell name"))) - (let* ((rowcol (ses-sym-rowcol ses--curcell)) + (and (local-variable-p new-name) + (ses-sym-rowcol new-name) + ;; this test is needed because ses-cell property of deleted cells + ;; is not deleted in case of subsequent undo + (memq new-name ses--renamed-cell-symb-list) + (error "Already a cell name")) + (and (boundp new-name) + (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? " + new-name))) + (error "Already a bound cell name")) + (let* ((sym (if (ses-cell-p cell) + (ses-cell-symbol cell) + (setq cell nil) + (ses-check-curcell) + ses--curcell)) + (rowcol (ses-sym-rowcol sym)) (row (car rowcol)) - (col (cdr rowcol)) - (cell (ses-get-cell row col))) + (col (cdr rowcol))) + (setq cell (or cell (ses-get-cell row col))) + (push `(ses-rename-cell ,(ses-cell-symbol cell) ,cell) buffer-undo-list) (put new-name 'ses-cell rowcol) - ;; Replace name by new name in formula of cells referring to renamed cell. + ;; replace name by new name in formula of cells refering to renamed cell (dolist (ref (ses-cell-references cell)) (let* ((x (ses-sym-rowcol ref)) (xcell (ses-get-cell (car x) (cdr x)))) - (ses-cell-set-formula (car rowcol) - (cdr rowcol) - (ses-replace-name-in-formula - (ses-cell-formula xcell) - ses--curcell - new-name)))) + (ses-cell-formula-aset xcell + (ses-replace-name-in-formula + (ses-cell-formula xcell) + sym + new-name)))) ;; replace name by new name in reference list of cells to which renamed cell refers to (dolist (ref (ses-formula-references (ses-cell-formula cell))) (let* ((x (ses-sym-rowcol ref)) - (xrow (car x)) - (xcol (cdr x))) - (ses-set-cell xrow xcol 'references - (cons new-name (delq ses--curcell - (ses-cell-references xrow xcol)))))) + (xcell (ses-get-cell (car x) (cdr x)))) + (ses-cell-references-aset xcell + (cons new-name (delq sym + (ses-cell-references xcell)))))) (push new-name ses--renamed-cell-symb-list) - (set new-name (symbol-value ses--curcell)) + (set new-name (symbol-value sym)) (aset cell 0 new-name) - (put ses--curcell 'ses-cell nil) - (makunbound ses--curcell) - (setq ses--curcell new-name) + (put sym 'ses-cell nil) + (makunbound sym) + (setq sym new-name) (let* ((pos (point)) (inhibit-read-only t) (col (current-column)) @@ -3245,7 +3264,11 @@ (if (eolp) (+ pos (ses-col-width col) 1) (point))))) - (put-text-property pos end 'intangible new-name))) ) + (put-text-property pos end 'intangible new-name)) + ;; update mode line + (setq mode-line-process (list " cell " + (symbol-name sym))) + (force-mode-line-update))) ;;---------------------------------------------------------------------------- ;; Checking formulas for safety